laravel refresh code example
Example 1: laravel force delete
Product::find($id)->forceDelete();
Example 2: migrate fresh
php artisan migrate:refresh
Example 3: laravel create model and migration
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