Ejemplo n.º 1
0
 /**
  * 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);
 }
Ejemplo n.º 2
0
 public static function all()
 {
     return \Session::all();
 }
Ejemplo n.º 3
0
 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'))];
 }