add artisan command to refresh items
This commit is contained in:
parent
fcff8faa6f
commit
6ec94ad0c2
35
app/Console/Commands/RefreshItemsCache.php
Normal file
35
app/Console/Commands/RefreshItemsCache.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Data\ItemsCollection;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class RefreshItemsCache extends Command
|
||||
{
|
||||
/**
|
||||
* The console command name.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = "items:refresh";
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = "Refresh all items cache";
|
||||
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @param ItemsCollection $itemsCollection
|
||||
* @return void
|
||||
*/
|
||||
public function handle(ItemsCollection $itemsCollection): void
|
||||
{
|
||||
$itemsCollection->refreshAllCache();
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user