laravel-fileapi icon indicating copy to clipboard operation
laravel-fileapi copied to clipboard

Unable to prepare route for serialization. Uses Closure.

Open hbody opened this issue 9 years ago • 2 comments
trafficstars

I can't use artisan route:cache because of this package generates closure routes (with function). Better will be to generate controller routes, because of with this package unable to fully optimize website.

hbody avatar Feb 28 '16 19:02 hbody

It should generate routing path dynamically by its configures files. We will try to let it can be optimized.

FreedomKnight avatar Mar 04 '16 02:03 FreedomKnight

reference: https://github.com/laravel/framework/issues/7319#issuecomment-73362932

Agree with @hbody and @FreedomKnight , we should prevent closure routes since fileapi should be optimized for performance.

BTW, a nginx/apache alias or cache to the storage/app/images folder is recommended for the best performance optimization, the GET API is not necessary to go through PHP. For example, in nginx, setup fastcgi_cache for it.

This should be mentioned in README.

youchenlee avatar Mar 06 '16 19:03 youchenlee