Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
In the normal way - no way.
Make one home method and, depending on the role, call one or another method in it.
You want the wrong thing, call the same method, and already in it pull the one you need based on the role
public function home() {
$role = Auth::user()->role;
$method = 'role' . $role;
$this->{$method}();
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question