/** * Send a copy of each incoming request out to the cluster logging system * * @param \Illuminate\Http\Request $request * @param \Closure $next * * @return mixed */ public function handle($request, Closure $next) { try { try { $_session = Session::getPublicInfo(); } catch (\Exception $_ex) { $_session = Session::all(); } // Register the auditing service app()->register(AuditServiceProvider::class); // We use provider's service() method because Facades aren't loaded yet AuditServiceProvider::service()->logRequest($request, $_session); } catch (\Exception $_ex) { // Completely ignored... /** @noinspection PhpUndefinedMethodInspection */ Log::error('Exception during auditing: ' . $_ex->getMessage()); } return $next($request); }
public static function all() { return \Session::all(); }
public static function buildPlatformAccess($identifier) { return ['api' => static::getExposedApi(), 'config' => \Config::all(), 'session' => Session::all(), 'store' => new ScriptSession(\Config::get("script.{$identifier}.store"), app('cache'))]; }