Cannot register empty data
This commit is contained in:
parent
0f4cef62a7
commit
c43b4744db
@ -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 = [])
|
||||||
|
Loading…
Reference in New Issue
Block a user