How can i get the path from laravel application root?
In this post we will give you information about How can i get the path from laravel application root?. Hear we will give you detail about How can i get the path from laravel application root?And how to use it also give you demo for it if it is necessary.
Laravel provide several helper to get path of public directory, app directory, storage directory and base directory. It will help to store files, read file from path and also for other from controller, view files, model etc.
You can see as bellow how to get path of that directory using helper one by one.
How to get public folder path in laravel ?
public_path(); // Path of public/
How to get base path(Project Root) in laravel ?
base_path(); // Path of application root
How to get storage folder path in laravel ?
storage_path(); // Path of storage/
How to get app folder path in laravel ?
app_path(); // Path of app/
Hope this code and post will helped you for implement How can i get the path from laravel application root?. if you need any help or any feedback give it in comment section or you have good idea about this post you can give it comment section. Your comment will help us for help you more and improve us. we will give you this type of more interesting post in featured also so, For more interesting post and code Keep reading our blogs