InterviewSolution
| 1. |
How to enable query log in laravel 5? |
|
Answer» Our FIRST step should be DB::connection()->enableQueryLog(); After our query it should be placed $querylog = DB::getQueryLog(); After that it SHOU;ld be placed dd($querylog) ExampleDB::connection()->enableQueryLog(); $result = User:where(['status' => 1])->get(); $log = DB::getQueryLog(); dd($log); 4. What is Laravel 5?Laravel 5 is an advanced version of Laravel. It is more structured and secure. It also offers rich functionalities that include the essential FEATURES of PHP frameworks and other programming languages. Laravel 5 got released in February 2015. Like its previous versions, even Laravel 5 has a rich set of features that will boost the speed of your WEB development. |
|