I'm relatively new to the laravel framework and i noticed a pretty disturbing issue with laravel controllers. I dont know if its me but it doesnt seem to work at all. Lets say i have a controller and i want to split the logic contained in the method called when the request hits a route tied to the controller.
class SomeController extends BaseController
{
function doSomething()
{
$this->doSomethingExtra();
}
function doSomethingExtra()
{
return "Something Extra Done";
}
}
And lets say a have to route defined like so
Route::get('main/dashboard','SomeController@doSomething');
the second method called from the first never returns the string "Something Extra Done" to the browser. infact it returns an empty 200 response. However this seems to work when you return response from the doSomething() as usual. Anyone know why this is behaving this way? is there anyway to breakup a controller logic into several Methods that actually return responses to the client?