title: laravel check file extension in upload form
body: <p>this is the html form:</p>
  
  <pre><code>&lt;form method = "post" action="..."&gt;
     &lt;input type="text" name="subject" /&gt;
     &lt;input type="file" type="files['new']['file']"/&gt;
     &lt;input type="text" type="files['new']['name']"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Now I try read in server (laravel).</p>
  
  <pre><code>   public function chechkForm(request $request){
        $input = $request-&gt;all();
        dd(input['files']['new']['file' );
     }
  </code></pre>
  
  <p>the result is:</p>
  
  <pre><code>UploadedFile {#1356 ▼
    -test: false
    -originalName: "GK-Footer-Logo.png"
    -mimeType: "image/png"
    -error: 0
    #hashName: null
    path: "C:\Users\ali\AppData\Local\Temp"
    filename: "phpC3BF.tmp"
    basename: "phpC3BF.tmp"
  </code></pre>
  
  <p>Now I try these to print mimetype:</p>
  
  <blockquote>
    <p>$input['new0']['content']['mimeType']</p>
  </blockquote>
  
  <p>or</p>
  
  <blockquote>
    <p>$input['new0']['content']->mimeType</p>
  </blockquote>
  
  <p>or</p>
  
  <blockquote>
    <p>$input['new0']['content']->mimeType()</p>
  </blockquote>
  
  <p>what is my wrong? I get for all of them 'error'!</p>