This is a simple application in Laravel 9 which allows a user to -
- View/Create/Update/Delete Users
- View/Create/Update/Delete Posts
- Generate API token to make Fetch API requests to users & posts
Make a directory on your system & clone the project using github url
mkdir packt-app
git clone https://github.com/ani17/packt-app.git packt-app
Install all packages & dependencies for this project using composer
composer install
Create a .env file using .env.example file
cp .env.example .env
Configure the mysql conection variables according to your requirements Note: Make sure DB_DATABASE exists !
- DB_HOST, DB_PORT, DB_DATABASE
php artisan migrate
php artisan db:seed
You can also test your application by running the following commands
-
Run all tests
php artisan test
-
Run a specific test
php artisan test --filter UserTest
php artisan serve