We will continue previous Laravel 8 - CRUD basic steps (Livewire and Tailwind) tutorial. But this time, we will try to make our CRUD more advanced...
For further actions, you may consider blocking this person and/or reporting abuse
Nice tutorial, two issues:
And about deleting problem.
Your javascript and style code has to be between tags:
@push('scripts') and @endpush
@push('styles') ... @endpush
Please check my previous tutorial:
dev.to/dariusdauskurdis/laravel-8-...
Thank you for your comment. I wanted to make this CRUD smaller as possible, with less fields. This field "NO" is not necessary, I forgot to remove from my example.
github.com/Schrijvers123/crud can de code be found as far a I have it (with the error described above).
About the delete function that was not working, on app.blade.php file, we have to put @stack('scripts') tag after the @livewireScripts tag.
Check the source code of the page for the changes and the code for delete have to be after the Livewire javascript code.
This will reset all public props.
initializing-properties
Thanks for the tutorial, I have followed the two parts, Delete button not working, I don't know if something is wrong with the javascript code, but I see in the console, can you think about what is causing the issue?
Thanks anyway.
Error message:
index.js:31 Uncaught TypeError: Cannot read property '$wire' of undefined
at Livewire.value (index.js:31)
at HTMLDocument. (companies:438)
value @ index.js:31
(anonymous) @ companies:438
@if (count($companies)>0) ?
@if ($companies)
In my case will not work, because "@if ($companies)" means if variable $companies is not null, but my is not null, it is empty.
I am looking for one with 1-M relationships. It seems there are no tuts for such. Anyone who cares to share such tutorial, e.g. one that inlcudes selection field in the form.
Thanks, Can you share source code?
Mr. Arjen Schrijvers has good example for you github.com/Schrijvers123/crud
But in general you need to follow Laravel documentation how to install Laravel and then follow my steps how to create CRUD, just copy and paste code in few files.
Someday I try to upload several images and dont work like the oficial documentación say
Do you mean upload image in CRUD?