public function downloadInvoice(Request $request, $invoiceId)
    {
        $data = array_merge([
            'vendor' => 'Vendor',
            'product' => 'Product',
            'vat' => new ViewExpression(nl2br(e($request->user()->extra_billing_info))),
        ], Spark::generateInvoicesWith());

        return Auth::user()->downloadInvoice($invoiceId, $data);
    }
public function downloadInvoice(Request $request, $invoiceId)
    {
        $data = array_merge([
            'vendor' => 'Vendor',
            'product' => 'Product',
            'vat' => new ViewExpression(nl2br(e($request->user()->extra_billing_info))),
        ], Spark::generateInvoicesWith());

        return Auth::user()->downloadInvoice($invoiceId, $data);
    }
public function downloadInvoice ( Request $ request , $ invoiceId ) { $ data = array_merge ( [ 'vendor' => 'Vendor' , 'product' => 'Product' , 'vat' => new ViewExpression ( nl2br ( e ( $ request -> user ( ) -> extra_billing_info ) ) ) , ] , Spark :: generateInvoicesWith ( ) ) ; return Auth :: user ( ) -> downloadInvoice ( $ invoiceId , $ data ) ; }
Download the given invoice for the user.

@param  string  $invoiceId
@return \Illuminate\Http\Response
Download the given invoice for the user .