app/Providers/AppServiceProvider.php
/**
     * Register any application services.
     *
     * @return void
     */
Register any application services.
@return void
Register any application services . @return void
public function register()
    {
        $this->app->singleton('debug', function () {
            return new Debug();
        });
        $this->app->singleton(
        	\App\Contracts\Repositories\Models\CategoryRepository::class,
	        \App\Repositories\Models\CategoryRepository::class
	    );
        if ($this->app->environment() !== 'production') {
	        $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
	    }
    }
public function register ( ) { $ this -> app -> singleton ( 'debug' , function ( ) { return new Debug ( ) ; } ) ; $ this -> app -> singleton ( \ App \ Contracts \ Repositories \ Models \ CategoryRepository :: class , \ App \ Repositories \ Models \ CategoryRepository :: class ) ; if ( $ this -> app -> environment ( ) !== 'production' ) { $ this -> app -> register ( \ Barryvdh \ LaravelIdeHelper \ IdeHelperServiceProvider :: class ) ; } }
Register any application services.
Register any application services .
//Add Facedes //Add Repositories /*
			|--------------------------------------------------------------------------
			| CategoryRepository
			|--------------------------------------------------------------------------
			|
			| Ở chỗ sử dụng chỉ cần Inject Contracts vào là được
			| use App\Contracts\Repositories\CategoryRepository;
			|
			*/ //Add IdeHelper