Move the process order
This commit is contained in:
parent
91347e3597
commit
0f4cef62a7
@ -145,12 +145,6 @@ class Posts
|
|||||||
// Methods
|
// Methods
|
||||||
public function post($args = [])
|
public function post($args = [])
|
||||||
{
|
{
|
||||||
$table = 'pengumuman';
|
|
||||||
if (isset($args['_addon'])) {
|
|
||||||
$table = $args['_addon'];
|
|
||||||
unset($args['_addon']);
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($args as $value) {
|
foreach ($args as $value) {
|
||||||
if ($value == '') {
|
if ($value == '') {
|
||||||
Session::flash('info', 'All data must not be empty');
|
Session::flash('info', 'All data must not be empty');
|
||||||
@ -159,6 +153,12 @@ class Posts
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$table = 'pengumuman';
|
||||||
|
if (isset($args['_addon'])) {
|
||||||
|
$table = $args['_addon'];
|
||||||
|
unset($args['_addon']);
|
||||||
|
}
|
||||||
|
|
||||||
if ($this->post->entry($table, $args)) {
|
if ($this->post->entry($table, $args)) {
|
||||||
Session::flash('info', 'Data successfuly uploaded');
|
Session::flash('info', 'Data successfuly uploaded');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user