31 lines
628 B
PHP
31 lines
628 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Console\Scheduling\Schedule;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class SchedulerServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Bootstrap services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
$this->app->booted(function () {
|
|
$schedule = $this->app->make(Schedule::class);
|
|
|
|
// Expire reservations every minute to release held cells.
|
|
$schedule->command('reservations:expire')->everyMinute();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Register services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
// no-op
|
|
}
|
|
}
|