the-3labs-team/laravel-cookie-auth

This package is abandoned and no longer maintained. No replacement package was suggested.

Laravel Cookie Auth

v1.0.7 2023-02-27 21:55 UTC

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads Maintainability

A simple middleware for Laravel applications that creates a cookie for logged-in users. Used for simple configuration with FastCGI.

Installation

You can install the package via composer:

composer require the-3labs-team/laravel-cookie-auth

You can publish the config file with:

php artisan vendor:publish --tag="laravel-cookie-auth-config"

This is the contents of the published config file:

return [
    'cookie_name' => 'skip_cache',
    'cookie_value' => true,
    'cookie_lifetime' => 5,
];

Optionally, you can publish the views using

php artisan vendor:publish --tag="laravel-cookie-auth-views"

Usage

In your Kernel.php add the middleware as follows:

protected $middlewareGroups = [
    'web' => [
        \The3LabsTeam\LaravelCookieAuth\LaravelCookieAuth::class,
        //...

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.