UniSharp / laravel-fileapi

Laravel File API with image thumbnail support
MIT License
51 stars 16 forks source link

Unable to prepare route for serialization. Uses Closure. #4

Open hbody opened 8 years ago

hbody commented 8 years ago

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.

FreedomKnight commented 8 years ago

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

youchenlee commented 8 years ago

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.