Accessing a public variable from an Impoter class in another class #3949
Replies: 1 comment
-
I found a way through by simply creating 2 different import classes, one of which is first used with Excel::import() to read the first page, store appropriate info into the DB and get the "PrimaryKey" ID. After I have the ID, I simply pass it to the other Importer class which manages reading and storing data from the other Excel sheets! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have an Excel file with multiple sheets, I have written different importer classes to read data from the sheets. After reading from the first sheet, I store the data in an SQL database. Now, when I store the data in a Model, I would like to have access to the PrimaryKey of that table and pass it to the other importer class to be able to make reference to the "PrimaryKey" ID.
How can I go about this problem? Can this be done without storing data in the session?
Beta Was this translation helpful? Give feedback.
All reactions