Hi!
I have a problem with this code in hosting shared, but works fine in localhost.
this function return true if user is active
public function isActive(){
return $this->active === 1;
}
then the controller checks if the user is active, but doesn't works, always return false
if ($user->isActive())
Any idea?
Thanks!
Say dd($user->toArray())
before the if ($user->isActive())
and paste here what it prints.
array:6 [▼
"id" => "25"
"user_name" => "martin"
"level" => "2"
"active" => "1"
"created_at" => "2015-11-26 23:52:37"
"updated_at" => "2016-06-21 18:37:19"
]
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community