wip
This commit is contained in:
23
app/Repositories/Ecommerce/Channel/ChannelRepository.php
Normal file
23
app/Repositories/Ecommerce/Channel/ChannelRepository.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Repositories\Ecommerce\Channel;
|
||||
|
||||
use App\Models\Ecommerce\Channel\Channel;
|
||||
use App\Repositories\System\Cache\CacheRepository;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
class ChannelRepository
|
||||
{
|
||||
public const CHANNEL_CACHE_NAME_FOR_NOVA = 'cs-nova-models-channels';
|
||||
|
||||
/**
|
||||
* Channels
|
||||
*/
|
||||
public static function values(): array|Collection
|
||||
{
|
||||
return CacheRepository::make(
|
||||
name: self::CHANNEL_CACHE_NAME_FOR_NOVA,
|
||||
value: fn () => Channel::where('is_visible', true)->pluck('name', 'id')
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user