Skip to content
Discussion options

You must be logged in to vote

First attempt, I think that I can't do it without extend Illuminate\Database\Query\Builder:

<?php declare(strict_types=1);

namespace App\Domains\Shared\Database\Builder;

use DateInterval;
use DateTimeInterface;
use Illuminate\Contracts\Cache\Repository;
use Illuminate\Database\Query\Builder;

class Cache extends Builder
{

    /**
     * @var array
     */
    protected array $cacheConfig;

    /**
     * @var int|\DateTimeInterface|\DateInterval|null
     */
    protected int|DateTimeInterface|DateInterval|null $cacheTTL;

    /**
     * @var ?string
     */
    protected ?string $cacheKey;

    /**
     * @return array
     */
    protected function runSelect()
    {
        return $this

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by eusonlito
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
1 participant