How can I access a model from a controller using laravel4?
So far I have my controller:
<?php
class GatewayController extends BaseController {
public function getContentAll()
{
$content = Content::getContentAll();
return $content;
}
And my model:
<?php
class Content extends Eloquent {
protected $table = '_content';
public function getContentAll(){
return 'test';
}
But I get:
Whoops, looks like something went wrong.