@@ -63,7 +63,8 @@ protected function shouldBeStatic(Request $request, $response): bool
63
63
{
64
64
return
65
65
$ request ->isMethod ('GET ' ) &&
66
- $ response ->getStatusCode () == 200 ;
66
+ $ response ->getStatusCode () == 200 &&
67
+ $ this ->config ->get ('static.enabled ' ) === true ;
67
68
}
68
69
69
70
/**
@@ -121,7 +122,7 @@ public function createStaticFile(Request $request, $response): void
121
122
$ disk = LaravelStatic::disk ();
122
123
123
124
if (! $ disk ->exists ('.gitignore ' )) {
124
- $ disk ->put ('.gitignore ' , '* ' . PHP_EOL . '!.gitignore ' );
125
+ $ disk ->put ('.gitignore ' , '* ' . PHP_EOL . '!.gitignore ' );
125
126
}
126
127
127
128
if ($ response ->getContent ()) {
@@ -153,15 +154,15 @@ public function basePath(Request $request): string
153
154
$ path = $ this ->getDiskPath ();
154
155
155
156
if ($ this ->config ->get ('static.files.include_domain ' )) {
156
- $ path .= '/ ' . $ this ->getDomain ($ request );
157
+ $ path .= '/ ' . $ this ->getDomain ($ request );
157
158
}
158
159
159
160
return $ path ;
160
161
}
161
162
162
163
public function getDiskPath ()
163
164
{
164
- return rtrim ($ this ->config ->get ('filesystems.disks. ' . $ this ->config ->get ('static.files.disk ' ). '.root ' ), '/ ' );
165
+ return rtrim ($ this ->config ->get ('filesystems.disks. ' . $ this ->config ->get ('static.files.disk ' ) . '.root ' ), '/ ' );
165
166
}
166
167
167
168
/**
@@ -191,7 +192,7 @@ protected function getFileExtension($filename, $response): ?string
191
192
return null ;
192
193
}
193
194
194
- return '. ' . $ extension ;
195
+ return '. ' . $ extension ;
195
196
}
196
197
197
198
/**
0 commit comments