Skip to content

Initial project configuration

Yan Datsyuk edited this page May 19, 2017 · 2 revisions

List of steps for a proper project configuration.

  1. Open your config/app.php and add this line in providers section.
    TMPHP\RestApiGenerators\GeneratorsServiceProviders::class,
    Dingo\Api\Provider\LaravelServiceProvider::class,
    Way\Generators\GeneratorsServiceProvider::class,
    Xethron\MigrationsGenerator\MigrationsGeneratorServiceProvider::class,
    Tymon\JWTAuth\Providers\JWTAuthServiceProvider::class,
    L5Swagger\L5SwaggerServiceProvider::class,
    Abhijitghogre\LaravelDbClearCommand\LaravelDbClearCommandServiceProvider::class,
  1. Publish all required files by vendors. Execute command: php artisan vendor:publish

  2. Add missed configuration to your .env file.

  • set proper connection to the database
  • add configuration for dingo/api package. See detailed docs here
  • add required configuration string, which is API_DOMAIN=yourdomain.dev
  1. Connect middleware in the App/Http/Kernel.php to the $routeMiddleware array.
'check.role.access' => CheckAccess::class,
  1. Edit swagger config file. Add '/routes' path in 'config/l5-swagger.php', annotation path.
'annotations' => [base_path('app'), base_path('routes')]
Clone this wiki locally