mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 22:46:16 +00:00
API Feature (#334)
This commit is contained in:
47
config/route-attributes.php
Normal file
47
config/route-attributes.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
/*
|
||||
* Automatic registration of routes will only happen if this setting is `true`
|
||||
*/
|
||||
'enabled' => true,
|
||||
|
||||
/*
|
||||
* Controllers in these directories that have routing attributes
|
||||
* will automatically be registered.
|
||||
*
|
||||
* Optionally, you can specify group configuration by using key/values
|
||||
*/
|
||||
'directories' => [
|
||||
app_path('Http/Controllers') => [
|
||||
'prefix' => '',
|
||||
'middleware' => 'web',
|
||||
'patterns' => ['*Controller.php'],
|
||||
'not_patterns' => ['API/*'],
|
||||
],
|
||||
app_path('Http/Controllers/API') => [
|
||||
'prefix' => '',
|
||||
'middleware' => 'api',
|
||||
'patterns' => ['*Controller.php'],
|
||||
'not_patterns' => [],
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
* This middleware will be applied to all routes.
|
||||
*/
|
||||
'middleware' => [
|
||||
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||
],
|
||||
|
||||
/*
|
||||
* When enabled, implicitly scoped bindings will be enabled by default.
|
||||
* You can override this behaviour by using the `ScopeBindings` attribute, and passing `false` to it.
|
||||
*
|
||||
* Possible values:
|
||||
* - null: use the default behaviour
|
||||
* - true: enable implicitly scoped bindings for all routes
|
||||
* - false: disable implicitly scoped bindings for all routes
|
||||
*/
|
||||
'scope-bindings' => null,
|
||||
];
|
Reference in New Issue
Block a user