New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

revolution/laravel-namespaced-helpers

Laravel Namespaced helpers
21,488
Install
composer require revolution/laravel-namespaced-helpers
Latest Version:2.3.0
PHP:^8.3
Laravel:12 · 13
Older releases:6 – 11
License:MIT
Last Updated:Oct 17, 2026
Links: GitHub  ·  Packagist
Maintainer: revolution

Laravel Namespaced helpers

Another way to avoid env() conflicts.

Requirements

  • PHP >= 8.3
  • Laravel >= 12.0

Installation

composer require revolution/laravel-namespaced-helpers

Uninstall

composer remove revolution/laravel-namespaced-helpers

Usage

env()

In config files,
add use function Revolution\Illuminate\Support\env;
This env() is not global.

<?php

use function Revolution\Illuminate\Support\env;

return [
    'name' => env('APP_NAME', 'Laravel'),
];

dispatch_now()

dispatch_now() was removed in Laravel 10. If you want to use it to get a return value from a job class, you can use this.

<?php

use function Revolution\Illuminate\Support\dispatch_now;

$bar = dispatch_now(new FooJob());

DispatchNow trait

use Illuminate\Contracts\Queue\ShouldQueue;
use Revolution\Illuminate\Support\DispatchNow;

class FooJob implements ShouldQueue
{
    use DispatchNow;
}
$bar = FooJob::dispatchNow();

LICENSE

MIT

Related Packages

aurion72/helpers

Aurion72 Helpers

14,667 0
xnxk/helpers

Provides backwards compatibility for helpers in the XNXK Tech.

11,896 0
velcoda/helpers

Your Package Description here

4,997
mossengine/helper

PHP Class that streamlines usages of static method helpers without needing to lo...

1,842 0
laravel/helpers

Provides backwards compatibility for helpers in the latest Laravel release.

69,288,844 809

Version History

Version Released PHP Laravel License
2.3.0 ^8.3 ^12.0||^13.0 MIT
2.2.0 ^8.2 ^11.0||^12.0 MIT
2.1.1 ^8.1 ^10.0||^11.0 MIT
2.1.0 ^8.1 ^10.0||^11.0 MIT
2.0.0 ^8.1 ^10.0 MIT