Jump to content

How to save a page after other page becomes hidden?


Clarity
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...