File tree Expand file tree Collapse file tree 5 files changed +18
-17
lines changed Expand file tree Collapse file tree 5 files changed +18
-17
lines changed Original file line number Diff line number Diff line change 2323 laravel :
2424 - 7.*
2525 - 8.*
26- prefer :
26+ prefer :
2727 - ' prefer-lowest'
2828 - ' prefer-stable'
2929 include :
Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ public function flushQueryCache(array $tags = []): bool
178178 }
179179
180180 foreach ($ tags as $ tag ) {
181- self :: flushQueryCacheWithTag ($ tag );
181+ $ this -> flushQueryCacheWithTag ($ tag );
182182 }
183183
184184 return true ;
Original file line number Diff line number Diff line change @@ -46,6 +46,19 @@ protected static function getFlushQueryCacheObserver()
4646 return FlushQueryCacheObserver::class;
4747 }
4848
49+ /**
50+ * Set the base cache tags that will be present
51+ * on all queries.
52+ *
53+ * @return array
54+ */
55+ protected function getCacheBaseTags (): array
56+ {
57+ return [
58+ (string ) self ::class,
59+ ];
60+ }
61+
4962 /**
5063 * When invalidating automatically on update, you can specify
5164 * which tags to invalidate.
@@ -96,17 +109,4 @@ protected function newBaseQueryBuilder()
96109
97110 return $ builder ->cacheBaseTags ($ this ->getCacheBaseTags ());
98111 }
99-
100- /**
101- * Set the base cache tags that will be present
102- * on all queries.
103- *
104- * @return array
105- */
106- protected function getCacheBaseTags (): array
107- {
108- return [
109- (string ) self ::class,
110- ];
111- }
112112}
Original file line number Diff line number Diff line change @@ -153,6 +153,7 @@ public function test_multiple_append_cache_tags()
153153 public function test_append_cache_tags_with_sub_query ()
154154 {
155155 $ user = factory (User::class)->create ();
156+
156157 factory (Post::class)->createMany ([
157158 ['user_id ' => $ user ->id , 'name ' => 'Post 1 on topic 1 ' ],
158159 ['user_id ' => $ user ->id , 'name ' => 'Post 2 on topic 1 ' ],
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ public function getEnvironmentSetUp($app)
4343 $ app ['config ' ]->set ('database.default ' , 'sqlite ' );
4444 $ app ['config ' ]->set ('database.connections.sqlite ' , [
4545 'driver ' => 'sqlite ' ,
46- 'database ' => __DIR__ .'/database.sqlite ' ,
46+ 'database ' => __DIR__ .'/database/database .sqlite ' ,
4747 'prefix ' => '' ,
4848 ]);
4949 $ app ['config ' ]->set (
@@ -64,7 +64,7 @@ public function getEnvironmentSetUp($app)
6464 */
6565 protected function resetDatabase ()
6666 {
67- file_put_contents (__DIR__ .'/database.sqlite ' , null );
67+ file_put_contents (__DIR__ .'/database/database .sqlite ' , null );
6868 }
6969
7070 /**
You can’t perform that action at this time.
0 commit comments