laravel 5.8 delete/destroy id from database

Posted 1 month ago by PaulCatalin97

how can be done? i can`t find any solution on documentation.

this is the controller

public function destroy ($id)
        return redirect()->route('listajoburi.update');

this is the button

<a href="{{route('listajoburi.destroy',$row['id'])}}" class="btn btn-danger">Delete</a>
                            <form method="post" class="delete_form" action="{{route('listajoburi.destroy',$row['id'])}}">
                                <input type="hidden" name="_token" value="@csrf">

and this is the route

Route::post('/listajoburi/{id}/', 'Auth\[email protected]')->name('listajoburi.destroy');

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.