芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/store.kwesioben.com/vendor/league/glide/docs/1.0/config/integrations/laravel.md
--- layout: default title: Laravel integration --- # Laravel integration If your application uses the [Laravel](https://laravel.com/) framework, you can use the `LaravelResponseFactory`. Since Laravel uses `HttpFoundation` under the hood, this adapter actually extends the [Symfony adapter](/1.0/config/integrations/symfony/).
This adapter requires Laravel 4 or newer.
## Installation ~~~ bash composer require league/glide-laravel ~~~ ## Configuration ~~~ php new LaravelResponseFactory(app('request')) ]); ~~~ ## Working example Here is a fully functioning example of how to get Glide up and running with Laravel really quick. First, create a new entry in your routes file: ~~~ php where('path', '.*'); ~~~ Next, create a controller that will serve all your Glide images. This will use the default Laravel storage path (`/storage/app`) for the source images. ~~~ php new LaravelResponseFactory(app('request')), 'source' => $filesystem->getDriver(), 'cache' => $filesystem->getDriver(), 'cache_path_prefix' => '.cache', 'base_url' => 'img', ]); return $server->getImageResponse($path, request()->all()); } } ~~~