insert query in laravel code example
Example 1: laravel insert
DB::table('users')->insert([
'email' => '[email protected]',
'votes' => 0
]);
Example 2: laravel select count
$count = DB::table('category_issue')->count();
Example 3: DB::table('users')->get();
DB::select('SELECT * FROM users WHERE name = "'.Input::get('name').'"');
Example 4: laravel having
$users = DB::table('users')
->groupBy('account_id')
->having('account_id', '>', 100)
->get();