Cannot register empty data

This commit is contained in:
Gregorio Chiko Putra 2017-09-06 14:53:22 +07:00
parent 0f4cef62a7
commit c43b4744db

View File

@ -49,6 +49,14 @@ class Home
// Methods // Methods
public function post($args = []) public function post($args = [])
{ {
foreach ($args as $value) {
if ($value == '') {
Session::flash('info', 'All data must not be empty');
Redirect::to('/');
die();
}
}
$table = 'user'; $table = 'user';
$date = new \DateTime(); $date = new \DateTime();
@ -65,7 +73,7 @@ class Home
$this->access->entry($table, $args); $this->access->entry($table, $args);
// Redirect::to('/'); Redirect::to('/');
} }
public function put($args = []) public function put($args = [])