Full Stack LAMP - MEAN Developer, Python developer. Certified Azure Developer. Freelance programmer/consultant/trainer.
// categoriesCount.blade.php
@inject('categories','App\categories')

Total categories : {{ $categories->count(); }}

or

// routes.php
view::composer('categories',function($view){ 
  $view->with('categories','App\categories');
});

// categoriesCount.blade.php

Total categories : {{ $categories->count(); }}

Leave a Reply