Mithril now can walks by itself

This commit is contained in:
2017-10-05 16:41:34 +07:00
parent ae762758fc
commit cfa0924ea7
26 changed files with 4299 additions and 1524 deletions

View File

@@ -291,6 +291,12 @@ class Posts
Redirect::to('/posts/category');
}
} else {
// Calculate delay by character
// 60 characters for 5 secs
// 1 character for 84 ms
$length = strlen($args['content']);
$args['delay'] = $length * 84;
if ($this->model->entry($args)) {
Session::flash('info', 'Data berhasil diunggah');
Redirect::to('/');
@@ -348,6 +354,12 @@ class Posts
}
}
// Calculate delay by character
// 60 characters for 5 secs
// 1 character for 84 ms
$length = strlen($args['content']);
$args['delay'] = $length * 84;
if ($this->model->update($args, $id)) {
Session::flash('info', 'Data berhasil diperbarui');
Redirect::to('/');