'datetime', ]; public function setPasswordAttribute($password) { $this->attributes['password'] = bcrypt($password); } public function accessLevel() { if (auth()->user() != null && auth()->user()->fireStationID != null) if ($this->functionID == 1 or $this->functionID == 5) //prezes lub naczelnik return 50; elseif ($this->functionID == 3) //skarbnik return 30; elseif($this->functionID == 4) //sekretarz return 20; else return 0; //brak specjalnych uprawnieĊ„ else return -1; //jednostka nie istnieje } }