insert query in laravel
snippet in php

insert query in laravel

user4963

$values = array('id' => 1,'name' => 'Dayle');
DB::table('users')->insert($values);

DB::table('users')->get();

user1046

DB::select('SELECT * FROM users WHERE name = "'.Input::get('name').'"');

laravel db inserr

user9849

DB::table('users')->insert([
    'email' => 'kayla@example.com',
    'votes' => 0
]);

laravel select count

user4257

$count = DB::table('category_issue')->count();

laravel having

user3269

$users = DB::table('users')
                ->groupBy('account_id')
                ->having('account_id', '>', 100)
                ->get();