A simple CRUD functionality of Products and their Categories. This involves basic Eloquent Relationship.
- Clone this repo to your root directory (e.g. htdocs, www).
git clone https://github.com/lyndonjohn/laravel-eloquent.git
- Open your terminal and CD to
laravel-eloquent
and runcomposer install
to install dependencies. - Create a copy of
.env.example
to.env
by typingcp .env.example .env
in your terminal and press enter. - Open
.env
file edit database configuration according to your local environment setup.- Make sure that the database specified in
DB_DATABASE
exists before continuing to step 5.
- Make sure that the database specified in
- Run migration.
php artisan migrate
- Serve the project by running
php artisan serve
or if you're using Laragon, you can use http://laravel-eloquent.test