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(Manager::class, function () {
            $fractal = new Manager();
            $fractal->setSerializer(new DataArraySerializer());
            $request = app('request');
            if ($request->query->has('include')) {
                $fractal->parseIncludes($request->query->get('include', ''));
            }
            return $fractal;
        });
        $this->app->singleton(Hashids::class, function () {
            return new Hashids('Dorcas Production API', 10);
        });
    }
public function register ( ) { $ this -> app -> singleton ( Manager :: class , function ( ) { $ fractal = new Manager ( ) ; $ fractal -> setSerializer ( new DataArraySerializer ( ) ) ; $ request = app ( 'request' ) ; if ( $ request -> query -> has ( 'include' ) ) { $ fractal -> parseIncludes ( $ request -> query -> get ( 'include' , '' ) ) ; } return $ fractal ; } ) ; $ this -> app -> singleton ( Hashids :: class , function ( ) { return new Hashids ( 'Dorcas Production API' , 10 ) ; } ) ; }
Register any application services.
Register any application services .
# add Fractal to the container //always log  to bugsnag //$this->app->alias('bugsnag.logger', \Illuminate\Contracts\Logging\Log::class); //$this->app->alias('bugsnag.logger', \Psr\Log\LoggerInterface::class); /*$this->app->extend(\Psr\Log\LoggerInterface::class, function ($logger, $app) {
            return new \Bugsnag\BugsnagLaravel\MultiLogger([$logger, $app['bugsnag.logger']]);
        });*/