Skip to main content

ilestis/miscellany

301 stars
2 code files
View ilestis/miscellany on GitHub

app/Providers/ImgServiceProvider.php

Open in GitHub
use App\Services\ImgService;
use Illuminate\Support\ServiceProvider;
 
class ImgServiceProvider extends ServiceProvider
{
public function register()
{
$this->app->singleton(ImgService::class, function ($app) {
return new ImgService();
});
 
$this->app->alias(ImgService::class, 'img');
}
}

config/app.php

Open in GitHub
return [
//
'providers' => [
//
App\Providers\ImgServiceProvider::class,
],
//
];