src/FactoryServiceProvider.php
/**
     * Register the service provider.
     *
     * @return void
     */
Register the service provider.
@return void
Register the service provider . @return void
public function register()
    {
        $this->app->singleton(Factory::class, function ($app) {
            $faker = Faker::create();
            $analogueManager = $app->make('analogue');
            return Factory::construct($faker, database_path('factories'), $analogueManager);
        });
    }
public function register ( ) { $ this -> app -> singleton ( Factory :: class , function ( $ app ) { $ faker = Faker :: create ( ) ; $ analogueManager = $ app -> make ( 'analogue' ) ; return Factory :: construct ( $ faker , database_path ( 'factories' ) , $ analogueManager ) ; } ) ; }
Register the service provider.
Register the service provider .