first commit
This commit is contained in:
145
config/catch.php
Normal file
145
config/catch.php
Normal file
@@ -0,0 +1,145 @@
|
||||
<?php
|
||||
|
||||
// +----------------------------------------------------------------------
|
||||
// | CatchAdmin
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2017~2021 https://catchadmin.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( https://github.com/JaguarJack/catchadmin/blob/master/LICENSE.md )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: JaguarJack [ njphper@gmail.com ]
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
return [
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| catch-admin default middleware
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| where you can set default middlewares
|
||||
|
|
||||
*/
|
||||
'middleware_group' => [
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| catch-admin catch_auth_middleware_alias
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| where you can set default middlewares
|
||||
|
|
||||
*/
|
||||
'catch_auth_middleware_alias' => [
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| catch-admin super admin id
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| where you can set super admin id
|
||||
|
|
||||
*/
|
||||
'super_admin' => 1,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| catch-admin module setting
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| the root where module generate
|
||||
| the namespace is module root namespace
|
||||
| the default dirs is module generate default dirs
|
||||
*/
|
||||
'module' => [
|
||||
'root' => 'modules',
|
||||
|
||||
'namespace' => 'Modules',
|
||||
|
||||
'default' => ['develop', 'user'],
|
||||
|
||||
'default_dirs' => [
|
||||
'Http'.DIRECTORY_SEPARATOR,
|
||||
|
||||
'Http'.DIRECTORY_SEPARATOR.'Requests'.DIRECTORY_SEPARATOR,
|
||||
|
||||
'Http'.DIRECTORY_SEPARATOR.'Controllers'.DIRECTORY_SEPARATOR,
|
||||
|
||||
'Models'.DIRECTORY_SEPARATOR,
|
||||
|
||||
'views'.DIRECTORY_SEPARATOR,
|
||||
],
|
||||
|
||||
// storage module information
|
||||
// which driver should be used?
|
||||
'driver' => [
|
||||
// currently, catchadmin support file and database
|
||||
// the default is driver
|
||||
'default' => 'file',
|
||||
|
||||
// use database driver
|
||||
'table_name' => 'admin_modules'
|
||||
]
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| catch-admin response
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'response' => [
|
||||
// it's a controller middleware, it's set in CatchController
|
||||
// if you not need json response, don't extend CatchController
|
||||
'always_json' => \Catch\Middleware\JsonResponseMiddleware::class,
|
||||
|
||||
// response listener
|
||||
// it listens [RequestHandled] event, if you don't need this
|
||||
// you can change this config
|
||||
'request_handled_listener' => \Catch\Listeners\RequestHandledListener::class
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| catch-admin auth setting
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'auth' => [
|
||||
'guards' => [
|
||||
'admin' => [
|
||||
'driver' => 'jwt',
|
||||
'provider' => 'admin_users',
|
||||
],
|
||||
],
|
||||
|
||||
'providers' => [
|
||||
'admin_users' => [
|
||||
'driver' => 'eloquent',
|
||||
'model' => \Modules\User\Models\Users::class
|
||||
]
|
||||
]
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| database sql log
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'listen_db_log' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| route config
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
'route' => [
|
||||
'prefix' => 'api',
|
||||
|
||||
'middlewares' => [
|
||||
\Catch\Middleware\AuthMiddleware::class,
|
||||
\Catch\Middleware\JsonResponseMiddleware::class
|
||||
]
|
||||
],
|
||||
];
|
Reference in New Issue
Block a user