Reputation: 55
i am need advice to create folder upload in storage, i want to make folder using 4 column textbox
how to make folder like this
storage/app/division/year/activity/sponsor/file.txt
and the code here
storage::disk('local')->put('logic');
Upvotes: 4
Views: 5325
Reputation: 19275
Once you have sanitized and stored the input strings in the relative variables, to create the folder and upload the file you can do:
Storage::disk('local')
->put( $division .'/'. $activity . '/' . $year . '/' . $sponsor . '/file.txt',
File::get( <your_file> )
);
Upvotes: 5