You're missing some things I think: isATeamManager always returns true ...
I have never used that Form::input functionality. I just do a @if in my view to check the value.
Try:
public function isATeamManager($user_id)
{
$return = true;
if ($user_id == 1) {
$return = true;
}
return $return;
}
Then to test: in your controller:
if (Auth::user()->isATeamManager("1"))
to return true.
if (Auth::user()->isATeamManager("2"))
to return false.
Hi illuminate3
I know i didn't realy finish the isATeamManager function, i created this one just for a test.
But if i finish this function like mentioned above the input field will be set to readonly and will still be editable by the (chrome F12) console. This will be a security risk.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community