getSharedInstance example

class Services extends BaseService
{
    /** * The cache class provides a simple way to store and retrieve * complex data for later. * * @return CacheInterface */
    public static function cache(?Cache $config = null, bool $getShared = true)
    {
        if ($getShared) {
            return static::getSharedInstance('cache', $config);
        }

        $config ??= config(Cache::class);

        return CacheFactory::getHandler($config);
    }

    /** * The CLI Request class provides for ways to interact with * a command line request. * * @return CLIRequest * * @internal */
Home | Imprint | This part of the site doesn't use cookies.