I have an AccountType model which is related to the user table.
public function users()
{
return $this->hasMany('App\User','account_type_id');
}
We have build the website based on the AccountType with data like (Normal User, Editor, Admin) and now we want to add a new type as SuperAdmin which is for the site admin. But we dont want that account type to be displayed where the AccountType::all() code is called and also in the users search result. We have used the all() function in most of the places so we don't want to change it everywhere. is there a way to override the default function only for this AccountType model
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1UaBCFc
via IFTTT
Aucun commentaire:
Enregistrer un commentaire