Hello folks,
i am trying to call another function inside the same controller, but its not working at all:
public function checkEditProfile()
{
if (Input::has('save'))
{
$this->doEditProfile();
}
}
public function doEditProfile()
{
return Redirect::to('backend/main');
}
if i try it that way, i does work:
public function checkEditProfile()
{
if (Input::has('save'))
{
return Redirect::to('backend/main');
}
}
And the questionis... why?! :D
Solved by myselfe, but i thought someone might need this:
return $this->doEditProfile();
was the solution... i guess its because its a function, thats why i have to "return" something.
Is there an explanation as to why this...
return $this->doEditProfile();
...works in one controller, while this...
$this->doEditProfile();
...works in another controller?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community