Permanently delete a record in laravel

You can permanently delete a record in laravel using forceDelete() method. If you want to delete the record after the soft delete then you can also use the forceDelete method.

Answers 1
  • ForceDelete() in laravel

    --PATH routes\web.php
    Route::get('/force-delete-user', function(){
        $user = App\Models\User::find(1);
        $deleteUser = $user->forceDelete();
    Output :
    ^ true
    forceDelete() method permanently deletes the records from the table.
  • Back to code snippet queries related laravel