Laravel snippets

 

Laravel – get last query:

$queries = DB::getQueryLog();
$last_query = end($queries);
var_dump($last_query);
Echo the version of the current Laravel version in PHP:
$laravel = app();
echo $version = $laravel::VERSION;

 

B logbook : PHP | Javascript | Laravel | CodeIgniter | VueJs | ReactJs | WordPress