Fixed routing and backend to staff section

This commit is contained in:
Anders
2020-06-29 12:29:23 +02:00
parent 97af5273be
commit 600bbe7746
4 changed files with 67 additions and 23 deletions
+36 -1
View File
@@ -3,8 +3,43 @@
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\Notifiable;
use Illuminate\Support\Facades\Hash;
use Spatie\Permission\Traits\HasRoles;
class Staff extends Model
{
//
use Notifiable;
use HasRoles;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name_first', "name_last", 'email', 'password', "phone"
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password', 'remember_token',
];
/**
* The attributes that should be cast to native types.
*
* @var array
*/
protected $casts = [
'email_verified_at' => 'datetime',
];
public function setPasswordAttribute($password) {
$this->attributes["password"] = Hash::make($password);
}
}