Level 46
Apr 27, 2017
4
Level 1
Load CSV file into Controller to prase using a .env variable
Ok, so I have a .env variable CSV_FILE=~/sites/computer-availability/storage/app/WAV_SUM.csv
I want to load it into my controller so that I can parse it into an array. I tried env("app.CSV_FILE"); but that just gives me a string. Not what I'm wanting.
How could I go about loading the data from the CSV file using the .env variable?
Please or to participate in this conversation.