Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cakephp what does $this->request->params['pass'][0] mean?

Hi I need help in this line of code, I already searched in the docs I found $this->request->params['pass'][0] but I can't understand what's it's use

What does $this->request->params['pass'][0] mean?

Can anyone please help me into this?

like image 411
user3111124 Avatar asked Dec 18 '13 02:12

user3111124


People also ask

How can I get query string in CakePHP?

In CakePHP 2.0 this appears to have changed. According to the documentation you can access $this->request->query or $this->request['url'] .

How can I get post data in CakePHP?

You can retrieve post data as Array. $post_data= $this->request->data; You can retrieve post data for particular key.


1 Answers

http://book.cakephp.org/2.0/en/controllers/request-response.html

$this->request->params['pass'] 

represents the passed parameters within a url

Example: your request url localhost/calendars/view/recent/mark

Both recent and mark are passed arguments to CalendarsController::view()

$this->request->params['pass'] is an array valued array ([0]=>recent [1]=>mark)

So, in the above example

$this->request->params['pass'][0] = "recent"
like image 129
Nolan Knill Avatar answered Sep 30 '22 19:09

Nolan Knill