Skip to content
Advertisement

Put data in the method (addItem) using foreach

Code i tried but it display 1 value. I want to use addItem to insert more data and display it on my invoice pdf. I can grab all my data using eloquent but dont know how to insert into the class given.

JavaScript

Example code at https://github.com/ConsoleTVs/Invoices

JavaScript

Advertisement

Answer

Create single instance of Invoice and fill it with items. Then call ->show()… not sure is the ->show() method that you need but you can experiment with it.

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement