Nessuna descrizione
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

APIVersion.php 428B

1234567891011121314151617181920212223
  1. <?php
  2. namespace App\Http\Middleware;
  3. use Closure;
  4. /**
  5. * Class APIVersion
  6. * @package App\Http\Middleware
  7. */
  8. class APIVersion
  9. {
  10. /**
  11. * Handle an incoming request.
  12. *
  13. * @param Request $request
  14. * @param Closure $next
  15. *
  16. * @return mixed
  17. */
  18. public function handle($request, Closure $next, $guard)
  19. {
  20. config(['app.api.version' => $guard]);
  21. return $next($request);
  22. }
  23. }