Ejemplo n.º 1
0
 public function before(Application $application)
 {
     /**
      * @var $event \Illuminate\Events\Dispatcher
      */
     parent::before($application);
     $event = $application['events'];
     $event->listen('*', [$this, 'eventFired']);
 }
Ejemplo n.º 2
0
 public function before(Application $application)
 {
     parent::before($application);
     $event = $application['events'];
     if (Str::startsWith(Application::VERSION, ['5.0', '5.1'])) {
         $event->listen('illuminate.query', function ($query, $bindings, $time, $name) {
             array_push($this->data[$this->template], ['query' => $query, 'bindings' => $bindings, 'time' => $time, 'connection' => $name]);
         });
     } else {
         if (Str::startsWith(Application::VERSION, ['5.2'])) {
             $event->listen(QueryExecuted::class, [$this, 'databaseFired']);
         }
     }
 }
Ejemplo n.º 3
0
 public function before(Application $application)
 {
     parent::before($application);
     // TODO: Change the autogenerated stub
     /**
      * @var $event \Illuminate\Events\Dispatcher
      */
     $event = $application['events'];
     $that = $this;
     $event->listen('composing:*', function ($view) use($that) {
         $time = microtime(true);
         //            $views->addEvent(
         //                'view ' . $view->getName(),
         //                'Rendering a view',
         //                $time,
         //                $time,
         //                array(
         //                    'name' => $view->getName(),
         //                    'data' => $that->replaceUnserializable($view->getData())
         //                )
         //            );
     });
 }