ismailocal/sleep is a Laravel package for laravel - sleep your users.
It currently has 2 GitHub stars and 2 downloads on Packagist.
Install it with composer require ismailocal/sleep.
Discover more Laravel packages by ismailocal
or browse all Laravel packages to compare alternatives.
Last updated
You can sleep users easily.
composer require ismailocal/sleep
php artisan vendor:publish --provider="Ismailocal\Sleep\SleepServiceProvider"
then open "config/sleep.php" and replace "table" name with your sleepable table name.
use Ismailocal\Sleep\Traits\Sleepable;
class User extends Authenticatable{
use Sleepable;
php artisan migrate
Route::middleware(['check.sleep'])->group(function () {
Throwing "UserSleepingException" when user sleeping!
$user->sleep(1, 'day');
or
$user->sleep(2, 'hours');
$user->save();
Check
$user->isSleeping(); // return boolean