laravel instantiate model query code example
Example 1: laravel update from query
$affected = DB::table('users')
->where('id', 1)
->update(['votes' => 1]);
Example 2: create new record via model in laravel
$userData = array('username' => 'Me', 'email' => 'me@yahoo.com');
User::create($userData);