Today now in this post i will show you How to get the path from laravel application root? We are know that laravel provide us several helper to get path of public directory, app directory, storage directory and also base directory. So it will help us to store the files, read file from the path and also for other from controller, view files, model etc.
Now we can see in the bellow how to get the path of that directory by using helper one by one.
How to get base path(Project Root) in laravel ?
base_path(); // Path of application root
How to get public folder path in laravel ?
public_path(); // Path of public/
How to get app folder path in laravel ?
app_path(); // Path of app/
How to get storage folder path in laravel ?
storage_path(); // Path of storage/
Thanks for read. I hope it help you. For more you can follow us on facebook.