12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <?php
- namespace App\Models;
- use Tymon\JWTAuth\Contracts\JWTSubject;
- use Illuminate\Notifications\Notifiable;
- use Illuminate\Database\Eloquent\SoftDeletes;
- use Illuminate\Foundation\Auth\User as Authuser;
- class Admin extends Authuser implements JWTSubject
- {
- use Notifiable;
- use SoftDeletes;
- protected $fillable = ['name','password','role_id','status','mobile'];
- protected $hidden = ['password'];
-
-
- public function getJWTIdentifier()
- {
- return $this->getKey();
- }
-
- public function getJWTCustomClaims()
- {
- return [];
- }
-
- protected $table = "admins";
-
- protected $primaryKey = "id";
-
- public function role()
- {
- return $this->hasOne('App\Models\Role','id','role_id');
- }
- }
|