Learn how to develop simple Laravel 10 factory tutorial application
The complete step by step guide is available on my blog. AllPHPTricks Laravel 10 Factory Tutorial
Make sure that you have setup the environment properly. You will need minimum PHP 8.1, MySQL/MariaDB, and composer.
- Download the project (or clone using GIT)
- Copy
.env.example
into.env
and configure your database credentials - Go to the project's root directory using terminal window/command prompt
- Run
composer install
- Set the application key by running
php artisan key:generate --ansi
- Run migrations
php artisan migrate
- Run composer autoload
composer dump-autoload
- Enter Tinker environment
php artisan tinker
- Run this command Product::factory()->count(100)->create()