Example API REST for cinema, developed in Laravel
- PHP >= 7.3
- Composer
- MySql
- Clone repository
git clone https://github.com/agus757/cinema-api
- Go to project folder
cd cinema-api
- Install dependencies
composer install
- Create local environment file
cp .env .env.example
- Generate application key
php artisan key:generate
- Fill
DB_HOST DB_PORT DB_DATABASE DB_USERNAME DB_PASSWORD
- Create
cinema and cinema_testing
databases - Create tables
php artisan migrate
- Seed with random data
php artisan db:seed --class=MoviesSeeder
- Configure Laravel Passport for OAUTH Authentication
php artisan passport:install
- Run tests
php artisan test
We have all done, now it's time to serve the application, run the following command to do it on local environment
php artisan serve