CheckSendingAPI.php 497 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace App\Http\Middleware;
  3. use Closure;
  4. use Illuminate\Http\Request;
  5. use Illuminate\Support\Facades\App;
  6. use Illuminate\Support\Facades\Session;
  7. class CheckSendingAPI
  8. {
  9. /**
  10. * Handle an incoming request.
  11. *
  12. * @param \Illuminate\Http\Request $request
  13. * @param \Closure $next
  14. * @return mixed
  15. */
  16. public function handle(Request $request, Closure $next)
  17. {
  18. session()->put('_firstSendAPI', false);
  19. return $next($request);
  20. }
  21. }