Categories
Laravel Code Snippets

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 create a console command.

Categories
Laravel Code Snippets

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 from your terminal, make sure to be in application root while issuing command.

Categories
Laravel Code Snippets

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. So you have to enable it first.To enable you need to call DB::connection()->enableQueryLog();

Categories
Laravel Code Snippets

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.

Categories
Laravel Code Snippets

Injecting data With Blade

or

Categories
Laravel Code Snippets

Named Route Groups

Categories
Laravel Code Snippets

Get table column names as array from Eloquent model

Categories
Laravel Code Snippets

Show All Validation Errors in Laravel’s Blade View