title: how to save dompdf file to storage and name the file dynamicly in laravel
body: <p>does anyone know how to save generated pdf file and name it dynamicly using dompdf in laravel?
  i always encounter this error</p>
  
  <pre><code>failed to open stream: No such file or directory
  </code></pre>
  
  <p>while trying to generated pdf file and save it to project directory.
  here its my controller code</p>
  
  <pre><code>$bills = Tagihan::join('pesanan', 'tagihan.id_pesanan', 'pesanan.id_pesanan')
                      -&gt;join('kendaraan', 'pesanan.id_kendaraan', 'kendaraan.id_kendaraan')
                      -&gt;join('kategori_mobil', 'kendaraan.id_kategori_kendaraan', 'kategori_mobil.id_kategori')
                      -&gt;join('users', 'pesanan.id_pengguna', 'users.id')
                      -&gt;where('pesanan.id_pesanan', $save-&gt;id_pesanan)
                      -&gt;select('pesanan.*', 'users.*', 'tagihan.*', 'kendaraan.*', 'kategori_mobil.nama_kategori')
                      -&gt;first();
      $today = Carbon::now('GMT+7')-&gt;toDateString();
        $pdf = new PDF();
        $pdf = PDF::loadView('admin.tagihan.pdf', compact('bills','today'));
        file_put_contents('public/bills/'.$noOrder.'.pdf', $pdf-&gt;output() );
      return redirect()-&gt;route('pesananIndex');
  </code></pre>
  
  <p>i want to save my pdf file with custom string with $noOrder.'pdf', but when i use static name like this</p>
  
  <pre><code>file_put_contents('public/bills/bubla.pdf', $pdf-&gt;output());
  </code></pre>
  
  <p>i had no error, any solution?</p>