NAME

Mojolicious::Controller - Controller Base Class

SYNOPSIS

    use base 'Mojolicious::Controller';

DESCRIPTION

Mojolicous::Controller is a controller base class.

ATTRIBUTES

Mojolicious::Controller inherits all attributes from MojoX::Dispatcher::Routes::Controller.

METHODS

Mojolicious::Controller inherits all methods from MojoX::Dispatcher::Routes::Controller and implements the following new ones.

render

    $c->render;
    $c->render(controller => 'foo', action => 'bar');
    $c->render({controller => 'foo', action => 'bar'});
    $c->render(text => 'Hello!');
    $c->render(template => 'index');
    $c->render(template => 'foo/index');
    $c->render(template => 'index', format => 'html', handler => 'epl');
    $c->render(handler => 'something');
    $c->render('foo/bar');
    $c->render('foo/bar', format => 'html');
    $c->render('foo/bar', {format => 'html'});

render_inner

    my $output = $c->render_inner;

render_partial

    my $output = $c->render_partial;
    my $output = $c->render_partial(action => 'foo');

render_text

    $c->render_text('Hello World!');
    $c->render_text('Hello World', layout => 'green');

url_for

    my $url = $c->url_for;
    my $url = $c->url_for(controller => 'bar', action => 'baz');
    my $url = $c->url_for('named', controller => 'bar', action => 'baz');