I am a beginner here so pardon me for this question am using return File::put($path , $data);
to create a file in public folder on Laravel. I used this piece of code from controller I need to know the value of $path
how should it be.
Use public_path()
For reference:
// Path to the project's root folder
echo base_path();
// Path to the 'app' folder
echo app_path();
// Path to the 'public' folder
echo public_path();
// Path to the 'storage' folder
echo storage_path();
// Path to the 'storage/app' folder
echo storage_path('app');