Laravel Notification - notify using only email address

Laravel Notification - notify using only email address

We can send On Demand Notifications using the Notification facade using an only email address. This is feature is available...

Laravel Code Snippets - 4 months ago

Laravel Drop all tables

Laravel Drop all tables

This is useful for migrations when you can't rollback. It can easily be run in artisan mode or you can...

Laravel Code Snippets - 10 months ago

How to check current installed version of Laravel ?

How to check current installed version of Laravel ?

You can use laravel's artisan command to check currently installed version of Laravel Framework Version of Laravel Issue below command...

Laravel Code Snippets - 3 years ago

Last executed queries in Laravel5

Last executed queries in Laravel5

You can use getQueryLog() method to get most recently executed queries. But in Laravel 5.1 it is disabled by default....

Laravel Code Snippets - 4 years ago

Getting all tables inside a database using Laravel

Getting all tables inside a database using Laravel

Here is the simple code snippet to get all the tables under the database in laravel framework. $tables = DB::select('SHOW...

Laravel Code Snippets - 5 years ago

Injecting data With Blade

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 :...

Laravel Code Snippets - 5 years ago

Named Route Groups

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' =>...

Laravel Code Snippets - 5 years ago

Get table column names as array from Eloquent model

Get table column names as array from Eloquent model

class NewMediaModel extends Model { public function getTableColumns() { return $this->getConnection()->getSchemaBuilder()->getColumnListing($this->getTable()); } }

Laravel Code Snippets - 5 years ago

Show All Validation Errors in Laravel's Blade View

Show All Validation Errors in Laravel's Blade View

@if($errors->has()) @foreach ($errors->all() as $error) {{ $error }} @endforeach @endif

Laravel Code Snippets - 5 years ago