Added the ability to save user settings.

This commit is contained in:
2023-07-10 21:42:55 +06:00
parent b1c9dac3cc
commit 907bac5586
17 changed files with 278 additions and 8 deletions

View File

@@ -3,6 +3,7 @@
namespace App\Models;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
use App\Enums\Lang;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\SoftDeletes;
@@ -34,7 +35,7 @@ final class User extends Authenticatable
'password',
'timezone',
'is_active',
'locale',
'lang',
];
/**
@@ -54,7 +55,8 @@ final class User extends Authenticatable
*/
protected $casts = [
'email_verified_at' => 'datetime',
'is_active' => 'boolean'
'is_active' => 'boolean',
'lang' => Lang::class,
];
/**