Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Add Helper Methods to Controller

#5

Commonly used return behaviors should be factored out into helper methods which can be called, like:

function edit($id) { $model = Make::a('Model'); $model->id = $id; return $this->findOr404($model); }

Other interesting ones would be: return $this->ok(); return $this->insertOrSendBackTo($model, 'fail-view'); return $this->redirect('another/url');

Reported by Kris Jordan · November 9th, 2008 @ 11:38 PM

State: open
Milestone: 0.30
Assigned to: Kris Jordan Kris Jordan

Activity

  1. Kris Jordan
    Kris Jordan
    • Milestone changed from Public Preview to 0.11.1

    Not PRI1, moving back.

    December 8th, 2008 @ 12:58 AM

  2. Kris Jordan
    Kris Jordan
    • State changed from new to open

    February 16th, 2009 @ 03:24 PM

  3. Kris Jordan
    Kris Jordan
    • Milestone changed from 0.11.1 to 0.30

    March 30th, 2009 @ 09:45 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.