What do you want to save?
Add Code snippet
New code examples
-
PHP 2021-11-21 04:41:18
laravel select subquery
In addition to @delmadord's answer and your comments: Currently there is no method to create subquery in FROM clause, so you need to manually use raw statement, then, if necessary, you will merge all the bindings: $sub = Abc::where(..)->groupBy(..); ... Add solution -
SQL 2021-09-29 14:27:02
how to insert multiple rows in mysql using laravel
/* It is really easy to do a bulk insert in Laravel with or without the query builder. You can use the following official approach. */ Entity::upsert([ ['name' => 'Pierre Yem Mback', 'city' => 'Eseka', 'salary' => 10000000], ['name' =&g... Add solution -
PHP 2021-08-27 14:30:01
how to insert multiple data at a time with create method in laravel
$data = [ ['user_id'=>'Coder 1', 'subject_id'=> 4096], ['user_id'=>'Coder 2', 'subject_id'=> 2048], //... ]; Model::insert($data); // Eloquent approach DB::table('table')->insert($data); // Query Builder approach Add solution
Best helpers
Ranking is empty