++ed by:
PINGAN AVKHOZOV POTATOGIM KARJALA LUCAS
5 non-PAUSE users
Author image Andrey Khozov
and 6 contributors

NAME

MojoX::Model - Model base class

SYNOPSIS

  # Model
  package App::Model::Foo;
  use Mojo::Base 'MojoX::Model';

  sub do {
    # Do something.
  }

  # Application
  $self->model('Foo')->do();

DESCRIPTION

MojoX::Model is the base class for your Mojolicious models.

ATTRIBUTES

MojoX::Model inherits all attributes from Mojo::Base and implements the following new ones.

app

    my $app = $model->app;
    $model  = $model->app(Mojolicious->new);

A reference back to the application, usually a Mojolicious object.

SEE ALSO

Mojolicious, Mojolicious::Guides, http://mojolicio.us.

AUTHOR

Andrey Khozov, avkhozov@googlemail.com.

COPYRIGHT AND LICENSE

Copyright (C) 2015, Andrey Khozov.

This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.