Bootstrap.php 502 B

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