Add SoftDeletes feature to User model.

This commit is contained in:
Leonid Nikitin 2023-06-28 23:05:31 +06:00
parent fcf7cfa584
commit cf449eb8e2
Signed by: kor-elf
GPG Key ID: 7DE8F80C5CEC2C0D
2 changed files with 3 additions and 1 deletions

View File

@ -4,13 +4,14 @@ namespace App\Models;
// use Illuminate\Contracts\Auth\MustVerifyEmail; // use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable; use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens; use Laravel\Sanctum\HasApiTokens;
class User extends Authenticatable class User extends Authenticatable
{ {
use HasApiTokens, HasFactory, Notifiable; use HasApiTokens, HasFactory, Notifiable, SoftDeletes;
/** /**
* The attributes that are mass assignable. * The attributes that are mass assignable.

View File

@ -19,6 +19,7 @@ return new class extends Migration
$table->string('password'); $table->string('password');
$table->rememberToken(); $table->rememberToken();
$table->timestamps(); $table->timestamps();
$table->softDeletes();
}); });
} }