mirror of https://github.com/MarceauKa/shaark.git
33 lines
553 B
PHP
33 lines
553 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
|
use Illuminate\Notifications\Notifiable;
|
|
use Illuminate\Support\Str;
|
|
|
|
class User extends Authenticatable
|
|
{
|
|
use Notifiable;
|
|
|
|
protected $fillable = [
|
|
'name',
|
|
'email',
|
|
'password',
|
|
];
|
|
|
|
protected $hidden = [
|
|
'password',
|
|
'remember_token',
|
|
];
|
|
|
|
protected $casts = [
|
|
'email_verified_at' => 'datetime',
|
|
];
|
|
|
|
public static function generateApiToken(): string
|
|
{
|
|
return Str::random(128);
|
|
}
|
|
}
|