In this video we are going to learn about how to Delete Category.
So let see how can we delete category.
Go to the AdminCategoryComponent.php Class File
And lets create a method for deleting the category

public function deleteCategory($id)
$category = Category::find($id);
session()->flash('message','Category has been deleted successfully!');

Now go to the admin-category-component.blade.php view file.
And here lets create a link for delete the category.

<a href=\"#\" wire:click.prevent=\"deleteCategory({{$category->id}})\"><i class=\"fa fa-times fa-2x text-danger\" style=\"margin-left:10px;\"></i></a>

Now save this file and lets check it.
Switch to the browser and refresh the page.
Now click on delete link.
And here you can see the category has been deleted successfully.
So in this way you can delete category so that's all about Deleting category.