From aa76a892bf0700f2daae93ca9e6ab0ba83bd637d Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Thu, 2 Apr 2020 15:22:25 +0800 Subject: [PATCH] Use app() instead of $this->app. Signed-off-by: Mior Muhammad Zaki --- src/Database/CachableQueryServiceProvider.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Database/CachableQueryServiceProvider.php b/src/Database/CachableQueryServiceProvider.php index 3d12dcf..c35c464 100644 --- a/src/Database/CachableQueryServiceProvider.php +++ b/src/Database/CachableQueryServiceProvider.php @@ -14,19 +14,19 @@ class CachableQueryServiceProvider extends ServiceProvider public function register() { QueryBuilder::macro('remember', function ($duration, $key = null) { - return (new CacheDecorator($this, $this->app->make('cache.store')))->remember($duration, $key); + return (new CacheDecorator($this, \app('cache.store')))->remember($duration, $key); }); QueryBuilder::macro('rememberForever', function ($key = null) { - return (new CacheDecorator($this, $this->app->make('cache.store')))->rememberForever($key); + return (new CacheDecorator($this, \app('cache.store')))->rememberForever($key); }); EloquentBuilder::macro('remember', function ($duration, $key = null) { - return (new CacheDecorator($this, $this->app->make('cache.store')))->remember($duration, $key); + return (new CacheDecorator($this, \app('cache.store')))->remember($duration, $key); }); EloquentBuilder::macro('rememberForever', function ($key = null) { - return (new CacheDecorator($this, $this->app->make('cache.store')))->rememberForever($key); + return (new CacheDecorator($this, \app('cache.store')))->rememberForever($key); }); } }