Level 102
You give it a path to a file, and then do something with it?
\Illuminate\Support\Facades\File::move($path, '/newpath');
//or if you need to work with the file
$fileContents = \Illuminate\Support\Facades\File::get($path);
Hi guys, I have a test assigment , and one of reqiurments is : Using Laravel create an Artisan command that accepts two arguments - "path_to_file" and "id". The command should parse the attached file that has a fixed width text format and import the data into a mysql database.
I don't have any problems with parsing and saving data, but I stucked on Laravel file system and can't understand how to import a file to the command if it not in the storage. Please help
You give it a path to a file, and then do something with it?
\Illuminate\Support\Facades\File::move($path, '/newpath');
//or if you need to work with the file
$fileContents = \Illuminate\Support\Facades\File::get($path);
Please or to participate in this conversation.