InterNACHI / modular

Modularize your Laravel application
MIT License
796 stars 65 forks source link

Add modules_path helper function #99

Open azzarip opened 4 months ago

azzarip commented 4 months ago

This PR adds the modules_path helper function to provide the fully qualified modules path, resolving the path using the config setting.

The function is autoloaded with composer, as any other standard helper function.

A small description has been added in the README and a test has been included.

It is useful to those who use this package across different projects where the modules' folder is named differently and you do not have to hard-code the path to the modules.

Example

It works exactly has many other laravel path helper functions:

$path = modules_path('module1/file.php');