php artisan route:list
in index.php you have
{{ route('products.remove') }} // wrong
but should be
{{ route('products.destroy') }} // correct
to clear route cache
php artisan route:clear
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi, I have created a new laravel5.7 project. I have created a new controller named ProductController.php with all product actions functions.
Also created a a route in web.php as Route::resource('products','ProductController');
Created these blades under resources/views/products 1. layout 2. index 3. create 4. edit 5. remove and 6. show.
In the index.blade.php I have these three links for 1. show 2. edit 3. Delete like below.
When I add the last link for Delete I am getting this error - "Route [products.remove] not defined. (View: /opt/lampp/htdocs/test1/resources/views/products/index.blade.php)
I have checked the php artisan route:list and its not showing the remove in the list. I have cleared all cache too.
I am new to Laravel and unable to rectify the issue. Can someone please help me on this? Thanks in advance.
Actually I need to show a confirmation pop up for delete the record. So I created this blade remove.blade.php. When user clicks on this link
It should open a pop up window (remove.blade.php). My remove.blade.php html is like below.
@extends('products.layout')
@section('content') @csrf @method('PUT')
<div class="row">
Are you sure, Do you want to delete this record?
<div class="col-xs-12 col-sm-12 col-md-12 text-center">
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</div>
</form>
When the user submits the button only the record should be deleted. For this functionality I have created the delete as a link in the index.blade.php and am getting the error.
Please or to participate in this conversation.