<?php
namespace App\Providers;
use Illuminate\Foundation\AliasLoader;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*/
public function boot()
{
}
/**
* Register any application services.
*/
public function register()
{
if (isDingoApiRequest() || app()->runningUnitTests() || app()->runningInConsole()) {
$this->app->register(DingoApiServiceProvider::class);
AliasLoader::getInstance()->alias('Api', \Dingo\Api\Facade\API::class);
AliasLoader::getInstance()->alias('ApiRoute', \Dingo\Api\Facade\Route::class);
}
}
}