composer create-project --prefer-dist laravel/laravel app
- DB_CONNECTION=mysql
- DB_HOST=127.0.0.1
- DB_PORT=3306
- DB_DATABASE=here your database name(blog)
- DB_USERNAME=here database username(root)
- DB_PASSWORD=here database password(root)
php artisan make:migration create_products_table --create=products
- $table->string('name');
- $table->text('detail');
- php artisan migrate
Route::resource('products','ProductController');
php artisan make:controller ProductController --resource --model=Product