Skip to content

Instantly share code, notes, and snippets.

@wzulfikar

wzulfikar/l5-common

Last active Dec 5, 2015
Embed
What would you like to do?
things i used commonly in laravel
# generate migration file and use `tasks` as table name
php artisan make:migration create_tasks_table --create=tasks
# `migrate` what we defined in migration file to database
php artisan migrate
# Display all SQL executed in Eloquent
Event::listen('illuminate.query', function($query){
var_dump($query);
});
# enable query log
DB::connection()->enableQueryLog();
DB::getQueryLog();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment