Laravel Livewire Crud - Part 04 (Delete Data)
Hello friends, today in this blog you’ll learn how to delete data with laravel livewire crud operation in a very simple way.
Laravel Livewire is a library that makes it simple to build modern, reactive, dynamic interfaces using Laravel Blade as your templating language. This is a great stack to choose if you want to build an application that is dynamic and reactive but don't feel comfortable jumping into a full JavaScript framework like Vue.
Now, lets see how we can delete data with laravel livewire crud operation in a very simple way.
You can also check our video tutorial about how to delete data in laravel livewire crud operation.
Video Tutorial of Laravel Livewire Crud - Delete Data
Check pevious parts,
1. Laravel Livewire Crud - Part 01 (Add Data to Database)
2. Laravel Livewire Crud - Part 02 (Get Data from Database)
3. Laravel Livewire Crud - Part 03 (Edit Data)
Step 01: Add Delete Button
go to resources/views/livewire and open index.blade.php file and add this code for creating delete button,
<a href="javascript:void(0)" wire:click="delete({{ $student->id }})" class="btn btn-sm btn-danger" style="padding: 1px 8px;">Delete</a>
Comments (1)
hi! thanks a lot! my team is doing a capstone project requirement for graduating students like me. It will help a lot since I tried to look for understandable tutorial online and I found your works! <3 Thanks and please keep it up!
Leave a Comment
You need to login to post a comment
Login to Comment