On Apr 2, 11:38 am, mivogt-LU <[email protected]> wrote:
> ok i solved one part of it - so I can redirect to the bookings add
> function.
There's no need for a redirect from RequestsController. Just have your
button point to "/bookings/add/THE_REQUEST_ID" in the first place. You
may want to create a route:
Router::connect(
'/bookings/add/:request_id',
array('controller' => 'bookings', 'action' => 'add'),
array('request_id' => '[0-9]+', 'pass' => array('request_id'))
);
> but I am not shure about how to send data to the target.
>
> Is it useful and a good idea to use something like adding a '?
> customer_id=123,?booking_id=456" ??
function add($request_id = null)
{
$request_data = $this->Booking->Request->find(
'first',
array(
'condtions' => array(
'Request.id' => $request_id
)
);
// die(debug($request_data));
...
}
This is assuming that Request data will include that for Customer.
Check the debug output.
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
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] For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
To unsubscribe, reply using "remove me" as the subject.