PHPackages                             beholdr/laravel-helpers - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. beholdr/laravel-helpers

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

beholdr/laravel-helpers
=======================

Some helpers for Laravel.

v0.13(1mo ago)02.4k↓50%MITPHPPHP ^8.3CI passing

Since Apr 16Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/beholdr/laravel-helpers)[ Packagist](https://packagist.org/packages/beholdr/laravel-helpers)[ Docs](https://github.com/beholdr/laravel-helpers)[ RSS](/packages/beholdr-laravel-helpers/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (26)Versions (19)Used By (0)

Laravel helpers
===============

[](#laravel-helpers)

Some helpers for Laravel projects.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require beholdr/laravel-helpers
```

You can publish the config file with:

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

This is the contents of the published config file:

```
return [
    'http_client_log' => env('HTTP_CLIENT_LOG_ENABLED', true),
    'http_client_log_limit' => env('HTTP_CLIENT_LOG_LIMIT', 1024),
];
```

Usage
-----

[](#usage)

### Redirect middleware

[](#redirect-middleware)

Simple redirect middleware.

Add an alias in `bootstrap/app.php`:

```
return Application::configure(basePath: dirname(__DIR__))
    ->withMiddleware(function (Middleware $middleware) {
        $middleware->alias([
            // other middleware aliases...
            'redirect' => \Beholdr\LaravelHelpers\Middleware\Redirect::class,
        ]);
```

Example of usage in Folio page:

```
