Looking up the name and event for a ticket
You can avoid writing exit() twice by adding a return statement at the deepest level, after passing all the checks. This should be equivalent to your code:

public function action_index()
{
    $id = $this-&gt;request-&gt;query('id');
    if (!empty($id)) {
        $ticket = ORM::factory('ticket')
            -&gt;where('id', '=', $id)
            -&gt;find();
        if (!empty($ticket)) {
            $event = ORM::factory('event')
                -&gt;where('id', '=', $ticket-&gt;event_id)
                -&gt;find();
            if (!empty($event)) {
                $this-&gt;template-&gt;ticket = $ticket-&gt;id;
                $this-&gt;template-&gt;name = $ticket-&gt;name;
                $this-&gt;template-&gt;event = $event-&gt;title;
                return;
            }
        }
        exit();
    }
}


That said, I find it a bit strange to exit() in the middle of a function.
It's an abrupt behavior in a program in general,
this kind of control is usually done at higher levels,
in order to do any necessary cleanup, such as releasing resources,
closing connections.