示例#1
0
 public function view()
 {
     $model = new \Mini\models\Songs($this->app->config('database'));
     // TODO: Add a request object
     // TODO: passing an array would be better here, but for simplicity this way it okay
     $model->updateSong($_POST['song_id'], $_POST["artist"], $_POST["track"], $_POST["link"], $_POST["year"], $_POST["country"], $_POST["genre"]);
     $this->app->redirect('/songs');
 }