Method name

Can anyone please explain what names are allowed (and what are not) for creating actions. I have a project in which I need to create many custom actions. I have wasted a lot of time trying to figure out this. Thanks in advance for any help.
Solution:
Does the method name still match the action name?
Jump to solution
6 Replies
toeknee
toeknee3w ago
Any are allowed... but not if they are being used already on the page? So ensure the action would be unique is all
Anish
AnishOP3w ago
Somehow it is not working with some names. For example I have a Action which is used for deleting CSV files stored in the storage disk. I copied the deleteAction code in the documentation and modified it for my case and worked. But I wanted to change destroyCSVAction and suddenly the it stopped working. There was no other change, only the name of the method and the place whare it was included in the blade. I changed back and it started working again. So something is there. In the documentation, some cryptic lines are included, something will work and something will not work. But it is not clear to me at all.
toeknee
toeknee3w ago
Just prefix them all with you initials: an_delete for example...?
Dhru
Dhru3w ago
Maybe this is a candidate for better error reporting? Not sure what sort of error it currently throws
Solution
Dennis Koch
Dennis Koch3w ago
Does the method name still match the action name?
Anish
AnishOP3w ago
Thanks Dennis. I now see the problem. When I changed the function, I did not make the change in the name, that remained the previous one. I will do the changes, I guess things will work now. Thanks again.

Did you find this page helpful?