mphpmaster/laravel-helper-loader

Laravel helpers files loader.

1.0.0 2022-01-16 04:48 UTC

This package is auto-updated.

Last update: 2024-12-03 08:48:59 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Installation

You can install the package via composer:

composer require mphpmaster/laravel-helper-loader

You can publish the config file with:

php artisan vendor:publish --tag="mphpmaster-configs"

This is the contents of the published config file:

return [
    'allowed_suffix' => [
        '.functions',
        '.class'
    ],

    'allowed_extension' => '.php',

    'auto_load_paths' => [],
];

Usage

Put helpers paths in config config/helper-loader.php:

    'auto_load_paths' => [
        app_path("Helpers"),
        app_path("Test"),
        base_path("Helpers"),
    ],

Or you can manual load:

use MPhpMaster\LaravelHelperLoader\HelperLoader;

HelperLoader::autoLoad(app_path("Helpers"));

Testing

No tests

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.