Clarity Posted September 26, 2022 Posted September 26, 2022 Hello everyone! Can you please tell me how to save a page after other page becomes hidden? Something like: $wire->addHookAfter('Pages::hide', function($event) { if(wire()->page->id == $event->arguments('page')->id) { wire()->pages->find('selector for page')->save(); } }); But Pages::hide won't work because class Pages doesn't have such a method. Which method of which class should I use?
zoeck Posted September 26, 2022 Posted September 26, 2022 I think the statusChanged hook is the right one for this ? (or statusChangeReady) Then check if the status is changed to hidden... 2 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now