public function getInvoiceById($id, Request $request)
    {
        try {
            $user = $request->user();
            $response = $user->meta->downloadInvoice($id, [
                'vendor'    => config("invoice.company"),
                'street'    => config("invoice.street"),
                'location'  => config("invoice.location"),
                'phone'     => config("invoice.phone"),
                'url'       => config("invoice.url"),
                'product'   => config("invoice.product"),
                'description'   => 'Subscription',
            ]);
        } catch (Exception $e) {
            $response = back()->withErrors(['Could not find this invoice, please try again.']);
        }

        return $response;
    }
public function getInvoiceById($id, Request $request)
    {
        try {
            $user = $request->user();
            $response = $user->meta->downloadInvoice($id, [
                'vendor'    => config("invoice.company"),
                'street'    => config("invoice.street"),
                'location'  => config("invoice.location"),
                'phone'     => config("invoice.phone"),
                'url'       => config("invoice.url"),
                'product'   => config("invoice.product"),
                'description'   => 'Subscription',
            ]);
        } catch (Exception $e) {
            $response = back()->withErrors(['Could not find this invoice, please try again.']);
        }

        return $response;
    }
public function getInvoiceById ( $ id , Request $ request ) { try { $ user = $ request -> user ( ) ; $ response = $ user -> meta -> downloadInvoice ( $ id , [ 'vendor' => config ( "invoice.company" ) , 'street' => config ( "invoice.street" ) , 'location' => config ( "invoice.location" ) , 'phone' => config ( "invoice.phone" ) , 'url' => config ( "invoice.url" ) , 'product' => config ( "invoice.product" ) , 'description' => 'Subscription' , ] ) ; } catch ( Exception $ e ) { $ response = back ( ) -> withErrors ( [ 'Could not find this invoice, please try again.' ] ) ; } return $ response ; }
Get one invoice

@param  Request $request
@return \Illuminate\Http\Response
Get one invoice