public function mark_all_as_read()
{
$is_admin = $this->app->user_manager->is_admin();
if (defined('MW_API_CALL') and $is_admin == false) {
return array('error' => 'You must be logged in as admin to perform: ' . __CLASS__ . '->' . __FUNCTION__);
}
\DB::table($this->table)->whereIsRead(0)->update(['is_read' => 1]);
$this->app->cache_manager->delete('notifications' . DIRECTORY_SEPARATOR . 'global');
return true;
}