-
Notifications
You must be signed in to change notification settings - Fork 4
Initial project configuration
Yan Datsyuk edited this page May 19, 2017
·
2 revisions
- Open your
config/app.phpand 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,-
Publish all required files by vendors. Execute command:
php artisan vendor:publish -
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
- Connect middleware in the
App/Http/Kernel.phpto the$routeMiddlewarearray.
'check.role.access' => CheckAccess::class,- Edit swagger config file. Add
'/routes'path in'config/l5-swagger.php', annotation path.
'annotations' => [base_path('app'), base_path('routes')]