forked from laravel/telescope
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathResumeCommand.php
40 lines (34 loc) · 953 Bytes
/
ResumeCommand.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
namespace Laravel\Telescope\Console;
use Illuminate\Console\Command;
use Illuminate\Contracts\Cache\Repository as CacheRepository;
use Symfony\Component\Console\Attribute\AsCommand;
#[AsCommand(name: 'telescope:resume')]
class ResumeCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'telescope:resume';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Unpause all Telescope watchers';
/**
* Execute the console command.
*
* @param \Illuminate\Contracts\Cache\Repository $cache
* @return void
*/
public function handle(CacheRepository $cache)
{
if ($cache->get('telescope:pause-recording')) {
$cache->forget('telescope:pause-recording');
}
$this->info('Telescope watchers resumed successfully.');
}
}