AppServiceProvider.php 861 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace App\Providers;
  3. use App\Http\Controllers\Controller;
  4. use Illuminate\Queue\Events\JobFailed;
  5. use Illuminate\Support\Facades\Queue;
  6. use Illuminate\Support\Facades\Schema;
  7. use Illuminate\Support\ServiceProvider;
  8. class AppServiceProvider extends ServiceProvider
  9. {
  10. /**
  11. * Register any application services.
  12. *
  13. * @return void
  14. */
  15. public function register()
  16. {
  17. //
  18. }
  19. /**
  20. * Bootstrap any application services.
  21. *
  22. * @return void
  23. */
  24. public function boot()
  25. {
  26. //
  27. Schema::defaultStringLength(191);
  28. Queue::failing(function (JobFailed $event) {
  29. (new Controller())->log(__METHOD__,'EventError_',"$event -> connectionName:{$event->connectionName},$event-> job:{$event->job},
  30. $event-> exception:{$event->exception}");
  31. });
  32. }
  33. }