File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 99use Response ;
1010use Storage ;
1111use SystemInc \LaravelAdmin \Admin ;
12+ use SystemInc \LaravelAdmin \Traits \HelpersTrait ;
1213
1314class AdminController extends Controller
1415{
16+ use HelpersTrait;
17+
1518 /**
1619 * Index admin page.
1720 *
@@ -99,7 +102,7 @@ public function anyUploadTinyImage(Request $request)
99102 $ allowed = ['jpg ' , 'jpeg ' , 'gif ' , 'png ' ];
100103
101104 foreach ($ request ->file ('files ' ) as $ file ) {
102- if ($ file ->isValid () && in_array ($ file ->getClientOriginalExtension (), $ allowed ) && strpos ($ directory , 'images/tiny ' ) != false ) {
105+ if ($ file ->isValid () && in_array ($ file ->getClientOriginalExtension (), $ allowed ) && strpos ($ directory , 'images/tiny ' ) !== false ) {
103106 $ original = $ this ->cleanSpecialChars ($ file ->getClientOriginalName ());
104107
105108 $ original_image = Image::make ($ file )->encode ();
@@ -122,7 +125,7 @@ public function postDeleteTinyImage(Request $request)
122125 {
123126 $ path = $ request ->get ('path ' );
124127
125- if (Storage::exists ($ path ) && strpos ($ path , 'images/tiny ' ) != false ) {
128+ if (Storage::exists ($ path ) && strpos ($ path , 'images/tiny ' ) !== false ) {
126129 Storage::delete ($ path );
127130 }
128131
You can’t perform that action at this time.
0 commit comments