Livewire encountered corrupt data when trying to hydrate the [admin.category.index] component. Ensure that the [name, id, data] of the Livewire component wasn't tampered with between requests. when i click on delete button it shows me this error
can you help me to fix this error sir? in my case i cant delete the data when i click delete button Livewire encountered corrupt data when trying to hydrate the [admin.category.index] component. Ensure that the [name, id, data] of the Livewire component wasn't tampered with between requests.
hi sir all thanks for your efforts . i have a question about livewire is it too important to include it in the project and what is its benefit ? best regards .
after 3 days of trying to figure this out, I went into CategoryFormRequest and realized that the form had required fields to fill in... ive been trying to speed through and only fill in the name ..... I added error messages this time because last time i saved and went to bed so i forgot they were required................
How solve this error : Livewire encountered corrupt data when trying to hydrate the [admin.category.index] component. Ensure that the [name, id, data] of the Livewire component wasn't tampered with between requests.
When trying to delete i get this error; Livewire encountered corrupt data when trying to hydrate the [admin.category.index] component. Ensure that the [name, id, data] of the Livewire component wasn't tampered with between requests.
hi sir ! pls tell me when i use dd() method it show me like this Unable to call component method. Public method [destroyCategory] not found on component: [admin.category.index] but when i use destroyCategory can't find out id
hello sir, can you help me? i got an error when i want to delete a data. "call to a member function delete() on null" specifically on the line $category = delete(); thanks in advance, sir.
for those who have problems with wire: click not working for show pop up modal to show id of data category make sure in the admin.blade.php file you place @livewireScripts above it worked for me
For me the Modal opens but hides (not dismissed) forever, then I can't do anything until I reload the page. The solution I finally found was to add wire:ignore.self to the first div of the modal. So that div starts like "
@@fundaofwebit i also use put in form and rout but still get 404 page Route::put('/ctaegory/{category}','update'); action="{{url('admin/category/'.$category->id)}}"
I really want to thank you for this awesome tutorial, Thank you so much. I have problem here and I need help: #31:00 it looks like the bootstrap modal is not closing after I follow what you did, can you tell me why ? I added stack script in app.blade.php below the livewirescripts @stack('script') and I included eventlistener in the livewire view "livewire/admin/category/index.blade.php" @push('script') window.addEventListener('close-modal', event => { $('#deleteModal').modal('hide'); }); @endpush I made sure that the id is same as in the modal id="deleteModal" and the button target is also the same data-bs-target="#deleteModal" I included the code for the dispatch in the Livewire class component in the destroyCategory method $this->dispatchBrowserEvent('close-modal'); can you tell me why it's not working for me ?? by the way I found solution for closing the modal, but I am not sure that's the right way to close the modal I added to delete button in the modal data-bs-dismiss="modal"
You need to check in developer tools, inpect and go to console / network and then see there is their any error or warning showing. So it is not able to close the modal.
@@fundaofwebit Hi, I checked the console and the network from browser dev tool in inspect, but I didn't find any warning or error that prevent from closing the modal
@@fundaofwebit It's looks like that I added the @stack('script') in the wrong blade instead I put it in admin.blade.php I put it in app.blade.php, my bad 😅 the funny thing I wrote it in my first comment but you didn't notice even 😅, anyway thanks for helping, can't wait for your tutorial laravel 10 ecommerce 🤍🤍
Hi Funda! I think that you've to change your intro words like: "Hey Guys! Welcome Back" except this say that "Hey Developer or Coders! Welcome Back" becasue everyone who watch your video is a programmer/Developer/Coder... Waiting for listening your changed intro words.......
Livewire encountered corrupt data when trying to hydrate the [admin.category.index] component. Ensure that the [name, id, data] of the Livewire component wasn't tampered with between requests.
In the controller findOrFail() is used. So, the id which you are finding is not correct then it will also give 404 error. use find() instead of findOrFail()
I have an error with closing the modal. It cannot be closed. Also, the page has this error in the console: Uncaught TypeError: $.cookie is not a function
404 means, some url you are trying to call it's not available. So, when you update it's going to some url, so please check is that url added or called in web.php correctly. Orelse, the id is not found
To use this link() in blade file. 1st you have to set paginate(5); at last in controller. 2nd thing, check atleast you have 5 records in your database table to show pagination in blade.php file. 3rd - if your pagination is not responsive, then goto AppServiceProvider.php file inside your app folder. And set the paginate bootstrap in boot function.
i think livewire is just adding another layer of complexity that we don't need, there is more redundant work i see for now, am not gonna keep up with livewire actually. Edit 1: now i see why we need livewire. Edit 2: You need to explain your steps, for example why you use [destroyCategory] at the form while you used deleteCategory in the button? why you need to declare category_id as public and which id it is? and [$this->category_id] reffers to what? Edit 3: Your tutorials are good but you need to support them with explanations. Now i have this error "Attempt to read property "img" on null"
for edit3: i think you must fix on livewire index.blade.php, maybe you forgot use #, so on the fix is $('#deleteModal').modal('hide'); Because before fix that, i got same error "Attempt to read property "img" on "null"". after fix the , no more error with delete action until now. CMIIW.
Hi sir, i'm getting error : Class 'illuminate\Support\Facades\File' not found, meanwhile i've use illuminate\Support\Facades\File at the top file Controller. How to solve it?
I am at the 7th Video of the Series. I have come across 1 major problem and 2 minor issues: 1st and major problem, where I am stuck at the moment is, in the 7th video, particularly during the update (CategoryController), I've done exactly as per the video. However, on clicking the update button, somehow I keep landing on 404 page and the url localhost/admin/category1. The code is suppose to redirect us to the admin/category (index), but for some reason it is not. 2nd is the pagination: I rewatched that video couple of times and rechecked my code. I did not miss a thing. But the pagination, although appearing, is not functional at all. Clicking on either of arrows or inactive numbers work. 3rd and final one is regarding css files and vender files: I noticed some images not showing on my page. I checked the admin.blade.php file again, everything was as per the video. So, I inspected the category page in the browser, and in the console tab: a) DevTools failed to load source map of both /admin/vendor/css/materialdesignicons.css.map and perfect-scrollbar.min.js.map. b) The error , "jQuery.Deferred exception: $.cookie is not a function TypeError: $.cookie is not a function" in template.js and vendor.bundle.base.js files. Can you help?
If anyone has this problem : Livewire encountered corrupt data when trying to hydrate the [admin.category.index] component. Ensure that the [name, id, data] of the Livewire component wasn't tampered with between requests. In Livewere\Admin\Category -> u need to have public $category_id !! Dont forget public and second important thinig is: public function deleteCategory($category_id) { // dd($category_id); $this->category_id = $category_id; // There is usually a mistake is bcs of $: $this->$category_id = $category_id; and u get that big error from top of my comment :D }
sir, I want to delete the data, but when I click delete data in the modal nothing happens. Instead it says "admin/category?" and even when i put dd() nothing happens
Livewire encountered corrupt data when trying to hydrate the [admin.category.index] component. Ensure that the [name, id, data] of the Livewire component wasn't tampered with between requests.
when i click on delete button it shows me this error
Actually, you don't need to add extra script to close modal. You can just add data-bs-dismiss="modal" to your "Yes. Delete" button.
thank you brother soved😋
Tanks man!!
Yes. Delete , didnt work
error with update 404, 17:41 when i change $category->id to a const as 1,2 or 3,... it's been run but use $category->id it's error. How to fix them
hello sir, can you help me?
when I click next the pagination results disappear, but appear when I refresh the page
can you help me to fix this error sir? in my case i cant delete the data when i click delete button Livewire encountered corrupt data when trying to hydrate the [admin.category.index] component. Ensure that the [name, id, data] of the Livewire component wasn't tampered with between requests.
hi sir all thanks for your efforts .
i have a question about livewire is it too important to include it in the project and what is its benefit ?
best regards .
when deleting with bootstrap and livewire, which works first, targetted modal or boostrap or livework funciton? how to test?
When I click Save after adding a new category it refreshes and nothing happens? It worked before though?
after 3 days of trying to figure this out, I went into CategoryFormRequest and realized that the form had required fields to fill in... ive been trying to speed through and only fill in the name ..... I added error messages this time because last time i saved and went to bed so i forgot they were required................
How solve this error :
Livewire encountered corrupt data when trying to hydrate the [admin.category.index] component. Ensure that the [name, id, data] of the Livewire component wasn't tampered with between requests.
Same here.
When trying to delete i get this error;
Livewire encountered corrupt data when trying to hydrate the [admin.category.index] component. Ensure that the [name, id, data] of the Livewire component wasn't tampered with between requests.
You are missing the public variable for the input request
@@fundaofwebit I misspelled when writing the public variable. Thank you!
@@fundaofwebit can you please tell me which public variable for the input request
Inside the livewire controller component.
@@fundaofwebit not understand. Can you explain in detail?
Very cool tutorial
hi sir ! pls tell me when i use dd() method it show me like this
Unable to call component method. Public method [destroyCategory] not found on component: [admin.category.index]
but when i use destroyCategory can't find out id
did you solve it because i have the same problem and i don’t know what to do ?
pagination 2 button not work because livewire scripts not indcluded on the page ???
I need your help
when i next page i have to refresh page to render data
do you solve it? i have same issue
wire:click is not working popup modal is not showing
Please share the visual studio extension, which you are using in this video
My update function is not working. It didn't show any error on the page, but the database table didn't update. Can anyone help?
I solved the problem. All I do was remove "$customer = new CustomerRecord;" this line of code at controller.
@@gardeniajagung thanks
Attempt to read property "image" on null error is occurred & $this->category_id is null in destoryCategory function
same
Watch full, I have given the solution.
@@fundaofwebit I watched all of it, yet couldn't solve it with your implementation, I solved it without using live wire, just by using the controller
thank you very much sir 7 video..
hello sir, can you help me?
i got an error when i want to delete a data.
"call to a member function delete() on null"
specifically on the line $category = delete();
thanks in advance, sir.
$category->delete()
@@fundaofwebit I've tried it, but it still doesn't work.. still in the same problem sir.. :(
You can get the $categoryId by passing in the url and find in the modal.
$category = Category::find($categoryId);
$category->delete();
@@fundaofwebit problem solved! there's typo when i typed on syntax it must be @script not @scripts thank you sir for ur help and ur fast response!! 😁
I am not able to pass category_id through wire:click method
Delete. please advice
me too
i have found it now. Wrap the entire html code with div in admin.category.index and remove the div from the parent component
for those who have problems with wire: click not working for show pop up modal to show id of data category
make sure in the admin.blade.php file you place @livewireScripts above
it worked for me
sir, I want to delete the data, but when I click delete data in the modal nothing happens. Instead it says "admin/category?"
Is that my id is not legible?
did you solve it because i have the same problem and i don’t know what to do ?
@@bogeyman137 did you solve this problem bro because I have the same error please answer me ?!
Same here, how to solve this problem?
@@fadelmu8759 you solve the problem?
When I delete the category, my page just shows blank. I need to refresh the page before the my records will show and category deleted. Please help!!!
public function destroyCategory()
{
$category = Category::find($this->category_id);
if ($category) {
$path = 'uploads/category/' . $category->image;
if (File::exists($path)) {
File::delete($path);
}
$category->delete();
session()->flash('message', 'Category Deleted');
}
return redirect()->to('admin/category');
}
Which extension to import class like you doing ? pls
PHP Namespace Resolver
Hello,
Can help me to resolve this problem : $category is undefined.
Thanks
For me the Modal opens but hides (not dismissed) forever, then I can't do anything until I reload the page. The solution I finally found was to add wire:ignore.self to the first div of the modal. So that div starts like "
to close delete modal after deleting category just use (data-bs-dismiss="modal") in the "yes delete" button the modal will disappear automatically
thanks
Do you have source code of this in github or your page?
How to fix Attempt to read property "image" on null?
you create in the top and the end of code put not put the in the end of model
when i push the update , show Error The Put Method is not supported for route/amin/category.Supported Method:GET,HEAD,POST
Change the url Route as put in web.php file
@@fundaofwebit already but get new problem , 404 not found sir
check the correct route and use in the form
@@fundaofwebit done sir, and now if i delete , get error " Attempt To read property "image" on null?
@@fundaofwebit i also use put in form and rout but still get 404 page
Route::put('/ctaegory/{category}','update');
action="{{url('admin/category/'.$category->id)}}"
I really want to thank you for this awesome tutorial, Thank you so much.
I have problem here and I need help:
#31:00
it looks like the bootstrap modal is not closing after I follow what you did, can you tell me why ?
I added stack script in app.blade.php below the livewirescripts
@stack('script')
and I included eventlistener in the livewire view "livewire/admin/category/index.blade.php"
@push('script')
window.addEventListener('close-modal', event => {
$('#deleteModal').modal('hide');
});
@endpush
I made sure that the id is same as in the modal id="deleteModal"
and the button target is also the same data-bs-target="#deleteModal"
I included the code for the dispatch in the Livewire class component in the destroyCategory method
$this->dispatchBrowserEvent('close-modal');
can you tell me why it's not working for me ??
by the way I found solution for closing the modal, but I am not sure that's the right way to close the modal
I added to delete button in the modal data-bs-dismiss="modal"
You need to check in developer tools, inpect and go to console / network and then see there is their any error or warning showing.
So it is not able to close the modal.
@@fundaofwebit Hi, I checked the console and the network from browser dev tool in inspect, but I didn't find any warning or error that prevent from closing the modal
@@fundaofwebit It's looks like that I added the @stack('script') in the wrong blade instead I put it in admin.blade.php I put it in app.blade.php, my bad 😅 the funny thing I wrote it in my first comment but you didn't notice even 😅, anyway thanks for helping, can't wait for your tutorial laravel 10 ecommerce 🤍🤍
Hi Funda! I think that you've to change your intro words like: "Hey Guys! Welcome Back" except this say that "Hey Developer or Coders! Welcome Back" becasue everyone who watch your video is a programmer/Developer/Coder... Waiting for listening your changed intro words.......
Livewire encountered corrupt data when trying to hydrate the [admin.category.index] component. Ensure that the [name, id, data] of the Livewire component wasn't tampered with between requests.
In the index controller make sure its public $category_id and also make sure its $this->category_id = $category_id in the delete category function
you can hidden the button yes delete only put data-bs-dismiss="modal"
When I press the update button it shows error 404 I already checked the route in web.php and its all correct. Can you please helped me?
In the controller findOrFail() is used.
So, the id which you are finding is not correct then it will also give 404 error.
use find() instead of findOrFail()
After I changed it to find() it shows this error : Attempt to assign property "name" on null
Okay.
return the id and see the id is correct or not.?
Once the id is correct, you will get all the data from it.
I'm sorry I'm still a newbie, how do I return the id? I already checked and my id is already correct but it still show the same error as the above
I already fix it. Apparently I have some typo that I didnt see at first.
my js cdn link is not working
what extension in vscode did you use?
php Namespace Resolver
I have an error with closing the modal.
It cannot be closed.
Also, the page has this error in the console:
Uncaught TypeError: $.cookie is not a function
did you solve it because i have the same problem and i don’t know what to do ?
When I pressed update button then show 404 | NOT FOUND. how to solve it?
404 means, some url you are trying to call it's not available.
So, when you update it's going to some url, so please check is that url added or called in web.php correctly.
Orelse, the id is not found
I have encountered the same problem as you. if you fix it, can you show me how to fix it?
do you already find the answer? I also encountered the same problem.
hey sir u can fix the problem? i get the same the problem :(
{{ $categories->links() }}
Please sir my pagination is not working in frontend please help me.
code and everything is correct but link is not working.
To use this link() in blade file.
1st you have to set paginate(5); at last in controller.
2nd thing, check atleast you have 5 records in your database table to show pagination in blade.php file.
3rd - if your pagination is not responsive, then goto AppServiceProvider.php file inside your app folder. And set the paginate bootstrap in boot function.
Nice sir
update btn direct me to 404 page any help please ?
did you resolve the problem?
"Syntax error , unexpected end of file"
And I'm using correct path
Please help
did you find a fix for this?
how to fix Attempt to read property "name" on string? pls
did you got the solution?
Attempt to read property "image" on null
HELP
I'm getting this
modal code
code
i think livewire is just adding another layer of complexity that we don't need, there is more redundant work i see for now, am not gonna keep up with livewire actually.
Edit 1:
now i see why we need livewire.
Edit 2:
You need to explain your steps, for example why you use [destroyCategory] at the form while you used deleteCategory in the button? why you need to declare category_id as public and which id it is? and [$this->category_id] reffers to what?
Edit 3:
Your tutorials are good but you need to support them with explanations. Now i have this error "Attempt to read property "img" on null"
for edit3: i think you must fix on livewire index.blade.php, maybe you forgot use #, so on the fix is $('#deleteModal').modal('hide');
Because before fix that, i got same error "Attempt to read property "img" on "null"".
after fix the , no more error with delete action until now.
CMIIW.
Hello Brother I'm From Bangladesh. How can I get your dashboard?
my popup is not working
nice
cool tutorial
livewire is just adding more complixity
my update function is not working
What is the error you are getting?
@@fundaofwebit it sorted now
thanks for asking
I have encountered the same problem as you. if you fix it, can you show me how to fix it?
how did you fix it please
Hi sir, i'm getting error : Class 'illuminate\Support\Facades\File' not found,
meanwhile i've use illuminate\Support\Facades\File at the top file Controller. How to solve it?
same problem
@@trixolian answer 20:35 minute
Were you able to solve the error? I haven't yet and I already put illuminate\Support\Facades\File'
why pagination is not working with me?😓
{{ $categories->links('pagination::bootstrap-5') }}
@@h.k7017 thanks
@@h.k7017 this worked thanks
@@h.k7017 thanks
Attempt to read property "image" on null
the answer 23:00 & 23:08 close Div at the end of the code
@@mngedhesso4387 no it's still not working
@@trixolian did you find the solution?
Make image column as NULL in database
modal code
code
I am at the 7th Video of the Series. I have come across 1 major problem and 2 minor issues:
1st and major problem, where I am stuck at the moment is, in the 7th video, particularly during the update (CategoryController), I've done exactly as per the video. However, on clicking the update button, somehow I keep landing on 404 page and the url localhost/admin/category1. The code is suppose to redirect us to the admin/category (index), but for some reason it is not.
2nd is the pagination: I rewatched that video couple of times and rechecked my code. I did not miss a thing. But the pagination, although appearing, is not functional at all. Clicking on either of arrows or inactive numbers work.
3rd and final one is regarding css files and vender files: I noticed some images not showing on my page. I checked the admin.blade.php file again, everything was as per the video. So, I inspected the category page in the browser, and in the console tab:
a) DevTools failed to load source map of both /admin/vendor/css/materialdesignicons.css.map and perfect-scrollbar.min.js.map.
b) The error , "jQuery.Deferred exception: $.cookie is not a function TypeError: $.cookie is not a function" in template.js and vendor.bundle.base.js files.
Can you help?
its like this: localhost:8000/admin/category/1 so, web.php category/{category}
I have encountered the same problem as you. if you fix it, can you show me how to fix it?
Do you fix the problem ???
these codes are not working
@push('script')
window.addEventListener('close-modal', event => {
$('#deleteModal').modal('hide');
});
@endpush
Add @stack('script') in your extended file, so push('script') will work.
@@fundaofwebit please see Instagram
@@h.k7017
window.addEventListener('close-modal', event => {
$("#deleteModal").modal('hide');
})
work for me
delete class="modal fade" = class="modal"
If anyone has this problem :
Livewire encountered corrupt data when trying to hydrate the [admin.category.index] component. Ensure that the [name, id, data] of the Livewire component wasn't tampered with between requests.
In Livewere\Admin\Category -> u need to have public $category_id !! Dont forget public
and second important thinig is:
public function deleteCategory($category_id)
{
// dd($category_id);
$this->category_id = $category_id; // There is usually a mistake is bcs of $: $this->$category_id = $category_id; and u get that big error from top of my comment :D
}
Same here.
@@indobloger1817 I wrote in the comment above a possible solution and a problem.
thanks dude
when I delete the category shows Trying to get the property 'image' of non-object how can I solve it?
same problem. Did you resolve it?
sir, I want to delete the data, but when I click delete data in the modal nothing happens. Instead it says "admin/category?"
and even when i put dd() nothing happens
same here
@@12td12 what do you mean sir? I have the same problem
can you solve the problme? @bogey man
Did you fix this ?
when I click the delete button the blank application doesn't appear. what's wrong with that?
Have you resolved this?
Attempt to read property "image" on null
its not working on my end
Go to database on its table and select image column and click on change and then make it as NULL.
@@fundaofwebit but its null already
Then try to use if condition display image.
@if($yourData->image ! = '')
Show image
sir, I want to delete the data, but when I click delete data in the modal nothing happens. Instead it says "admin/category?"
@Funda of Web IT