title: laravel how to delete file in storage when we delete data
body: <p>I have some problem to delete file when some value deleted.</p>
  <p>This is my delete function:</p>
  <pre><code>public function delete($id, Adopsi $adopsi)
  {
      Storage::delete('post/adopsi/' . $adopsi-&gt;image_post_adps);
      $data = Adopsi::where('id', $id)-&gt;delete();
  
      if ($data) {
          return redirect()-&gt;route('adopsi.index')-&gt;with('success', 'Data telah dihapus');
      } else {
          return redirect()-&gt;route('adopsi.index')-&gt;with('error', 'Data gagal dihapus');
  
      }
  }
  </code></pre>
  <p>This is how I store my image before:</p>
  <pre><code>$imageSize = $request-&gt;file('image_post_adps')-&gt;getSize();
  $imageName = $request-&gt;file('image_post_adps')-&gt;getClientOriginalName();
  $request-&gt;file('image_post_adps')-&gt;storeAs('public/post/adopsi', $imageName);
  </code></pre>
  <p>directory folder where is use to save:<br />
  <code>storage/app/public/post/adopsi/.....</code> (there's my file),</p>
  <p>I've used <code>Storage::delete()</code> and <code>unlink()</code> but it still isn't working.</p>