pingcrm/app/Providers/AppServiceProvider.php

41 lines
832 B
PHP

<?php
namespace App\Providers;
use Illuminate\Database\Eloquent\Model;
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()
{
Model::unguard();
$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()
{
//
}
}