How to get the path from laravel application root?

Share Me
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

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/

Read Also : How to Use Group by year month using Laravel Query Builder ?

Thanks for read. I hope it help you. For more you can follow us on facebook.

About Shahriar Sagor

My name is Shahriar sagor. I'm a developer. I live in Bangladesh and I love to write tutorials and tips that will help to other Developer's. I am a big fan of PHP, Javascript, JQuery, Laravel, Codeigniter, VueJS, AngularJS and Bootstrap from the early stage.

View all posts by Shahriar Sagor →