I have a following restful function in my controller

```
public function get_index()
{
    return Event::all();
}

```

But it returns following error

```
Unhandled Exception

Message:

Call to undefined method Laravel\Event::all()
Location:

/Applications/MAMP/htdocs/calendar/application/controllers/home.php on line 8

```

Here is my complete controller

```
class Home_Controller extends Base_Controller {
    public $restful = true;

    public function get_index()
    {
        return Event::all();
    }

}

```

Why am I getting this error and how can I fix it?