Home /General /Laravel – Get Path to App, Public, Storage and Base Install Directories

Laravel – Get Path to App, Public, Storage and Base Install Directories

Laravel includes a variety of global “helper” PHP functions. Many of these functions are used by the framework itself; however, you are free to use them in your own applications if you find them convenient..

Laravel 4/5 – Get Path to App, Public, Storage and Base Install Directories

< ?php

/** * Path to the ‘app’ folder */

echo app_path();

/** * Path to the project’s root folder */

echo base_path();

/** * Path to the ‘public’ folder */

echo public_path();

/** * Path to the ‘app/storage’ folder */

echo storage_path(); ?>

Leave a Reply