Full Stack LAMP - MEAN Developer, Python developer. Certified Azure Developer. Freelance programmer/consultant/trainer.

Month: June 2015

Injecting data With Blade

// 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(); }} I hope

Named Route Groups

Route::get('admin/home',['as' => 'home',function(){ echo 'admin home'; }]); // view echo route('home'); // output : http://localhost/admin/home Route::group(['prefix' => 'admin'],function(){ Route::get('home',['as' => 'home',function(){ echo 'admin home'; }]);