AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Auth0 postman collection11/18/2023 ![]() Next, we'll modify the recently created migration to include the attributes we need for the authors table. Each migration file name contains a timestamp, which allows Lumen to determine the order of the migrations. The new migration will be placed in your database /migrations directory. Run the command below in the terminal to create the authors table migration: php artisan make:migration create_authors_table Migrations are like version control for your database, allowing your team to easily modify and share the application's database schema. First, we'll create a migration for the authors table. We are making use of MySQL in this tutorial. Setup Database, Models and MigrationsĪt the time of this writing, Lumen supports four database systems: MySQL, Postgres, SQLite, and SQL Server. Next uncomment this line //$app->withFacades(), which allows us to make use of Facades in our project. Make sure you set the right details for your database in the. Once uncommented, Lumen hooks the Eloquent ORM with your database using the connections configured in the. php and uncomment this line, // app->withEloquent. You should see the index page like so:Īuthors Index Activate Eloquent and FacadesĪs I mentioned earlier, the entire bootstrap process is located in a single file. Now, run php - S localhost : 8000 -t public to serve the project. Run the following command in your terminal to create a new project with Lumen: composer create-project -prefer-dist laravel/lumen authorsĬd into the newly created project.
0 Comments
Read More
Leave a Reply. |