how to protect a controller function accessing by URL |
[eluser]Tracker[/eluser]
I don't want to access "deleteItems" function directly like this. http://localhost/Shop/deleteItems/3 it should only accessible if i will call http://localhost/Shop/deleteShop/3 Your help will be appreciated... Code: class Shop extends Controller {
[eluser]danmontgomery[/eluser]
This is covered in the user guide. Quote:In some cases you may want certain functions hidden from public access. To make a function private, simply add an underscore as the name prefix and it will not be served via a URL request. For example, if you were to have a function like this:
|
Welcome Guest, Not a member yet? Register Sign In |