public function view() { $model = new \Mini\models\Songs($this->app->config('database')); $amount_of_songs = $model->getAmountOfSongs(); $songs = $model->getAllSongs(); $this->template_data = array('amount_of_songs' => $amount_of_songs, 'songs' => $songs); }
public function view() { $model = new \Mini\models\Songs($this->app->config('database')); $this->app->contentType('application/json;charset=utf-8'); $this->template_data = $model->getAmountOfSongs(); }