/Applications/MAMP/Library/bin/mysql --host=localhost -uroot -proot
Or
mysqld -u root -p
\DB::enableQueryLog(); | |
$all = TrainingDetail::event() | |
->with(['student' => function($query) use($request) { | |
$query->where('myb_fullname', 'LIKE', '%'.$request->search.'%'); | |
$query->groupBy('id'); | |
}]) | |
->with(['teacher' => function($query) use($request) { | |
$query->where('myb_fullname', 'LIKE', '%'.$request->search.'%'); | |
$query->groupBy('id'); | |
}]) |