Tuesday, 13 April 2021

Laravel DB Eloquent Raw Insert

 https://laravel.com/docs/5.0/database


$results = DB::select('select * from users where id = :id', ['id' => 1]);

Running An Insert Statement

DB::insert('insert into users (id, name) values (?, ?)', [1, 'Dayle']);

No comments:

Post a Comment