12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Model;
- class Role extends Model
- {
- protected $fillable = ['name','permissions','desc','disable'];
- protected $hidden = [];
-
-
- public function getJWTIdentifier()
- {
- return $this->getKey();
- }
-
- public function getJWTCustomClaims()
- {
- return [];
- }
-
- protected $table = "roles";
-
- protected $primaryKey = "id";
-
- public function admin()
- {
- return $this->belongsTo('App\Admin','id','role_id');
- }
- }
|