如何将 phpThumb 与 laravel 一起使用?

How to use phpThumb with laravel?

好的,phpThumb can be installed using composer。但下一步是什么?我应该将 phpThumb 的配置存储在 vendor/james-heinrich/phpthumb/phpThumb.config.php 吗?我到底应该怎么做?没有记录。

所以,为了解决这个问题,我想到了 a composer package。它非常骇人听闻,所以如果您有任何想法,不客气。

使用 OO 界面似乎不是一种选择。首先,the readme 表示:

Calling as an object (not using phpThumb.php):

NOTE: most people don't need to and should not do this. If you just want to display resized images, please just use phpThumb.php, not the object mode. To render output to one (or more) files instead of the browser, you should skip phpThumb.php and instantiate your own object. Please take a look at /demo/phpThumb.demo.object.php for details.

Note: phpThumb.php is where the caching code is located, if you instantiate your own phpThumb() object that code is bypassed and it's up to you to handle the reading and writing of cached files.

并且它没有解决配置问题。