Laravel AutoHelpers
Automatically load your helpers in your laravel application.
Installation
You can install the package via composer:
composer require fwartner/laravel-auto-helpers
Create the folders:
php artisan autohelper:install
Usage
To automatically load your helpers you'll need to update your AppServiceProvider.php
within the boot()
method like this:
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
LaravelAutoHelpers::boot();
}
Now create a helper in the app/Helpers
directory and you're all set!
<?php
if (! function_exists('appName')) {
/**
* Helper to grab the application name.
*
* @return mixed
*/
function appName()
{
return config('app.name');
}
}
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
Sponsor
If you like what I am doing please consider sponsor my work!