Bootstrap.php 459 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace Dcat\Admin\Middleware;
  3. use Dcat\Admin\Admin;
  4. use Illuminate\Http\Request;
  5. class Bootstrap
  6. {
  7. public function handle(Request $request, \Closure $next)
  8. {
  9. if (is_file($bootstrap = admin_path('bootstrap.php'))) {
  10. require $bootstrap;
  11. }
  12. Admin::callBooting();
  13. if (config('admin.cdn')) {
  14. Admin::cdn();
  15. }
  16. Admin::callBooted();
  17. return $next($request);
  18. }
  19. }