How to get public directory?
Use public_path() For reference: // Path to the project’s root folder echo base_path(); // Path to the ‘app’ folder echo app_path(); // Path to the ‘public’ folder echo public_path(); // Path to the ‘storage’ folder echo storage_path(); // Path to the ‘storage/app’ folder echo storage_path(‘app’);