laravel refresh code example

Example 1: laravel force delete

Product::find($id)->forceDelete();

Example 2: migrate fresh

php artisan migrate:refresh

#https://www.fiverr.com/tamerjarrar

Example 3: laravel create model and migration

# If you would like to generate a database migration when you 
# generate the model, you may use the --migration or -m option:

php artisan make:model Flight --migration
php artisan make:model Flight -m

Example 4: artisan refresh

Try this command it works for me

php artisan migrate:fresh
However, be careful! This command will drop all data from your DB:

Example 5: fresh laravel

$flight = Flight::where('number', 'FR 900')->first();

$flight->number = 'FR 456';

$flight->refresh();

$flight->number; // "FR 900"

Example 6: php artisan make model

php artisan make:model Flight