I have the following route:
Route::get('{organisation}', 'Organisation\HomeController@index');
Now I need {organisation} in the AppServiceProvider my code there is as follows:
view()->composer('organisation.layout', function($view) {
$view->with('categories', CategoryHelper::getCategoriesByOrganisation($organisation));
});
$organisation has to become the route parameter. I need to have categories available in the view all the time.
I've tried with Input::get('organisation');
but no luck.
Is this the best approach? If yes, how do I get the route parameter?