Thanks for your patient replies. Yes, I did read it even a few times but
cannot be sure if I understand correctly. The problem is there is no sample
code to test one's understanding.
<?phpRouter::connect(
"/:controller/:id",
array("action" => "edit", "[method]" => "PUT"),
array("id" => "[0-9]+"));
I am guessing that what it means is that the action "edit" uses HTTP PUT
and the parameter passed in is the id field. id field is a digit. What if I
want to pass in 2 or more parameters which are not primary keys? May I know
if this can be done in CakePHP?
Thank you very much.
On Friday, August 10, 2012 4:43:35 PM UTC+8, Mike Griffin wrote:
>
> On Thu, Aug 9, 2012 at 4:38 PM, Lightee <[email protected] <javascript:>>
> wrote:
> > What if the wanted data to be returned is based on data fields other
> than
> > the id? It is restricting to get data based on id only. Is there some
> way to
> > get data based on other fields of the table?
> >
>
> Did you look here:
> http://book.cakephp.org/2.0/en/development/rest.html#custom-rest-routing
>
> Mike.
>
On Friday, August 10, 2012 4:43:35 PM UTC+8, Mike Griffin wrote:
>
> On Thu, Aug 9, 2012 at 4:38 PM, Lightee <[email protected] <javascript:>>
> wrote:
> > What if the wanted data to be returned is based on data fields other
> than
> > the id? It is restricting to get data based on id only. Is there some
> way to
> > get data based on other fields of the table?
> >
>
> Did you look here:
> http://book.cakephp.org/2.0/en/development/rest.html#custom-rest-routing
>
> Mike.
>
--
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en-US.