Apologies missed out an apostrophe on the example (launch week, pretty tired!), it should be:
Router::connect('/apply/:action/*', array('controller' => 'applications')); On 11 September 2014 23:05, Stephen S <hellospeak...@gmail.com> wrote: > Also worth mentioning if you wanted to have the URL www.mysite.com/apply > as a friendly URL, you can route it quite easilyso you don't need to name > your files based on the URL but more on what it handles. > > Application seems like a good suggestion as Thomas said, here's an example > (app/config/routes.php) > > Router::connect('/apply/:action/*, array('controller' => 'applications')); > > www.mysite.com/apply would route /applications/index > www.mysite.com/apply/view/5 would route /applications/view/5 > > http://book.cakephp.org/2.0/en/development/routing.html > > > On 11 September 2014 17:42, mark_story <mark.st...@gmail.com> wrote: > >> Inflector is going to have a hard time with Apply as it is not a noun. >> Inflector will only ever handle pluralizing nouns, and it is generally a >> good idea to make your models/objects nouns and not verbs. You already have >> some good suggestions on better noun based names. >> >> -Mark >> >> On Tuesday, 9 September 2014 03:34:15 UTC-4, MarkB wrote: >> >>> Hi, >>> >>> This is not a support request, more of a WTF? >>> >>> I'm ultra new to CakePHP and I just built my first app yesterday, >>> loosely based on the Blog Tutorial. >>> >>> It is centred around the processing and management of proposal >>> application forms for lectures at a conference, so I called my model >>> 'Apply'. I followed naming conventions and so set up my ApplysController >>> and Applys view folder etc etc etc. >>> >>> I naturally called my database table 'applys', but when I run my app at >>> www.example.com/applys it threw up an error message saying it couldn't >>> find the database 'applies'. >>> >>> Er... wow! How did it know? Annoying, but impressive. >>> >>> Regards, >>> MarkB. >>> >>> PS: I think it took me less time to build my app than hand code the 20 >>> field HTML form for the application. I was expecting to be spending the >>> rest of the week writing the code to validate it, process it and write to >>> database securely (something I'm not too confident about!). As a >>> cut'n'paste programming web designer with fumbling knowledge of PHP and >>> complete cluelessness regarding OOP, I wish I had looked at using a >>> framework years ago. I think CakePHP is going to open up a whole new world >>> to me. >>> >> -- >> Like Us on FaceBook https://www.facebook.com/CakePHP >> Find us on Twitter http://twitter.com/CakePHP >> >> --- >> You received this message because you are subscribed to the Google Groups >> "CakePHP" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to cake-php+unsubscr...@googlegroups.com. >> To post to this group, send email to cake-php@googlegroups.com. >> Visit this group at http://groups.google.com/group/cake-php. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Kind Regards > Stephen Speakman > -- Kind Regards Stephen Speakman -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/d/optout.