role->contains('name', $role)) return true; } return false; } public function role() { return $this->belongsTo(Role::class); } public function headteacher() { return $this->hasOne(HeadTeacher::class); } // public function makeToken(bool $remember) // { // $token = $this->createToken(config('app.name')); // $token->token->expires_at = $remember ? Carbon::now()->addMonth() : Carbon::now()->addDay(); // $token->token->save(); // return $token; // } }