Below query using DB::table is for deleting records from a table using join with other table
1 2 3 4 5 6 |
public static function deleteQuestion($type){ DB::table('tbl_question') ->leftJoin('tbl_subject', 'tbl_subject.subject_id', '=', 'tbl_question.subject_id') ->where('tbl_subject.type', $type) ->delete(); } |