bookinventory/app/Providers/AppServiceProvider.php
Tyler a1ac81a73a
All checks were successful
continuous-integration/drone/push Build is passing
Add attachments, more pages
2020-12-26 19:34:07 -05:00

34 lines
783 B
PHP

<?php
namespace App\Providers;
use App\Services\BookInformation\BookLookupService;
use App\Services\BookInformation\CachedService;
use App\Services\BookInformation\GoogleBooks;
use Illuminate\Pagination\Paginator;
use Schema;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider {
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot() {
Schema::defaultStringLength(191);
Paginator::useBootstrap();
}
/**
* Register any application services.
*
* @return void
*/
public function register() {
$this->app->singleton(BookLookupService::class, function() {
return new CachedService(new GoogleBooks());
});
}
}