Laravel DB – All in One

Installing and Creating a Laravel 5.8 Project In this section we’ll introduce Laravel and then proceed it to install and create a Laravel 5.8 project. About Laravel Laravel docs describe it as: Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and Read more…

Query database

Migration file example Read data with Models create a new model (found models inside app directory. Start laravel playground App\Project::all(); – show all records under project table (collection of items) App\Project::first(); – show all records on the first project. $project = new App\Project; $project->title = ‘my first project’; – insert Read more…

Databases and Migrations

All tables define as a classes. Migrations migration are like version control for your database. it’s quickly define a scheme for the a table without the need to learn any language. run the migrate: php artisan migrate if tables exists (drop the tables and recreate): php artisan migrate:fresh if any Read more…