I am using using Laravel 5.2 binding data to a partial view. I receive the following error "Object of class Illuminate\View\View could not be converted to int" with this code in the appServiceProvider boot method:
// binding data to a partial view
view()->composer('partials.nav', function($view)
{
$view-with('latest', Article::latest()->first());
});
Any thoughts on how I received this error and how I can solve this problem. Any assistance would be greatly appreciated.I'm at the home stretch of these fundamentals :)
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire