laravel project root directory code example
Example 1: laravel get project root
public_path(); // Path of public/
base_path(); // Path of application root
storage_path(); // Path of storage/
app_path(); // Path of app/
Example 2: laravel impossible to create the root directory
This link has an answer that has worked for many users.
It is bound to work for you too!
https://laracasts.com/discuss/channels/general-discussion/impossible-to-create-the-root-directory-error-when-uploading-file-into-public-folder