/**
  * Show Companies page.
  *
  * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
  */
 public function index()
 {
     $lastVisit = $this->getLastVisit();
     $this->setLastVisit();
     $pageTitle = 'Companies';
     $generalErrors = Error::getLastGeneralErrors($lastVisit);
     $companies = Company::getAllData($lastVisit);
     return view('companies', compact('companies', 'generalErrors', 'pageTitle'));
 }
Beispiel #2
0
 /**
  * Handle the event - save error to database.
  *
  * @param  SoftSoapErrorRaised  $event
  * @return void
  */
 public function handle(SoftSoapErrorRaised $event)
 {
     Error::create(['company_symbol' => $event->symbol, 'code' => $event->code, 'message' => $event->message, 'trace' => $event->trace]);
 }
 /**
  * Display error log page.
  *
  * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
  */
 public function index()
 {
     $pageTitle = 'Error log';
     $errors = Error::latest()->get();
     return view('log', compact('pageTitle', 'errors'));
 }