Laravel delete query example


DB::table(‘table_name’)->where(‘column_name’, ‘=’, value)->delete(); is used to delete records from table in laravel.


Laravel delete query example with Syntax

Below is the simple Laravel Delete query Example

DB::table('users')->where('id', '=', 66)->delete();

Will delete the record where id is 66.


Advertisements

Add Comment

📖 Read More