Laravel real world examples (CRUD, auth, advanced patterns, etc) that adheres to the RealWorld spec and API.
This codebase was created to demonstrate a fully fledged fullstack application built with Laravel including CRUD operations, authentication, routing, pagination, and more.
We've gone to great lengths to adhere to the Laravel & PHP community styleguides & best practices.
For more information on how to this works with other frontends/backends, head over to the RealWorld repo.
See my works for my personal Backend & Frontend RealWorld apps collection.
This project use PostgreSQL as main database provider. You can run it easily via docker-compose up -d
.
Two databases will spin up, one for normal development and one dedicated for integrations tests.
composer install
cp .env.example .env
php artisan migrate:fresh --seed # migrate and seed
php artisan serve
And that's all, go to http://localhost:8000/api for full swagger documentation !
Launch follow scripts for validating realworld schema, note as you must start with purged database before run next commands :
php artisan serve
npx newman run postman.json --global-var "APIURL=http://localhost:8000/api" --global-var="USERNAME=johndoe" --global-var="EMAIL=john.doe@example.com" --global-var="PASSWORD=password"
This project is fully tested via Pest, just run php artisan test
for launching it. Install pcov extension for coverage testing.
This project is open-sourced software licensed under the MIT license.