/**
  * Store the current URL for the request if necessary.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \Illuminate\Session\SessionInterface  $session
  * @return void
  */
 protected function storeCurrentUrl(Request $request, $session)
 {
     if ($request->method() === 'GET' && $request->route() && !$request->ajax()) {
         $session->setPreviousUrl($request->fullUrl());
     }
 }
 /**
  * Store the current URL for the request if necessary.
  *
  * @param  \Illuminate\Http\Request $request
  * @param  \Illuminate\Session\SessionInterface $session
  * @return void
  */
 protected function storeCurrentUrl(Request $request, $session)
 {
     if ($request->method() === 'GET' && $request->route() && !$request->ajax() && $request->route()->getName() != 'files.show' && $request->route()->getName() != '.api' && !str_contains($request->route()->getName(), 'debugbar')) {
         $session->setPreviousUrl($request->fullUrl());
     }
 }