dimanche 24 avril 2016

Laravel - View composer with controller method?

Is there a way to return the response of a controller method in a view composer function? This is currently returning a string, the namespace.

view()->composer('tasks.partial.tasksummary', function($view)
{
    $view->with('taskload', 'App\Http\Controllers\TaskController@taskLoad');
});

or... would it be better to just inject the method in my partial directly (via @inject('..'))?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire