title: php Laravel- retrieve property of object
body: <p>I have something like that :</p>
  
  <p>In my controller , I wrote this line : </p>
  
  <pre><code>dd($file-&gt;path);
  </code></pre>
  
  <p>and here is result :</p>
  
  <pre><code>UploadedFile {#294
    -test: false
    -originalName: "photo.png"
    -mimeType: "image/png"
    -size: 319216
    -error: 0
    path: "/tmp"
    basename: "phpLJA6Ge"
    pathname: "/tmp/phpLJA6Ge"
  }
  </code></pre>
  
  <p>I want to return <em>.png</em> . How to retrieve <em>originalName</em>?</p>