Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel log query for model

public function show(Order $order){
    DB::connection()->enableQueryLog();
    $data = $order->all();
    $queries = DB::getQueryLog();
    return dd($queries);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #laravel #log #query #model
ADD COMMENT
Topic
Name
4+5 =