Пример #1
0
 public function view()
 {
     $model = new \Mini\models\Songs($this->app->config('database'));
     // TODO: Add a request object
     // TODO: in a real-world app it would be useful to validate the values (inside the model)
     $model->addSong($_POST["artist"], $_POST["track"], $_POST["link"], $_POST["year"], $_POST["country"], $_POST["genre"]);
     $this->app->redirect('/songs');
 }