37 lines
		
	
	
	
		
			765 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
	
		
			765 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| namespace App\Providers;
 | |
| 
 | |
| use Illuminate\Support\Facades\Storage;
 | |
| use Illuminate\Support\ServiceProvider;
 | |
| use League\Glide\Server;
 | |
| 
 | |
| class AppServiceProvider extends ServiceProvider
 | |
| {
 | |
|     /**
 | |
|      * Register any application services.
 | |
|      *
 | |
|      * @return void
 | |
|      */
 | |
|     public function register()
 | |
|     {
 | |
|         $this->app->bind(Server::class, function ($app) {
 | |
|             return Server::create([
 | |
|                 'source' => Storage::getDriver(),
 | |
|                 'cache' => Storage::getDriver(),
 | |
|                 'cache_folder' => '.glide-cache',
 | |
|                 'base_url' => 'img',
 | |
|             ]);
 | |
|         });
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * Bootstrap any application services.
 | |
|      *
 | |
|      * @return void
 | |
|      */
 | |
|     public function boot()
 | |
|     {
 | |
|         //
 | |
|     }
 | |
| }
 | 
