This repository has been archived by the owner on Jul 12, 2024. It is now read-only.
generated from spatie/package-skeleton-laravel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Code refactoring
- Loading branch information
FoxWS
authored
Sep 24, 2022
1 parent
170ac9a
commit dff0218
Showing
24 changed files
with
462 additions
and
586 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
<?php | ||
|
||
namespace Foxws\LaravelMultidomain\Commands; | ||
namespace Foxws\MultiDomain\Commands; | ||
|
||
use Foxws\LaravelMultidomain\Contracts\RepositoryInterface; | ||
use Foxws\LaravelMultidomain\Support\DomainRepository; | ||
use Illuminate\Console\Command; | ||
use Illuminate\Support\Facades\Cache; | ||
|
||
class ClearCommand extends Command | ||
{ | ||
public $signature = 'multidomain:clear'; | ||
|
||
public $description = 'Clear the domain repository cache.'; | ||
public $description = 'Clear the multidomain cache.'; | ||
|
||
public function handle(): void | ||
{ | ||
/** @var DomainRepository $repository */ | ||
$repository = app(RepositoryInterface::class); | ||
$repository->removeCached(); | ||
$this->clearCache(); | ||
|
||
$this->info('Domains cached cleared.'); | ||
$this->info('Domain cache cleared.'); | ||
} | ||
|
||
protected function clearCache(): bool | ||
{ | ||
return Cache::forget('multidomain'); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.