Experiencing odd behaviour with custom Actions
Hi,
I have a small application where the user can design email templates and publish them. Once published, the email templates can be used in other parts of the application.
Therefore I wrote to actions: publish and unpublish Email.
This is the code for the publish action:
The unpublish action is similar, except
The table function from the resource:
The Problem is, that it seems that as soon as I publish an email template, the state is preserved.
I published the last email template, and when I click on another entry, the unpublish action is visible and all custom actions refer still to the first published item.
What am I doing wrong?
Thank you!
Edit: I have forgotten the second screenshot:
I have a small application where the user can design email templates and publish them. Once published, the email templates can be used in other parts of the application.
Therefore I wrote to actions: publish and unpublish Email.
This is the code for the publish action:
The unpublish action is similar, except
MailServiceProvider::publishMailTemplate. The table function from the resource:
The Problem is, that it seems that as soon as I publish an email template, the state is preserved.
I published the last email template, and when I click on another entry, the unpublish action is visible and all custom actions refer still to the first published item.
What am I doing wrong?
Thank you!
Edit: I have forgotten the second screenshot:

