How get i get path from root in Laravel Updated

    By: Manu
    3 years ago

    Laravel provides few functions out of the box. These functions help us to get access of different directories inside laravel project. You can access public directory, Storage directory and so on. Without putting much efforts

    here are the functions.


    To go to Public folder in laravel project


    public_path();
    


    To go to base directory in laravel project


    base_path();
    


    To go to storage path use this function


    storage_path(); 
    


    To access the root or app folder


    app_path()
    


    Hope this helps