You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1018 B
49 lines
1018 B
<?php
|
|
|
|
namespace App\HiLib\Providers;
|
|
|
|
use Illuminate\Support\Facades\DB;
|
|
use Illuminate\Support\Stringable;
|
|
use Illuminate\Support\ServiceProvider;
|
|
class HiLibraryServiceProvider extends ServiceProvider
|
|
{
|
|
|
|
/**
|
|
* Register any application services.
|
|
*
|
|
* Within the register method, you should only bind things into the service container.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function register()
|
|
{
|
|
$this->app->singleton(
|
|
\Illuminate\Contracts\Debug\ExceptionHandler::class,
|
|
\App\HiLib\Exceptions\Handler::class
|
|
);
|
|
|
|
Stringable::macro('then', function($callback) {
|
|
return new Stringable($callback($this));
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
DB::enableQueryLog();
|
|
}
|
|
|
|
/**
|
|
* Get the services provided by the provider.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function provides()
|
|
{
|
|
//
|
|
}
|
|
}
|