How can i get the path from laravel application root?

About Us:

We are from free coder. We are a group of web developers who are passionate about web development. You can learn from us php, laravel, node js, vue js, react js and many other topic on web developement.
we are very happy to help you.
free coder

Today what you are going to learn:

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/

Recent Posts

Related Posts