mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-14 02:54:03 +00:00
Rename CacheAction to CacheService
This commit is contained in:
parent
974414a12d
commit
4c33df1aa5
2 changed files with 6 additions and 6 deletions
|
|
@ -1,24 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Stancl\Tenancy\Tests\Etc;
|
||||
|
||||
use Illuminate\Cache\Repository;
|
||||
|
||||
class CacheAction // todo renamed to CacheService
|
||||
{
|
||||
public function __construct(
|
||||
protected Repository $cache
|
||||
){
|
||||
}
|
||||
|
||||
public function handle(): void
|
||||
{
|
||||
if (tenancy()->initialized) {
|
||||
$this->cache->put('key', tenant()->getTenantKey());
|
||||
} else {
|
||||
$this->cache->put('key', 'central-value');
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue