delete method in laravel code example
Example 1: laravel delete where
DB::table('users')->where('id', $id)->delete();
Example 2: laravel form method delete
// Blade
@method('delete')
// Html
<input type="hidden" name="_method" value="delete">
DB::table('users')->where('id', $id)->delete();
// Blade
@method('delete')
// Html
<input type="hidden" name="_method" value="delete">