How To Get Path From Laravel Application Root?
Hi Guys,
Today now in this post i will show you How to get path from laravel 8 application root? We are know that laravel provide us several helper to get the 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 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/
I hope it help you...
- How to Notifications With database Driver in Laravel 11?
- How to Send Email Via Notification in Laravel 11?
- How to Install and Configure Laravel 11 Debugbar?
- How to Like Dislike System in Laravel 11?
- How to Paginate a Model with Relationship in Laravel 11?
- Laravel 11 Upload Files to Amazon S3 Example
- Laravel 11 Send WhatsApp Messages Example
- Laravel 11 Rest API Authentication Using JWT Tutorial