We can send On Demand Notifications using the Notification facade using an only email address. This is feature is available since Laravel 5.5 and above.
Leave a CommentCategory: Laravel Code Snippets
This is useful for migrations when you can’t rollback. It can easily be run in artisan mode or you can create a console command. foreach(\DB::select(‘SHOW…
Leave a CommentYou can use laravel’s artisan command to check currently installed version of Laravel Framework Version of Laravel Issue below command from your terminal, make sure…
Leave a CommentYou can use getQueryLog() method to get most recently executed queries. But in Laravel 5.1 it is disabled by default. So you have to enable…
Leave a CommentHere is the simple code snippet to get all the tables under the database in laravel framework. $tables = DB::select(‘SHOW TABLES’); dd($tables);
Leave a Comment// 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 CommentRoute::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’; }]);…
Leave a Commentclass NewMediaModel extends Model { public function getTableColumns() { return $this->getConnection()->getSchemaBuilder()->getColumnListing($this->getTable()); } }
1 Comment@if($errors->has()) @foreach ($errors->all() as $error) {{ $error }} @endforeach @endif
Leave a Comment