masuresh124/auth-idle

This package is used to track the auth activity is idle

1.0.3 2025-01-15 12:44 UTC

This package is not auto-updated.

Last update: 2025-04-23 13:57:08 UTC


README

This plugin offer an intuitive, user-friendly script where users can easily capture the session idle activitity of a user

Installation

Install laravel auth idle component with the composer

 composer require masuresh124/auth-idle

Run the following command to publish the service provider

  php artisan vendor:publish --provider="Masuresh124\AuthIdle\Providers\AuthIdleProvider"

Add the following code in config\app.php

 return [
  .
  .
  .
'providers'   =>[
  .
  .
  Masuresh124\AuthIdle\Providers\AuthIdleProvider::class
]
  ];

In app\Http\Kernel.php add the following middleware

     protected $routeMiddleware = [
        .
        .
        'auth-idle'      => \Masuresh124\AuthIdle\Http\Middleware\AuthIdleMiddleware::class,
    ];

In routes/web.php add the following middleware for routes

  Auth::routes();

  Route::middleware(['auth', 'auth-idle'])->group(function () {
    Route::get('/dashboard', [App\Http\Controllers\HomeController::class, 'index'])->name('dashboard');
});

Updating

If the package is already installed and you are trying to update it to the latest version, please follow the instructions below:

  • Take a backup of the existing config file located at app/config/auth-idle.php.
  • Run the following commands:

Note: The commands below will replace the existing config file with the new one. After that, compare the new config file with your backup and add any missing values as needed.

  composer require masuresh124/auth-idle
  php artisan vendor:publish --provider="Masuresh124\AuthIdle\Providers\AuthIdleProvider"  --tag="config-auth-idle" --force

Badges

MIT License

Authors

Features

  • Capture the user idle activity
  • Can add custom time
  • Add custom conditions