title: Send pdf file as email attachment in laravel 5.7
body: <p>I want to send email of invoice blade file as pdf but i getting following error</p>
  
  <p>(1/1) Swift_IoException
  Unable to open file for reading [/storage/D:\xampp\htdocs\clientreq\public/mypdf.pdf]</p>
  
  <p>controller:</p>
  
  <pre><code> public function insert(Request $req)
      {
        ini_set('max_execution_time', 300000);
      $mytime = Carbon::now();
      $project_type=implode(',',$req-&gt;input('project_type'));
      //$qty=implode(',',$req-&gt;input('qty'));
      $amount=implode(',',$req-&gt;input('amount'));
      $id=$req-&gt;input('id');
      $bill_date=$req-&gt;input('bill_date');
      $updated_at=$mytime-&gt;toDateTimeString();
        $created_at=$mytime-&gt;toDateTimeString();
        $data = array('client_id'=&gt;$id,'date_of_bill'=&gt;$bill_date,'description'=&gt;$project_type,'amount'=&gt;$amount,'created_at' =&gt; $created_at,'updated_at' =&gt; $updated_at);
      DB::table('bill')-&gt;insert($data);
  
      $client = DB::table('requirement')
                    -&gt;join('bill','requirement.id','=','bill.client_id')
                    -&gt;select('requirement.*','bill.*')
                    -&gt;where('requirement.id',$id)
                    -&gt;where('bill.date_of_bill',$bill_date)
                    -&gt;first();
  
      $data = array(
              'client_name' =&gt; $client-&gt;client_name,
              'company_name' =&gt; $client-&gt;company_name,
  
          );
  
      $pdf = \PDF::loadView('pages.invoice',$data);
      //return $pdf-&gt;stream();
  
      $data = array(
          'email_address'=&gt;'seemashelar01@gmail.com',
  
      );
  
      Mail::send('pages.invoice', $data, function($message) use($data) {
      $message-&gt;from('seemashelar01@gmail.com', 'PuraBox');
      $message-&gt;to($data['email_address']);
      $message-&gt;subject('hello');
      $filename = \Storage::url(public_path() . '/' . 'mypdf.pdf');
      $message-&gt;attach($filename);
      //Full path with the pdf name
  
  });  
  
      }
  </code></pre>