diff --git a/app/Models/User.php b/app/Models/User.php index f47c02a..13d9221 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -4,12 +4,13 @@ namespace App\Models; use Illuminate\Contracts\Auth\MustVerifyEmail; use Illuminate\Database\Eloquent\Factories\HasFactory; +use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Notifications\Notifiable; class User extends Authenticatable { - use HasFactory, Notifiable; + use HasFactory, Notifiable, SoftDeletes; /** * The attributes that are mass assignable. diff --git a/database/migrations/2021_07_13_181438_add_softdelete_to_users_table.php b/database/migrations/2021_07_13_181438_add_softdelete_to_users_table.php new file mode 100644 index 0000000..58e8914 --- /dev/null +++ b/database/migrations/2021_07_13_181438_add_softdelete_to_users_table.php @@ -0,0 +1,22 @@ +dropUnique(['username']); + $table->dropUnique(['discord_id']); + $table->softDeletes(); + }); + } +}