devtical/laravel-helpers

Helper Generator for Laravel

Maintainers

Package info

github.com/devtical/laravel-helpers

pkg:composer/devtical/laravel-helpers

Transparency log

Fund package maintenance!

Kristories

Statistics

Installs: 621

Dependents: 0

Suggesters: 0

Stars: 19

Open Issues: 0

2.1.0 2026-03-31 01:47 UTC

This package is auto-updated.

Last update: 2026-07-04 06:06:38 UTC


README

Helper Generator for Laravel

Installation

Install via composer

composer require devtical/laravel-helpers

Optional

Publish the config:

php artisan vendor:publish --tag=helpers-config

Configure your helper directory:

# In your .env file
HELPER_DIRECTORY=Helpers
HELPER_LOG_ERRORS=true
HELPER_STRICT=false

Usage

Create your first helper file:

php artisan make:helper <NAME>

Add your helper functions:

<?php

declare(strict_types=1);

if (! function_exists('str_slug')) {
    function str_slug($text, $separator = '-')
    {
        return Str::slug($text, $separator);
    }
}

Use your helper functions anywhere:

// In your controllers, models, views, etc.
$slug = str_slug('Hello World'); // Returns: hello-world

Commands

Command Description
make:helper Create a new helper file
helper:list List all helper files and their load status
helper:validate Check helper files for syntax errors and duplicate functions
helper:reload Reload helper files (useful during development)

Please see the changelog for more information on what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING.md for details.

Security

If you discover any security related issues, please email author instead of using the issue tracker.

Credits

License

This package is open-sourced software licensed under the MIT license.

Support

If you have any questions or need help, please open an issue on GitHub.