(02/03/2025) A Laravel 12.x users API with the Repository Design. Includes API feature tests.
Postman API Collection for Users API Repository Design.
Postman API Environment for Users API Repository Design.
- XAMPP: Apache, MariaDB (MySQL alternative), & PHP
- If you find that the MariaDB XAMPP service fails to start (I get this on Windows) then install MySQL manually here
- https://laravel.com/docs/12.x/installation
- https://laravel.com/docs/12.x/vite
# Create our environment file.
cp .env.example .env
# Update database values in .env file.
# Install our app dependencies.
composer i
php artisan key:generate
# Before running the next command:
# Update your database details in .env
php artisan migrate --seed
yarn install
yarn build
php artisan serve --port=3000
# Website accessible at http://localhost:3000
php artisan route:list
# output
...
POST api/user ............................ login › API\UserController@login
GET|HEAD api/user/authorize .................. API\UserController@authorizeUser
POST api/user/register ................... API\UserController@register
...
View the api collection here.
php artisan test --filter=API
View the feature test code here.
See PHP ReactJS Boilerplate app
See Python ReactJS Boilerplate app
See Food Nutrition Facts Search web app
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.