devtical/laravel-helpers

Helper Generator for Laravel

2.0.0 2025-09-21 14:45 UTC

README

Helper Generator for Laravel

Installation

Install via composer

composer require devtical/laravel-helpers

Optional

Publish the config by running the php artisan vendor:publish command.

Configure your helper directory:

# In your .env file
HELPER_DIRECTORY=Helpers

Usage

Create your first helper file:

php artisan make:helper <NAME>

Add your helper functions:

<?php

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

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.