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.

ParametersMiddleware.php 538B

123456789101112131415161718192021222324252627
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: robin
  5. * Date: 10/19/15
  6. * Time: 10:20 PM
  7. */
  8. namespace Luticate\Utils;
  9. use Closure;
  10. use Illuminate\Http\Request;
  11. class ParametersMiddleware
  12. {
  13. /**
  14. * @param $request Request
  15. * @param Closure $next
  16. * @param ...$permissions
  17. * @return mixed
  18. */
  19. public function handle($request, Closure $next, ...$permissions)
  20. {
  21. LuBusiness::$parameters = array_merge($_GET, $_POST, $request->route()[2], LuBusiness::$parameters);
  22. return $next($request);
  23. }
  24. }