Edit File: Admin.php
<?php namespace App\Models; use App\Traits\ModelTrait; use Illuminate\Database\Eloquent\Relations\BelongsTo; class Admin extends AuthBaseModel { use ModelTrait; const IMAGEPATH = 'admins'; protected $fillable = [ 'name', 'phone', 'email', 'password', 'image', 'role_id', 'is_notify', 'is_blocked', 'type', ]; protected $casts = [ 'is_notify' => 'boolean', 'is_blocked' => 'boolean', ]; /** * Get the role that owns the Admin * * @return BelongsTo */ public function role() : BelongsTo { return $this->belongsTo(Role::class)->withTrashed(); } }
Back to File Manager