Insert Query in Laravel 5

The query builder also provides an insert method for inserting records into the database table. The insert method accepts an array of column names and values.

Insert query work with ajax, form to pass the get and post method.

$responce = DB::table('hold_history')->insert(
    ['loat_no' => $hold, 
     'hold_for' => $username,
     'on_hold_by' => $id,
     'date' => $date,
     'status' => '1'

Leave a Reply

Your email address will not be published. Required fields are marked *