title: Requests check if user is authenticated or not
body: <p>I was asked to check if the user is logged in or not
  I have been given a sample code</p>
  <pre><code> public function getAllNfts(GetAllNfts $request): JsonResponse
      {
          $data = $request-&gt;getData();
          $data['uuid'] = ($request-&gt;hasHeader('Authorization') &amp;&amp; $request-&gt;header('Authorization')) ? $this-&gt;token_service-&gt;getUserUUIDFromToken($request) : null;
          $requested_uuid = $request-&gt;getRequestedUUID();
          return $this-&gt;nft_service-&gt;getAllNfts(uuid: $requested_uuid, data: $data);
      }
  </code></pre>
  <p>But I do not have uuid for my code when I work on the admin and json is not used because it is in the admin panel
  This is my code</p>
  <pre><code>public function updateCollection(EditCollection $request):RedirectResponse
      {
          $request-&gt;validated();
          $data = $request-&gt;all();
          $this-&gt;collection_repository-&gt;updateCollection($data);
          return redirect('collections');
      }
  </code></pre>
  <p>THis is FOrm Request Validate <code>EditCollection.php</code></p>
  <pre><code>&lt;?php
  
  namespace App\Http\Requests;
  
  use Illuminate\Foundation\Http\FormRequest;
  
  class EditCollection extends FormRequest
  {
      public function authorize()
      {
          return true;
      }
      public function rules()
      {
          return [
              'title' =&gt; ['required', 'string','max:255', 'min:10', 'between:10,255'],
              'status' =&gt; ['required','Boolean','size:1'],
          ];
      }
  }
  </code></pre>
  <p>How to check all requests to see if the user is authenticated
  And not contrary to the sample code</p>