laravel ->id() migration replacement code example
Example 1: laravel migration rollback
To rollback one step:
php artisan migrate:rollback
To rollback multiple steps:
php artisan migrate:rollback
To drop all tables and reload all migrations:
php artisan migrate:fresh
Example 2: datetime-local laravel migration data type
public function getDateStartAttribute($value)
{
return Carbon::parse($value)->format('Y-m-d\TH:i');
}
public function getDateEndAttribute($value)
{
return Carbon::parse($value)->format('Y-m-d\TH:i');
}