Viewing file: User.php (1.37 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
namespace App\Models;
use Illuminate\Auth\Authenticatable; use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract; use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Laravel\Lumen\Auth\Authorizable; use Tymon\JWTAuth\Contracts\JWTSubject;
class User extends Model implements AuthenticatableContract, AuthorizableContract, JWTSubject { use Authenticatable, Authorizable, HasFactory;
/** * The attributes that are mass assignable. * * @var string[] */ protected $table="vendors"; protected $fillable =['id','first_name','last_name','phone','email','password','active',"image_folder",'image','verified'];
// protected $fillable = [ // 'name', 'phone', // ];
/** * The attributes excluded from the model's JSON form. * * @var string[] */ protected $hidden = [ 'password', ]; /** * * Retrieve the identifier for the JWT key. * * @return mixed */ public function getJWTIdentifier() { return $this->getKey(); } /** * Return a key value array, containing any custom claims to be added to the JWT. * * @return array */ public function getJWTCustomClaims() { return []; } }
|