Softdeletes миграции Laravel Migration
$ php artisan make:migration add_soft_deletes_to_user_table --table="users"}
Tiago F2
$ php artisan make:migration add_soft_deletes_to_user_table --table="users"}
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
Schema::table('flights', function (Blueprint $table) {
$table->softDeletes();
});
Schema::table('flights', function (Blueprint $table) {
$table->dropSoftDeletes();
});
use Illuminate\Database\Eloquent\SoftDeletes;class User extends Model {use SoftDeletes; protected $dates = ['deleted_at'];}
>>> $test->forceDelete();
=> true