Bootstrap.php 501 B

12345678910111213141516171819202122232425262728
  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. if (config('admin.cdn')) {
  16. Admin::cdn();
  17. }
  18. Admin::callBooted();
  19. return $next($request);
  20. }
  21. }