Laravel: get latest insert id from query builder
I am new to laravel and am trying to get the last inserted id from this request:
DB::select("INSERT INTO current_survey (`name`, `created_by`, `description`) SELECT `name`, `created_by`, `description` FROM survey WHERE id=survey_id");
this query works well, can anyone suggest me how this is possible in laravel?
thank
+3
source to share