/** * Return all of the security logs * * @param int $paginate * * @return mixed */ public function getAllSecurityLogs($paginate = 50) { return SecurityLog::with('user')->orderBy('created_at', 'desc')->paginate($paginate); }
/** * Return all of the security logs * * @return mixed */ public function getAllSecurityLogs() { return SecurityLog::with('user'); }
/** * Write an entry in the security log. * * @param $message * @param $category */ public static function handle($message, $category = null) { SecurityLog::create(['message' => $message, 'category' => $category, 'user_id' => auth()->user() ? auth()->user()->id : null]); return; }