4 thoughts on “CakePHP – Create Controller Action without View

  1. I did that but it displays a blank page. And what i want is to be redirected to some other view which obviously do exists.
    Yes, i’m using the redirect call !
    But what you said doesn’t work the way I want.

    Do you have any other possible solution??
    (i want my action to work like the delete action works: do “something”, doesn’t have an associated view, executes the action and voila! redirects to somewhere).

    Hope you can help me,
    Best regards.

  2. well, I did this:

    $this->Sale->save( array( ‘Venta.id’ => 3 ), array( ‘Sale.id’ ) );
    $this->autoRender = false;
    $this->redirect( ‘/sales’ );

    obviously in my controller, and it worked perfectly.
    the new registration was added and then was redirected to sales… I think that it is what you need, none “page in blank”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s