diff --git a/.gitignore b/.gitignore
index 779c8e6..bfcecea 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,7 +10,7 @@
/storage/framework/testing/*
/storage/framework/views/*
/storage/framework/workerman/*
-/config
+
.env
.env.backup
.phpunit.result.cache
@@ -18,4 +18,4 @@ Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
-.idea
\ No newline at end of file
+.idea
diff --git a/config/admin-extensions.php b/config/admin-extensions.php
new file mode 100644
index 0000000..747edb6
--- /dev/null
+++ b/config/admin-extensions.php
@@ -0,0 +1,27 @@
+ [
+ 'imported' => true,
+ 'imported_at' => '2020-08-10 15:00:05',
+ 'enable' => true,
+ ],
+ 'iframe-tabs' => [
+ 'enable' => false,
+ 'imported' => true,
+ 'imported_at' => '2020-10-19 16:37:52',
+ 'home_action' => 'App\Admin\Controllers\HomeController@index',
+ 'home_title' => 'Home',
+ 'home_icon' => 'fa-home',
+ 'use_icon' => true,
+ 'tabs_css' => 'vendor/laravel-admin-ext/iframe-tabs/dashboard.css',
+ 'layer_path' => 'vendor/laravel-admin-ext/iframe-tabs/layer/layer.js',
+ 'pass_urls' => [
+ 0 => '/auth/logout',
+ 1 => '/auth/lock',
+ ],
+ 'force_login_in_top' => true,
+ 'tabs_left' => 42,
+ 'bind_urls' => 'popup',
+ 'bind_selecter' => 'a.grid-row-view,a.grid-row-edit,.column-__actions__ ul.dropdown-menu a,.box-header .pull-right .btn-success,.popup',
+ ],
+];
diff --git a/config/admin.php b/config/admin.php
new file mode 100644
index 0000000..5333d7c
--- /dev/null
+++ b/config/admin.php
@@ -0,0 +1,392 @@
+ [
+ // 与新应用的配置文件名称一致
+ // 设置为true启用,false则是停用
+
+ 'block-control' => true,
+
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | dcat-admin name
+ |--------------------------------------------------------------------------
+ |
+ | This value is the name of dcat-admin, This setting is displayed on the
+ | login page.
+ |
+ */
+ 'name' => 'FineX',
+
+ 'lang' => 'zh-CN',
+
+ /*
+ |--------------------------------------------------------------------------
+ | dcat-admin logo
+ |--------------------------------------------------------------------------
+ |
+ | The logo of all admin pages. You can also set it as an image by using a
+ | `img` tag, eg '
'.
+ |
+ */
+ 'logo' => '
FineX',
+
+ /*
+ |--------------------------------------------------------------------------
+ | dcat-admin mini logo
+ |--------------------------------------------------------------------------
+ |
+ | The logo of all admin pages when the sidebar menu is collapsed. You can
+ | also set it as an image by using a `img` tag, eg
+ | '
'.
+ |
+ */
+ 'logo-mini' => '
',
+
+ /*
+ |--------------------------------------------------------------------------
+ | User default avatar
+ |--------------------------------------------------------------------------
+ |
+ | Set a default avatar for newly created users.
+ |
+ */
+ 'default_avatar' => '@admin/images/default-avatar.jpg',
+
+ /*
+ |--------------------------------------------------------------------------
+ | dcat-admin route settings
+ |--------------------------------------------------------------------------
+ |
+ | The routing configuration of the admin page, including the path prefix,
+ | the controller namespace, and the default middleware. If you want to
+ | access through the root path, just set the prefix to empty string.
+ |
+ */
+ 'route' => [
+
+ 'prefix' => env('ADMIN_ROUTE_PREFIX', 'admin'),
+
+ 'namespace' => 'App\\Admin\\Controllers',
+
+ 'middleware' => ['web', 'admin'],
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | dcat-admin install directory
+ |--------------------------------------------------------------------------
+ |
+ | The installation directory of the controller and routing configuration
+ | files of the administration page. The default is `app/Admin`, which must
+ | be set before running `artisan admin::install` to take effect.
+ |
+ */
+ 'directory' => app_path('Admin'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | dcat-admin html title
+ |--------------------------------------------------------------------------
+ |
+ | Html title for all pages.
+ |
+ */
+ 'title' => '总后台',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Assets hostname
+ |--------------------------------------------------------------------------
+ |
+ */
+ 'assets_server' => env('ADMIN_ASSETS_SERVER'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Access via `https`
+ |--------------------------------------------------------------------------
+ |
+ | If your page is going to be accessed via https, set it to `true`.
+ |
+ */
+ 'https' => env('ADMIN_HTTPS', false),
+
+ /*
+ |--------------------------------------------------------------------------
+ | dcat-admin auth setting
+ |--------------------------------------------------------------------------
+ |
+ | Authentication settings for all admin pages. Include an authentication
+ | guard and a user provider setting of authentication driver.
+ |
+ | You can specify a controller for `login` `logout` and other auth routes.
+ |
+ */
+ 'auth' => [
+ 'enable' => true,
+
+ 'controller' => App\Admin\Controllers\AuthController::class,
+
+ 'guard' => 'admin',
+
+ 'guards' => [
+ 'admin' => [
+ 'driver' => 'session',
+ 'provider' => 'admin',
+ ],
+ ],
+
+ 'providers' => [
+ 'admin' => [
+ 'driver' => 'eloquent',
+ 'model' => Dcat\Admin\Models\Administrator::class,
+ ],
+ ],
+
+ // Add "remember me" to login form
+ 'remember' => true,
+
+ // All method to path like: auth/users/*/edit
+ // or specific method to path like: get:auth/users.
+ 'except' => [
+ 'auth/login',
+ 'auth/logout',
+ 'kline',
+ 'generateKline',
+ 'getKlineConfig',
+ ],
+
+ ],
+
+ 'grid' => [
+
+ /*
+ |--------------------------------------------------------------------------
+ | The global Grid action display class.
+ |--------------------------------------------------------------------------
+ */
+ // 'grid_action_class' => Dcat\Admin\Grid\Displayers\DropdownActions::class,
+ 'grid_action_class' => Dcat\Admin\Grid\Displayers\Actions::class,
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | dcat-admin helpers setting.
+ |--------------------------------------------------------------------------
+ */
+ 'helpers' => [
+ 'enable' => false,
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | dcat-admin permission setting
+ |--------------------------------------------------------------------------
+ |
+ | Permission settings for all admin pages.
+ |
+ */
+ 'permission' => [
+ // Whether enable permission.
+ 'enable' => true,
+
+ // All method to path like: auth/users/*/edit
+ // or specific method to path like: get:auth/users.
+ 'except' => [
+ '/',
+ 'dashboard',
+ 'api/agents',
+ 'auth/login',
+ 'auth/logout',
+ 'auth/setting',
+ 'kline',
+ 'generateKline',
+ 'getKlineConfig',
+ ],
+
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | dcat-admin menu setting
+ |--------------------------------------------------------------------------
+ |
+ */
+ 'menu' => [
+ 'cache' => [
+ // enable cache or not
+ 'enable' => false,
+ 'store' => 'file',
+ ],
+
+ // Whether enable menu bind to a permission.
+ 'bind_permission' => true,
+
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | dcat-admin upload setting
+ |--------------------------------------------------------------------------
+ |
+ | File system configuration for form upload files and images, including
+ | disk and upload path.
+ |
+ */
+ 'upload' => [
+
+ // Disk in `config/filesystem.php`.
+ 'disk' => 'admin',
+
+ // Image and file upload path under the disk above.
+ 'directory' => [
+ 'image' => 'images',
+ 'file' => 'files',
+ ],
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | dcat-admin database settings
+ |--------------------------------------------------------------------------
+ |
+ | Here are database settings for dcat-admin builtin model & tables.
+ |
+ */
+ 'database' => [
+
+ // Database connection for following tables.
+ 'connection' => '',
+
+ // User tables and model.
+ 'users_table' => 'admin_users',
+ 'users_model' => Dcat\Admin\Models\Administrator::class,
+
+ // Role table and model.
+ 'roles_table' => 'admin_roles',
+ 'roles_model' => Dcat\Admin\Models\Role::class,
+
+ // Permission table and model.
+ 'permissions_table' => 'admin_permissions',
+ 'permissions_model' => Dcat\Admin\Models\Permission::class,
+
+ // Menu table and model.
+ 'menu_table' => 'admin_menu',
+ 'menu_model' => Dcat\Admin\Models\Menu::class,
+
+ // Pivot table for table above.
+ 'operation_log_table' => 'admin_operation_log',
+ 'role_users_table' => 'admin_role_users',
+ 'role_permissions_table' => 'admin_role_permissions',
+ 'role_menu_table' => 'admin_role_menu',
+ 'permission_menu_table' => 'admin_permission_menu',
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | User operation log setting
+ |--------------------------------------------------------------------------
+ |
+ | By setting this option to open or close operation log in dcat-admin.
+ |
+ */
+ 'operation_log' => [
+
+ 'enable' => true,
+
+ // Only logging allowed methods in the list
+ 'allowed_methods' => ['GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'CONNECT', 'OPTIONS', 'TRACE', 'PATCH'],
+
+ 'secret_fields' => [
+ 'password',
+ 'password_confirmation',
+ ],
+
+ // Routes that will not log to database.
+ // All method to path like: auth/logs/*/edit
+ // or specific method to path like: get:auth/logs.
+ 'except' => [
+ 'auth/logs*',
+ ],
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Admin map field provider
+ |--------------------------------------------------------------------------
+ |
+ | Supported: "tencent", "google", "yandex".
+ |
+ */
+ 'map_provider' => 'google',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Application layout
+ |--------------------------------------------------------------------------
+ |
+ | This value is the layout of admin pages.
+ */
+ 'layout' => [
+ // indigo, blue, blue-light, blue-dark, green
+ 'color' => 'indigo',
+
+ // 'body_class' => 'dark-mode',
+ 'body_class' => '',
+
+ 'sidebar_collapsed' => false,
+
+ 'sidebar_dark' => false,
+
+ 'dark_mode_switch' => true,
+
+ // bg-primary, bg-info, bg-warning, bg-success, bg-danger, bg-dark
+ 'navbar_color' => '',
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | The exception handler class
+ |--------------------------------------------------------------------------
+ |
+ */
+ 'exception_handler' => \Dcat\Admin\Exception\Handler::class,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Enable default breadcrumb
+ |--------------------------------------------------------------------------
+ |
+ | Whether enable default breadcrumb for every page content.
+ */
+ 'enable_default_breadcrumb' => true,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Extension Directory
+ |--------------------------------------------------------------------------
+ |
+ | When you use command `php artisan admin:extend` to generate extensions,
+ | the extension files will be generated in this directory.
+ */
+ 'extension_dir' => app_path('Admin/Extensions'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Settings for extensions.
+ |--------------------------------------------------------------------------
+ |
+ | You can find all available extensions here
+ | https://github.com/dcat-admin-extensions.
+ |
+ */
+ 'extensions' => [
+ 'ueditor' => [
+ 'disk' => 'admin',
+ ],
+ ],
+];
diff --git a/config/api.php b/config/api.php
new file mode 100644
index 0000000..d6e8836
--- /dev/null
+++ b/config/api.php
@@ -0,0 +1,232 @@
+ env('API_STANDARDS_TREE', 'x'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | API Subtype
+ |--------------------------------------------------------------------------
+ |
+ | Your subtype will follow the standards tree you use when used in the
+ | "Accept" header to negotiate the content type and version.
+ |
+ | For example: Accept: application/x.SUBTYPE.v1+json
+ |
+ */
+
+ 'subtype' => env('API_SUBTYPE', ''),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Default API Version
+ |--------------------------------------------------------------------------
+ |
+ | This is the default version when strict mode is disabled and your API
+ | is accessed via a web browser. It's also used as the default version
+ | when generating your APIs documentation.
+ |
+ */
+
+ 'version' => env('API_VERSION', 'v1'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Default API Prefix
+ |--------------------------------------------------------------------------
+ |
+ | A default prefix to use for your API routes so you don't have to
+ | specify it for each group.
+ |
+ */
+
+ 'prefix' => env('API_PREFIX', null),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Default API Domain
+ |--------------------------------------------------------------------------
+ |
+ | A default domain to use for your API routes so you don't have to
+ | specify it for each group.
+ |
+ */
+
+ 'domain' => env('API_DOMAIN', null),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Name
+ |--------------------------------------------------------------------------
+ |
+ | When documenting your API using the API Blueprint syntax you can
+ | configure a default name to avoid having to manually specify
+ | one when using the command.
+ |
+ */
+
+ 'name' => env('API_NAME', null),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Conditional Requests
+ |--------------------------------------------------------------------------
+ |
+ | Globally enable conditional requests so that an ETag header is added to
+ | any successful response. Subsequent requests will perform a check and
+ | will return a 304 Not Modified. This can also be enabled or disabled
+ | on certain groups or routes.
+ |
+ */
+
+ 'conditionalRequest' => env('API_CONDITIONAL_REQUEST', true),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Strict Mode
+ |--------------------------------------------------------------------------
+ |
+ | Enabling strict mode will require clients to send a valid Accept header
+ | with every request. This also voids the default API version, meaning
+ | your API will not be browsable via a web browser.
+ |
+ */
+
+ 'strict' => env('API_STRICT', false),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Debug Mode
+ |--------------------------------------------------------------------------
+ |
+ | Enabling debug mode will result in error responses caused by thrown
+ | exceptions to have a "debug" key that will be populated with
+ | more detailed information on the exception.
+ |
+ */
+
+ 'debug' => env('API_DEBUG', false),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Generic Error Format
+ |--------------------------------------------------------------------------
+ |
+ | When some HTTP exceptions are not caught and dealt with the API will
+ | generate a generic error response in the format provided. Any
+ | keys that aren't replaced with corresponding values will be
+ | removed from the final response.
+ |
+ */
+
+ 'errorFormat' => [
+ 'message' => ':message',
+ 'errors' => ':errors',
+ 'code' => ':code',
+ 'status_code' => ':status_code',
+ 'debug' => ':debug',
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | API Middleware
+ |--------------------------------------------------------------------------
+ |
+ | Middleware that will be applied globally to all API requests.
+ |
+ */
+
+ 'middleware' => [
+
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Authentication Providers
+ |--------------------------------------------------------------------------
+ |
+ | The authentication providers that should be used when attempting to
+ | authenticate an incoming API request.
+ |
+ */
+
+ 'auth' => [
+
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Throttling / Rate Limiting
+ |--------------------------------------------------------------------------
+ |
+ | Consumers of your API can be limited to the amount of requests they can
+ | make. You can create your own throttles or simply change the default
+ | throttles.
+ |
+ */
+
+ 'throttling' => [
+
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Response Transformer
+ |--------------------------------------------------------------------------
+ |
+ | Responses can be transformed so that they are easier to format. By
+ | default a Fractal transformer will be used to transform any
+ | responses prior to formatting. You can easily replace
+ | this with your own transformer.
+ |
+ */
+
+ 'transformer' => env('API_TRANSFORMER', Dingo\Api\Transformer\Adapter\Fractal::class),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Response Formats
+ |--------------------------------------------------------------------------
+ |
+ | Responses can be returned in multiple formats by registering different
+ | response formatters. You can also customize an existing response
+ | formatter with a number of options to configure its output.
+ |
+ */
+
+ 'defaultFormat' => env('API_DEFAULT_FORMAT', 'json'),
+
+ 'formats' => [
+
+ 'json' => Dingo\Api\Http\Response\Format\Json::class,
+
+ ],
+
+ 'formatsOptions' => [
+
+ 'json' => [
+ 'pretty_print' => env('API_JSON_FORMAT_PRETTY_PRINT_ENABLED', false),
+ 'indent_style' => env('API_JSON_FORMAT_INDENT_STYLE', 'space'),
+ 'indent_size' => env('API_JSON_FORMAT_INDENT_SIZE', 2),
+ ],
+
+ ],
+
+];
diff --git a/config/app.php b/config/app.php
new file mode 100644
index 0000000..ba37b72
--- /dev/null
+++ b/config/app.php
@@ -0,0 +1,244 @@
+ env('APP_NAME', 'Laravel'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Application Environment
+ |--------------------------------------------------------------------------
+ |
+ | This value determines the "environment" your application is currently
+ | running in. This may determine how you prefer to configure various
+ | services the application utilizes. Set this in your ".env" file.
+ |
+ */
+
+ 'env' => env('APP_ENV', 'production'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Application Debug Mode
+ |--------------------------------------------------------------------------
+ |
+ | When your application is in debug mode, detailed error messages with
+ | stack traces will be shown on every error that occurs within your
+ | application. If disabled, a simple generic error page is shown.
+ |
+ */
+
+ 'debug' => env('APP_DEBUG', true),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Application URL
+ |--------------------------------------------------------------------------
+ |
+ | This URL is used by the console to properly generate URLs when using
+ | the Artisan command line tool. You should set this to the root of
+ | your application so that it is used when running Artisan tasks.
+ |
+ */
+
+ 'url' => env('APP_URL', 'http://localhost'),
+
+ 'asset_url' => env('ASSET_URL', null),
+
+ 'pc_url' => env('PC_URL', null),
+
+ 'h5_url' => env('H5_URL', null),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Application Timezone
+ |--------------------------------------------------------------------------
+ |
+ | Here you may specify the default timezone for your application, which
+ | will be used by the PHP date and date-time functions. We have gone
+ | ahead and set this to a sensible default for you out of the box.
+ |
+ */
+
+ // 'timezone' => 'PRC',
+ // 'timezone' => 'UTC',
+ 'timezone' => 'Asia/Shanghai',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Application Locale Configuration
+ |--------------------------------------------------------------------------
+ |
+ | The application locale determines the default locale that will be used
+ | by the translation service provider. You are free to set this value
+ | to any of the locales which will be supported by the application.
+ |
+ */
+
+ 'locale' => 'zh-CN',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Application Fallback Locale
+ |--------------------------------------------------------------------------
+ |
+ | The fallback locale determines the locale to use when the current one
+ | is not available. You may change the value to correspond to any of
+ | the language folders that are provided through your application.
+ |
+ */
+
+ 'fallback_locale' => 'zh-CN',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Faker Locale
+ |--------------------------------------------------------------------------
+ |
+ | This locale will be used by the Faker PHP library when generating fake
+ | data for your database seeds. For example, this will be used to get
+ | localized telephone numbers, street address information and more.
+ |
+ */
+
+ 'faker_locale' => 'zh-CN',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Encryption Key
+ |--------------------------------------------------------------------------
+ |
+ | This key is used by the Illuminate encrypter service and should be set
+ | to a random, 32 character string, otherwise these encrypted strings
+ | will not be safe. Please do this before deploying an application!
+ |
+ */
+
+ 'key' => env('APP_KEY'),
+
+ 'cipher' => 'AES-256-CBC',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Autoloaded Service Providers
+ |--------------------------------------------------------------------------
+ |
+ | The service providers listed here will be automatically loaded on the
+ | request to your application. Feel free to add your own services to
+ | this array to grant expanded functionality to your applications.
+ |
+ */
+
+ 'providers' => [
+
+ /*
+ * Laravel Framework Service Providers...
+ */
+ Illuminate\Auth\AuthServiceProvider::class,
+ Illuminate\Broadcasting\BroadcastServiceProvider::class,
+ Illuminate\Bus\BusServiceProvider::class,
+ Illuminate\Cache\CacheServiceProvider::class,
+ Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
+ Illuminate\Cookie\CookieServiceProvider::class,
+ Illuminate\Database\DatabaseServiceProvider::class,
+ Illuminate\Encryption\EncryptionServiceProvider::class,
+ Illuminate\Filesystem\FilesystemServiceProvider::class,
+ Illuminate\Foundation\Providers\FoundationServiceProvider::class,
+ Illuminate\Hashing\HashServiceProvider::class,
+ Illuminate\Mail\MailServiceProvider::class,
+ Illuminate\Notifications\NotificationServiceProvider::class,
+ Illuminate\Pagination\PaginationServiceProvider::class,
+ Illuminate\Pipeline\PipelineServiceProvider::class,
+ Illuminate\Queue\QueueServiceProvider::class,
+ Illuminate\Redis\RedisServiceProvider::class,
+ Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
+ Illuminate\Session\SessionServiceProvider::class,
+ Illuminate\Translation\TranslationServiceProvider::class,
+ Illuminate\Validation\ValidationServiceProvider::class,
+ Illuminate\View\ViewServiceProvider::class,
+
+ /*
+ * Package Service Providers...
+ */
+
+ /*
+ * Application Service Providers...
+ */
+ App\Providers\AppServiceProvider::class,
+ App\Providers\AuthServiceProvider::class,
+ // App\Providers\BroadcastServiceProvider::class,
+ App\Providers\EventServiceProvider::class,
+ App\Providers\RouteServiceProvider::class,
+
+ App\Providers\EasySmsServiceProvider::class,
+ Intervention\Image\ImageServiceProvider::class,
+ //>>注册验证码服务
+ Mews\Captcha\CaptchaServiceProvider::class,
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Class Aliases
+ |--------------------------------------------------------------------------
+ |
+ | This array of class aliases will be registered when this application
+ | is started. However, feel free to register as many as you wish as
+ | the aliases are "lazy" loaded so they don't hinder performance.
+ |
+ */
+
+ 'aliases' => [
+
+ 'App' => Illuminate\Support\Facades\App::class,
+ 'Arr' => Illuminate\Support\Arr::class,
+ 'Artisan' => Illuminate\Support\Facades\Artisan::class,
+ 'Auth' => Illuminate\Support\Facades\Auth::class,
+ 'Blade' => Illuminate\Support\Facades\Blade::class,
+ 'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
+ 'Bus' => Illuminate\Support\Facades\Bus::class,
+ 'Cache' => Illuminate\Support\Facades\Cache::class,
+ 'Config' => Illuminate\Support\Facades\Config::class,
+ 'Cookie' => Illuminate\Support\Facades\Cookie::class,
+ 'Crypt' => Illuminate\Support\Facades\Crypt::class,
+ 'DB' => Illuminate\Support\Facades\DB::class,
+ 'Eloquent' => Illuminate\Database\Eloquent\Model::class,
+ 'Event' => Illuminate\Support\Facades\Event::class,
+ 'File' => Illuminate\Support\Facades\File::class,
+ 'Gate' => Illuminate\Support\Facades\Gate::class,
+ 'Hash' => Illuminate\Support\Facades\Hash::class,
+ 'Lang' => Illuminate\Support\Facades\Lang::class,
+ 'Log' => Illuminate\Support\Facades\Log::class,
+ 'Mail' => Illuminate\Support\Facades\Mail::class,
+ 'Notification' => Illuminate\Support\Facades\Notification::class,
+ 'Password' => Illuminate\Support\Facades\Password::class,
+ 'Queue' => Illuminate\Support\Facades\Queue::class,
+ 'Redirect' => Illuminate\Support\Facades\Redirect::class,
+ 'Redis' => Illuminate\Support\Facades\Redis::class,
+ 'Request' => Illuminate\Support\Facades\Request::class,
+ 'Response' => Illuminate\Support\Facades\Response::class,
+ 'Route' => Illuminate\Support\Facades\Route::class,
+ 'Schema' => Illuminate\Support\Facades\Schema::class,
+ 'Session' => Illuminate\Support\Facades\Session::class,
+ 'Storage' => Illuminate\Support\Facades\Storage::class,
+ 'Str' => Illuminate\Support\Str::class,
+ 'URL' => Illuminate\Support\Facades\URL::class,
+ 'Validator' => Illuminate\Support\Facades\Validator::class,
+ 'View' => Illuminate\Support\Facades\View::class,
+ 'Image' => Intervention\Image\Facades\Image::class,
+ //>>注册验证码别名
+ 'Captcha' => Mews\Captcha\Facades\Captcha::class,
+
+ ],
+
+];
diff --git a/config/auth.php b/config/auth.php
new file mode 100644
index 0000000..45c6f05
--- /dev/null
+++ b/config/auth.php
@@ -0,0 +1,103 @@
+ [
+ 'guard' => 'web',
+ 'passwords' => 'users',
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Authentication Guards
+ |--------------------------------------------------------------------------
+ |
+ | Next, you may define every authentication guard for your application.
+ | Of course, a great default configuration has been defined for you
+ | here which uses session storage and the Eloquent user provider.
+ |
+ | All authentication drivers have a user provider. This defines how the
+ | users are actually retrieved out of your database or other storage
+ | mechanisms used by this application to persist your user's data.
+ |
+ | Supported: "session", "token"
+ |
+ */
+
+ 'guards' => [
+ 'web' => [
+ 'driver' => 'session',
+ 'provider' => 'users',
+ ],
+
+ 'api' => [
+ 'driver' => 'jwt',
+ 'provider' => 'users',
+ 'hash' => false,
+ ],
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | User Providers
+ |--------------------------------------------------------------------------
+ |
+ | All authentication drivers have a user provider. This defines how the
+ | users are actually retrieved out of your database or other storage
+ | mechanisms used by this application to persist your user's data.
+ |
+ | If you have multiple user tables or models you may configure multiple
+ | sources which represent each model / table. These sources may then
+ | be assigned to any extra authentication guards you have defined.
+ |
+ | Supported: "database", "eloquent"
+ |
+ */
+
+ 'providers' => [
+ 'users' => [
+ 'driver' => 'eloquent',
+ 'model' => App\Models\User::class,
+ ],
+
+ // 'users' => [
+ // 'driver' => 'database',
+ // 'table' => 'users',
+ // ],
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Resetting Passwords
+ |--------------------------------------------------------------------------
+ |
+ | You may specify multiple password reset configurations if you have more
+ | than one user table or model in the application and you want to have
+ | separate password reset settings based on the specific user types.
+ |
+ | The expire time is the number of minutes that the reset token should be
+ | considered valid. This security feature keeps tokens short-lived so
+ | they have less time to be guessed. You may change this as needed.
+ |
+ */
+
+ 'passwords' => [
+ 'users' => [
+ 'provider' => 'users',
+ 'table' => 'password_resets',
+ 'expire' => 60,
+ ],
+ ],
+
+];
diff --git a/config/block-control.php b/config/block-control.php
new file mode 100644
index 0000000..4f4893f
--- /dev/null
+++ b/config/block-control.php
@@ -0,0 +1,363 @@
+ '风控后台',
+
+ /*
+ |--------------------------------------------------------------------------
+ | dcat-admin logo
+ |--------------------------------------------------------------------------
+ |
+ | The logo of all admin pages. You can also set it as an image by using a
+ | `img` tag, eg '
'.
+ |
+ */
+ 'logo' => '
风控',
+
+ /*
+ |--------------------------------------------------------------------------
+ | dcat-admin mini logo
+ |--------------------------------------------------------------------------
+ |
+ | The logo of all admin pages when the sidebar menu is collapsed. You can
+ | also set it as an image by using a `img` tag, eg
+ | '
'.
+ |
+ */
+ 'logo-mini' => '
',
+
+ /*
+ |--------------------------------------------------------------------------
+ | User default avatar
+ |--------------------------------------------------------------------------
+ |
+ | Set a default avatar for newly created users.
+ |
+ */
+ 'default_avatar' => '@admin/images/default-avatar.jpg',
+
+ /*
+ |--------------------------------------------------------------------------
+ | dcat-admin route settings
+ |--------------------------------------------------------------------------
+ |
+ | The routing configuration of the admin page, including the path prefix,
+ | the controller namespace, and the default middleware. If you want to
+ | access through the root path, just set the prefix to empty string.
+ |
+ */
+ 'route' => [
+
+ 'prefix' => 'risk',
+
+ 'namespace' => 'App\\BlockControl\\Controllers',
+
+ 'middleware' => ['web', 'admin'],
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | dcat-admin install directory
+ |--------------------------------------------------------------------------
+ |
+ | The installation directory of the controller and routing configuration
+ | files of the administration page. The default is `app/Admin`, which must
+ | be set before running `artisan admin::install` to take effect.
+ |
+ */
+ 'directory' => app_path('BlockControl'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | dcat-admin html title
+ |--------------------------------------------------------------------------
+ |
+ | Html title for all pages.
+ |
+ */
+ 'title' => '风控后台',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Assets hostname
+ |--------------------------------------------------------------------------
+ |
+ */
+ 'assets_server' => env('ADMIN_ASSETS_SERVER'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Access via `https`
+ |--------------------------------------------------------------------------
+ |
+ | If your page is going to be accessed via https, set it to `true`.
+ |
+ */
+ 'https' => env('ADMIN_HTTPS', true),
+
+ /*
+ |--------------------------------------------------------------------------
+ | dcat-admin auth setting
+ |--------------------------------------------------------------------------
+ |
+ | Authentication settings for all admin pages. Include an authentication
+ | guard and a user provider setting of authentication driver.
+ |
+ | You can specify a controller for `login` `logout` and other auth routes.
+ |
+ */
+ 'auth' => [
+ 'enable' => true,
+
+ 'controller' => App\BlockControl\Controllers\AuthController::class,
+
+ 'guard' => 'block-control',
+
+ 'guards' => [
+ 'block-control' => [
+ 'driver' => 'session',
+ 'provider' => 'block-control',
+ ],
+ ],
+
+ 'providers' => [
+ 'block-control' => [
+ 'driver' => 'eloquent',
+ 'model' => \App\Models\BlockControlAdminUsers::class,
+ ],
+ ],
+
+ // Add "remember me" to login form
+ 'remember' => true,
+
+ // All method to path like: auth/users/*/edit
+ // or specific method to path like: get:auth/users.
+ 'except' => [
+ 'auth/login',
+ 'auth/logout',
+ 'kline',
+ 'generateKline',
+ 'getKlineConfig',
+ ],
+
+ ],
+
+ 'grid' => [
+
+ /*
+ |--------------------------------------------------------------------------
+ | The global Grid action display class.
+ |--------------------------------------------------------------------------
+ */
+ 'grid_action_class' => Dcat\Admin\Grid\Displayers\DropdownActions::class,
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | dcat-admin helpers setting.
+ |--------------------------------------------------------------------------
+ */
+ 'helpers' => [
+ 'enable' => true,
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | dcat-admin permission setting
+ |--------------------------------------------------------------------------
+ |
+ | Permission settings for all admin pages.
+ |
+ */
+ 'permission' => [
+ // Whether enable permission.
+ 'enable' => true,
+
+ // All method to path like: auth/users/*/edit
+ // or specific method to path like: get:auth/users.
+ 'except' => [
+ '/',
+ 'auth/login',
+ 'auth/logout',
+ 'auth/setting',
+ ],
+
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | dcat-admin menu setting
+ |--------------------------------------------------------------------------
+ |
+ */
+ 'menu' => [
+ 'cache' => [
+ // enable cache or not
+ 'enable' => false,
+ 'store' => 'file',
+ ],
+
+ // Whether enable menu bind to a permission.
+ 'bind_permission' => true,
+
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | dcat-admin upload setting
+ |--------------------------------------------------------------------------
+ |
+ | File system configuration for form upload files and images, including
+ | disk and upload path.
+ |
+ */
+ 'upload' => [
+
+ // Disk in `config/filesystem.php`.
+ 'disk' => 'public',
+
+ // Image and file upload path under the disk above.
+ 'directory' => [
+ 'image' => 'images',
+ 'file' => 'files',
+ ],
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | dcat-admin database settings
+ |--------------------------------------------------------------------------
+ |
+ | Here are database settings for dcat-admin builtin model & tables.
+ |
+ */
+ 'database' => [
+
+ // Database connection for following tables.
+ 'connection' => '',
+
+ // User tables and model.
+ 'users_table' => 'block_control_admin_users',
+ 'users_model' => \App\Models\BlockControlAdminUsers::class,
+
+ // Role table and model.
+ 'roles_table' => 'block_control_admin_roles',
+ 'roles_model' => \App\Models\BlockControlAdminRoles::class,
+
+ // Permission table and model.
+ 'permissions_table' => 'block_control_admin_permissions',
+ 'permissions_model' => \App\Models\BlockControlAdminPermissions::class,
+
+ // Menu table and model.
+ 'menu_table' => 'block_control_admin_menu',
+ 'menu_model' => \App\Models\BlockControlAdminMenu::class,
+
+ // Pivot table for table above.
+ 'operation_log_table' => 'block_control_admin_operation_log',
+ 'role_users_table' => 'block_control_admin_role_users',
+ 'role_permissions_table' => 'block_control_admin_role_permissions',
+ 'role_menu_table' => 'block_control_admin_role_menu',
+ 'permission_menu_table' => 'block_control_admin_permission_menu',
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | User operation log setting
+ |--------------------------------------------------------------------------
+ |
+ | By setting this option to open or close operation log in dcat-admin.
+ |
+ */
+ 'operation_log' => [
+
+ 'enable' => true,
+
+ // Only logging allowed methods in the list
+ 'allowed_methods' => ['GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'CONNECT', 'OPTIONS', 'TRACE', 'PATCH'],
+
+ 'secret_fields' => [
+ 'password',
+ 'password_confirmation',
+ ],
+
+ // Routes that will not log to database.
+ // All method to path like: auth/logs/*/edit
+ // or specific method to path like: get:auth/logs.
+ 'except' => [
+ 'auth/logs*',
+ ],
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Admin map field provider
+ |--------------------------------------------------------------------------
+ |
+ | Supported: "tencent", "google", "yandex".
+ |
+ */
+ 'map_provider' => 'google',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Application layout
+ |--------------------------------------------------------------------------
+ |
+ | This value is the layout of admin pages.
+ */
+ 'layout' => [
+ // indigo, blue, blue-light, blue-dark, green
+ 'color' => 'indigo',
+
+ 'body_class' => '',
+
+ 'sidebar_collapsed' => false,
+
+ 'sidebar_dark' => false,
+
+ 'dark_mode_switch' => false,
+
+ // bg-primary, bg-info, bg-warning, bg-success, bg-danger, bg-dark
+ 'navbar_color' => '',
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | The exception handler class
+ |--------------------------------------------------------------------------
+ |
+ */
+ 'exception_handler' => \Dcat\Admin\Exception\Handler::class,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Enable default breadcrumb
+ |--------------------------------------------------------------------------
+ |
+ | Whether enable default breadcrumb for every page content.
+ */
+ 'enable_default_breadcrumb' => true,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Settings for extensions.
+ |--------------------------------------------------------------------------
+ |
+ | You can find all available extensions here
+ | https://github.com/dcat-admin-extensions.
+ |
+ */
+ 'extensions' => [
+
+ ],
+];
diff --git a/config/broadcasting.php b/config/broadcasting.php
new file mode 100644
index 0000000..3bba110
--- /dev/null
+++ b/config/broadcasting.php
@@ -0,0 +1,59 @@
+ env('BROADCAST_DRIVER', 'null'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Broadcast Connections
+ |--------------------------------------------------------------------------
+ |
+ | Here you may define all of the broadcast connections that will be used
+ | to broadcast events to other systems or over websockets. Samples of
+ | each available type of connection are provided inside this array.
+ |
+ */
+
+ 'connections' => [
+
+ 'pusher' => [
+ 'driver' => 'pusher',
+ 'key' => env('PUSHER_APP_KEY'),
+ 'secret' => env('PUSHER_APP_SECRET'),
+ 'app_id' => env('PUSHER_APP_ID'),
+ 'options' => [
+ 'cluster' => env('PUSHER_APP_CLUSTER'),
+ 'useTLS' => true,
+ ],
+ ],
+
+ 'redis' => [
+ 'driver' => 'redis',
+ 'connection' => 'default',
+ ],
+
+ 'log' => [
+ 'driver' => 'log',
+ ],
+
+ 'null' => [
+ 'driver' => 'null',
+ ],
+
+ ],
+
+];
diff --git a/config/cache.php b/config/cache.php
new file mode 100644
index 0000000..46751e6
--- /dev/null
+++ b/config/cache.php
@@ -0,0 +1,103 @@
+ env('CACHE_DRIVER', 'file'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Cache Stores
+ |--------------------------------------------------------------------------
+ |
+ | Here you may define all of the cache "stores" for your application as
+ | well as their drivers. You may even define multiple stores for the
+ | same cache driver to group types of items stored in your caches.
+ |
+ */
+
+ 'stores' => [
+
+ 'apc' => [
+ 'driver' => 'apc',
+ ],
+
+ 'array' => [
+ 'driver' => 'array',
+ ],
+
+ 'database' => [
+ 'driver' => 'database',
+ 'table' => 'cache',
+ 'connection' => null,
+ ],
+
+ 'file' => [
+ 'driver' => 'file',
+ 'path' => storage_path('framework/cache/data'),
+ ],
+
+ 'memcached' => [
+ 'driver' => 'memcached',
+ 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
+ 'sasl' => [
+ env('MEMCACHED_USERNAME'),
+ env('MEMCACHED_PASSWORD'),
+ ],
+ 'options' => [
+ // Memcached::OPT_CONNECT_TIMEOUT => 2000,
+ ],
+ 'servers' => [
+ [
+ 'host' => env('MEMCACHED_HOST', '127.0.0.1'),
+ 'port' => env('MEMCACHED_PORT', 11211),
+ 'weight' => 100,
+ ],
+ ],
+ ],
+
+ 'redis' => [
+ 'driver' => 'redis',
+ 'connection' => 'cache',
+ ],
+
+ 'dynamodb' => [
+ 'driver' => 'dynamodb',
+ 'key' => env('AWS_ACCESS_KEY_ID'),
+ 'secret' => env('AWS_SECRET_ACCESS_KEY'),
+ 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
+ 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
+ 'endpoint' => env('DYNAMODB_ENDPOINT'),
+ ],
+
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Cache Key Prefix
+ |--------------------------------------------------------------------------
+ |
+ | When utilizing a RAM based store such as APC or Memcached, there might
+ | be other applications utilizing the same cache. So, we'll specify a
+ | value to get prefixed to all our keys so we can avoid collisions.
+ |
+ */
+
+ 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'),
+
+];
diff --git a/config/captcha.php b/config/captcha.php
new file mode 100644
index 0000000..dbb88b1
--- /dev/null
+++ b/config/captcha.php
@@ -0,0 +1,51 @@
+ env('CAPTCHA_DISABLE', false),
+ 'characters' => ['2', '3', '4', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'j', 'm', 'n', 'p', 'q', 'r', 't', 'u', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'M', 'N', 'P', 'Q', 'R', 'T', 'U', 'X', 'Y', 'Z'],
+ 'default' => [
+ 'length' => 9,
+ 'width' => 120,
+ 'height' => 36,
+ 'quality' => 90,
+ 'math' => false,
+ 'expire' => 60,
+ 'encrypt' => false,
+ ],
+ 'math' => [
+ 'length' => 9,
+ 'width' => 120,
+ 'height' => 36,
+ 'quality' => 90,
+ 'math' => true,
+ ],
+
+ 'flat' => [
+ 'length' => 6,
+ 'width' => 160,
+ 'height' => 46,
+ 'quality' => 90,
+ 'lines' => 6,
+ 'bgImage' => false,
+ 'bgColor' => '#ecf2f4',
+ 'fontColors' => ['#2c3e50', '#c0392b', '#16a085', '#c0392b', '#8e44ad', '#303f9f', '#f57c00', '#795548'],
+ 'contrast' => -5,
+ ],
+ 'mini' => [
+ 'length' => 4,
+ 'width' => 120,
+ 'height' => 36,
+ ],
+ 'inverse' => [
+ 'length' => 5,
+ 'width' => 120,
+ 'height' => 36,
+ 'quality' => 90,
+ 'sensitive' => true,
+ 'angle' => 12,
+ 'sharpen' => 10,
+ 'blur' => 2,
+ 'invert' => true,
+ 'contrast' => -5,
+ ]
+];
diff --git a/config/coin.php b/config/coin.php
new file mode 100644
index 0000000..cbb2047
--- /dev/null
+++ b/config/coin.php
@@ -0,0 +1,81 @@
+ env('COIN_SYMBOL'),
+ 'coin2_symbol' => env('COIN2_SYMBOL'),
+ 'coin3_symbol' => env('COIN3_SYMBOL'),
+ 'coin4_symbol' => env('COIN4_SYMBOL'),
+ 'coin5_symbol' => env('COIN5_SYMBOL'),
+ 'coin6_symbol' => env('COIN6_SYMBOL'),
+ 'coin7_symbol' => env('COIN7_SYMBOL'),
+ 'coin8_symbol' => env('COIN8_SYMBOL'),
+ 'coin9_symbol' => env('COIN9_SYMBOL'),
+ 'coin10_symbol' => env('COIN10_SYMBOL'),
+ 'coin11_symbol' => env('COIN11_SYMBOL'),
+
+
+ 'exchange_symbols' => [
+ env('COIN_SYMBOL') => \App\Models\DataAaaaa::class,
+ env('COIN2_SYMBOL') => \App\Models\DataOni::class,
+ env('COIN3_SYMBOL') => \App\Models\DataIdep::class,
+ env('COIN4_SYMBOL') => \App\Models\DataNof::class,
+ env('COIN5_SYMBOL') => \App\Models\DataGlfx::class,
+ env('COIN6_SYMBOL') => \App\Models\DataGrm::class,
+ env('COIN7_SYMBOL') => \App\Models\DataLeve::class,
+ env('COIN8_SYMBOL') => \App\Models\DataTrl::class,
+ env('COIN9_SYMBOL') => \App\Models\DataKeef::class,
+ env('COIN10_SYMBOL') => \App\Models\DataQtb::class,
+ env('COIN11_SYMBOL') => \App\Models\DataTusr::class,
+
+ ],
+
+ 'swap_symbols' => [
+ env('COIN_SYMBOL') => \App\Models\DataAaaaa::class,
+ env('COIN2_SYMBOL') => \App\Models\DataOni::class,
+ env('COIN3_SYMBOL') => \App\Models\DataIdep::class,
+ env('COIN4_SYMBOL') => \App\Models\DataNof::class,
+ env('COIN5_SYMBOL') => \App\Models\DataGlfx::class,
+ env('COIN6_SYMBOL') => \App\Models\DataGrm::class,
+ env('COIN7_SYMBOL') => \App\Models\DataLeve::class,
+ env('COIN8_SYMBOL') => \App\Models\DataTrl::class,
+ env('COIN9_SYMBOL') => \App\Models\DataKeef::class,
+ env('COIN10_SYMBOL') => \App\Models\DataQtb::class,
+ env('COIN11_SYMBOL') => \App\Models\DataTusr::class,
+ ],
+
+ 'erc20_usdt' => [
+ 'contractAddress' => '0xdac17f958d2ee523a2206206994597c13d831ec7',
+ 'abi' => '[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_upgradedAddress","type":"address"}],"name":"deprecate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"deprecated","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_evilUser","type":"address"}],"name":"addBlackList","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"upgradedAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"balances","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"maximumFee","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"_totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_maker","type":"address"}],"name":"getBlackListStatus","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"allowed","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"who","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newBasisPoints","type":"uint256"},{"name":"newMaxFee","type":"uint256"}],"name":"setParams","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"issue","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"redeem","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"basisPointsRate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"isBlackListed","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_clearedUser","type":"address"}],"name":"removeBlackList","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"MAX_UINT","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_blackListedUser","type":"address"}],"name":"destroyBlackFunds","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_initialSupply","type":"uint256"},{"name":"_name","type":"string"},{"name":"_symbol","type":"string"},{"name":"_decimals","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amount","type":"uint256"}],"name":"Issue","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amount","type":"uint256"}],"name":"Redeem","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newAddress","type":"address"}],"name":"Deprecate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"feeBasisPoints","type":"uint256"},{"indexed":false,"name":"maxFee","type":"uint256"}],"name":"Params","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_blackListedUser","type":"address"},{"indexed":false,"name":"_balance","type":"uint256"}],"name":"DestroyedBlackFunds","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_user","type":"address"}],"name":"AddedBlackList","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_user","type":"address"}],"name":"RemovedBlackList","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"}]',
+ ],
+
+ 'erc20_aetc' => [
+ 'contractAddress' => '0x11465FDC8D73B927244cD2D5a296b9d22e7382e2',
+ 'abi' => '[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_upgradedAddress","type":"address"}],"name":"deprecate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"deprecated","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_evilUser","type":"address"}],"name":"addBlackList","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"upgradedAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"balances","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"maximumFee","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"_totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_maker","type":"address"}],"name":"getBlackListStatus","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"allowed","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"who","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newBasisPoints","type":"uint256"},{"name":"newMaxFee","type":"uint256"}],"name":"setParams","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"issue","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"redeem","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"basisPointsRate","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"isBlackListed","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_clearedUser","type":"address"}],"name":"removeBlackList","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"MAX_UINT","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_blackListedUser","type":"address"}],"name":"destroyBlackFunds","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_initialSupply","type":"uint256"},{"name":"_name","type":"string"},{"name":"_symbol","type":"string"},{"name":"_decimals","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amount","type":"uint256"}],"name":"Issue","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amount","type":"uint256"}],"name":"Redeem","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newAddress","type":"address"}],"name":"Deprecate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"feeBasisPoints","type":"uint256"},{"indexed":false,"name":"maxFee","type":"uint256"}],"name":"Params","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_blackListedUser","type":"address"},{"indexed":false,"name":"_balance","type":"uint256"}],"name":"DestroyedBlackFunds","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_user","type":"address"}],"name":"AddedBlackList","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_user","type":"address"}],"name":"RemovedBlackList","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"}]',
+ ],
+
+ 'geth_host' => env('GETH_HOST'),
+ 'geth_pwd' => env('GETH_PWD'),
+
+ 'geth_etherscan_host' => 'https://api.etherscan.io/api',
+ 'geth_etherscan_apikey' => '9Q5QFE3A8GJ4PERJ7MG7UJRRVW4REREJCU',
+
+ 'collect_min_amount' => [
+ 'btc' => 0.005,
+ 'eth' => 0.1,
+ 'usdt' => 100,
+ 'trx' => 1000,
+ ],
+
+ // 优盾钱包配置
+ 'udun_switch' => true,
+ // 商户号
+ 'merchant_number' => '314926',
+ // APP秘钥
+ 'api_key' => 'cbd2fe8e8fd423251222624cacd1bfc6',
+ // 请求网关地址1
+ 'gateway_address' => 'https://sig10.udun.io',
+ //钱包编号
+ 'walletId' => 'WT_314926_0001',
+
+];
diff --git a/config/cors.php b/config/cors.php
new file mode 100644
index 0000000..8c204f2
--- /dev/null
+++ b/config/cors.php
@@ -0,0 +1,60 @@
+ ['api/*'],
+
+ /*
+ * Matches the request method. `[*]` allows all methods.
+ */
+ 'allowed_methods' => ['*'],
+
+ /*
+ * Matches the request origin. `[*]` allows all origins. Wildcards can be used, eg `*.mydomain.com`
+ */
+ 'allowed_origins' => ['*'],
+
+ /*
+ * Patterns that can be used with `preg_match` to match the origin.
+ */
+ 'allowed_origins_patterns' => [],
+
+ /*
+ * Sets the Access-Control-Allow-Headers response header. `[*]` allows all headers.
+ */
+ 'allowed_headers' => ['*'],
+
+ /*
+ * Sets the Access-Control-Expose-Headers response header with these headers.
+ */
+ 'exposed_headers' => ['Authorization'],
+
+ /*
+ * Sets the Access-Control-Max-Age response header when > 0.
+ */
+ 'max_age' => 0,
+
+ /*
+ * Sets the Access-Control-Allow-Credentials header.
+ */
+ 'supports_credentials' => false,
+];
diff --git a/config/database.php b/config/database.php
new file mode 100644
index 0000000..8497d39
--- /dev/null
+++ b/config/database.php
@@ -0,0 +1,173 @@
+ env('DB_CONNECTION', 'mysql'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Database Connections
+ |--------------------------------------------------------------------------
+ |
+ | Here are each of the database connections setup for your application.
+ | Of course, examples of configuring each database platform that is
+ | supported by Laravel is shown below to make development simple.
+ |
+ |
+ | All database work in Laravel is done through the PHP PDO facilities
+ | so make sure you have the driver for your particular database of
+ | choice installed on your machine before you begin development.
+ |
+ */
+
+ 'connections' => [
+
+ 'sqlite' => [
+ 'driver' => 'sqlite',
+ 'url' => env('DATABASE_URL'),
+ 'database' => env('DB_DATABASE', database_path('database.sqlite')),
+ 'prefix' => '',
+ 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
+ ],
+
+ 'mysql' => [
+ 'timezone' => '+08:00',
+ 'driver' => 'mysql',
+ 'url' => env('DATABASE_URL'),
+ 'host' => env('DB_HOST', '127.0.0.1'),
+ 'port' => env('DB_PORT', '3306'),
+ 'database' => env('DB_DATABASE', 'forge'),
+ 'username' => env('DB_USERNAME', 'forge'),
+ 'password' => env('DB_PASSWORD', ''),
+ 'unix_socket' => env('DB_SOCKET', ''),
+ 'charset' => 'utf8mb4',
+ 'collation' => 'utf8mb4_unicode_ci',
+ 'prefix' => '',
+ 'prefix_indexes' => true,
+ 'strict' => true,
+ 'engine' => null,
+ 'options' => extension_loaded('pdo_mysql') ? array_filter([
+ PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
+ ]) : [],
+ ],
+
+ 'pgsql' => [
+ 'driver' => 'pgsql',
+ 'url' => env('DATABASE_URL'),
+ 'host' => env('DB_HOST', '127.0.0.1'),
+ 'port' => env('DB_PORT', '5432'),
+ 'database' => env('DB_DATABASE', 'forge'),
+ 'username' => env('DB_USERNAME', 'forge'),
+ 'password' => env('DB_PASSWORD', ''),
+ 'charset' => 'utf8',
+ 'prefix' => '',
+ 'prefix_indexes' => true,
+ 'schema' => 'public',
+ 'sslmode' => 'prefer',
+ ],
+
+ 'sqlsrv' => [
+ 'driver' => 'sqlsrv',
+ 'url' => env('DATABASE_URL'),
+ 'host' => env('DB_HOST', 'localhost'),
+ 'port' => env('DB_PORT', '1433'),
+ 'database' => env('DB_DATABASE', 'forge'),
+ 'username' => env('DB_USERNAME', 'forge'),
+ 'password' => env('DB_PASSWORD', ''),
+ 'charset' => 'utf8',
+ 'prefix' => '',
+ 'prefix_indexes' => true,
+ ],
+
+ 'mongodb' => [
+ 'driver' => 'mongodb',
+ 'host' => '127.0.0.1',
+ 'port' => 27017,
+ 'database' => 'books',
+ 'username' => '',
+ 'password' => '',
+// 'options' => [
+// // here you can pass more settings to the Mongo Driver Manager
+// // see https://www.php.net/manual/en/mongodb-driver-manager.construct.php under "Uri Options" for a list of complete parameters that you can use
+//
+// 'database' => env('DB_AUTHENTICATION_DATABASE', 'admin'), // required with Mongo 3+
+// ],
+ ],
+
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Migration Repository Table
+ |--------------------------------------------------------------------------
+ |
+ | This table keeps track of all the migrations that have already run for
+ | your application. Using this information, we can determine which of
+ | the migrations on disk haven't actually been run in the database.
+ |
+ */
+
+ 'migrations' => 'migrations',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Redis Databases
+ |--------------------------------------------------------------------------
+ |
+ | Redis is an open source, fast, and advanced key-value store that also
+ | provides a richer body of commands than a typical key-value system
+ | such as APC or Memcached. Laravel makes it easy to dig right in.
+ |
+ */
+
+ 'redis' => [
+
+ 'client' => env('REDIS_CLIENT', 'predis'),
+
+ 'options' => [
+ 'cluster' => env('REDIS_CLUSTER', 'predis'),
+// 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
+ 'prefix' => env('REDIS_PREFIX',''),
+ 'read_write_timeout' => 0,
+ 'connection_timeout' => 0,
+// 'persistent' => true,
+ ],
+
+ 'default' => [
+ 'url' => env('REDIS_URL'),
+ 'host' => env('REDIS_HOST', '127.0.0.1'),
+ 'password' => env('REDIS_PASSWORD', null),
+ 'port' => env('REDIS_PORT', 6379),
+ 'database' => env('REDIS_DB', 0),
+ 'read_write_timeout' => 0,
+ 'connection_timeout' => 0,
+// 'persistent' => true,
+ ],
+
+ 'cache' => [
+ 'url' => env('REDIS_URL'),
+ 'host' => env('REDIS_HOST', '127.0.0.1'),
+ 'password' => env('REDIS_PASSWORD', null),
+ 'port' => env('REDIS_PORT', 6379),
+ 'database' => env('REDIS_CACHE_DB', 1),
+ 'read_write_timeout' => 0,
+ 'connection_timeout' => 0,
+// 'persistent' => true,
+ ],
+
+ ],
+
+];
diff --git a/config/debug-server.php b/config/debug-server.php
new file mode 100644
index 0000000..f897262
--- /dev/null
+++ b/config/debug-server.php
@@ -0,0 +1,8 @@
+ 'tcp://127.0.0.1:9912',
+];
diff --git a/config/easysms.php b/config/easysms.php
new file mode 100644
index 0000000..049ef08
--- /dev/null
+++ b/config/easysms.php
@@ -0,0 +1,46 @@
+ 5.0,
+
+ // 默认发送配置
+ 'default' => [
+ // 网关调用策略,默认:顺序调用
+ 'strategy' => \Overtrue\EasySms\Strategies\OrderStrategy::class,
+
+ // 默认可用的发送网关
+ 'gateways' => [
+ 'smsbao',
+ ],
+ ],
+ // 可用的网关配置
+ 'gateways' => [
+ 'errorlog' => [
+ 'file' => '/tmp/easy-sms.log',
+ ],
+ 'chuanglan' => [
+ 'account' => env('MSG_ACCOUNT'),
+ 'password' => env('MSG_PASSWORD'),
+ 'intel_account' => env('INTEL_MSG_ACCOUNT', ''),
+ 'intel_password' => env('INTEL_MSG_PASSWORD', ''),
+ 'channel' => \Overtrue\EasySms\Gateways\ChuanglanGateway::CHANNEL_VALIDATE_CODE,
+
+ // 会员营销通道 特定参数。创蓝规定:api提交营销短信的时候,需要自己加短信的签名及退订信息
+ 'sign' => env('MSG_SIGN'),
+ 'unsubscribe' => '回TD退订',
+ ],
+ 'smsbao' => [
+ 'user' => env('MSG_ACCOUNT'),
+ 'password' => env('MSG_PASSWORD'),
+ ]
+ ],
+];
diff --git a/config/eloquent-sortable.php b/config/eloquent-sortable.php
new file mode 100644
index 0000000..fa57821
--- /dev/null
+++ b/config/eloquent-sortable.php
@@ -0,0 +1,14 @@
+ 'order_column',
+
+ /*
+ * Define if the models should sort when creating.
+ * When true, the package will automatically assign the highest order number to a new mode
+ */
+ 'sort_when_creating' => true,
+];
diff --git a/config/filesystems.php b/config/filesystems.php
new file mode 100644
index 0000000..7b92387
--- /dev/null
+++ b/config/filesystems.php
@@ -0,0 +1,76 @@
+ env('FILESYSTEM_DRIVER', 'local'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Default Cloud Filesystem Disk
+ |--------------------------------------------------------------------------
+ |
+ | Many applications store files both locally and in the cloud. For this
+ | reason, you may specify a default "cloud" driver here. This driver
+ | will be bound as the Cloud disk implementation in the container.
+ |
+ */
+
+ 'cloud' => env('FILESYSTEM_CLOUD', 's3'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Filesystem Disks
+ |--------------------------------------------------------------------------
+ |
+ | Here you may configure as many filesystem "disks" as you wish, and you
+ | may even configure multiple disks of the same driver. Defaults have
+ | been setup for each driver as an example of the required options.
+ |
+ | Supported Drivers: "local", "ftp", "sftp", "s3", "rackspace"
+ |
+ */
+
+ 'disks' => [
+
+ 'local' => [
+ 'driver' => 'local',
+ 'root' => public_path('app'),
+ ],
+
+ 'public' => [
+ 'driver' => 'local',
+ 'root' => storage_path('app/public'),
+ 'url' => env('APP_URL').'/storage',
+ 'visibility' => 'public',
+ ],
+
+ 's3' => [
+ 'driver' => 's3',
+ 'key' => env('AWS_ACCESS_KEY_ID'),
+ 'secret' => env('AWS_SECRET_ACCESS_KEY'),
+ 'region' => env('AWS_DEFAULT_REGION'),
+ 'bucket' => env('AWS_BUCKET'),
+ 'url' => env('AWS_URL'),
+ ],
+
+ 'admin' => [
+ 'driver' => 'local',
+ 'root' => storage_path('app/public'),
+ 'url' => env('APP_URL').'/storage',
+ 'visibility' => 'public',
+ ],
+
+ ],
+
+];
diff --git a/config/geoip.php b/config/geoip.php
new file mode 100644
index 0000000..0f6570e
--- /dev/null
+++ b/config/geoip.php
@@ -0,0 +1,165 @@
+ true,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Include Currency in Results
+ |--------------------------------------------------------------------------
+ |
+ | When enabled the system will do it's best in deciding the user's currency
+ | by matching their ISO code to a preset list of currencies.
+ |
+ */
+
+ 'include_currency' => true,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Default Service
+ |--------------------------------------------------------------------------
+ |
+ | Here you may specify the default storage driver that should be used
+ | by the framework.
+ |
+ | Supported: "maxmind_database", "maxmind_api", "ipapi"
+ |
+ */
+
+ 'service' => 'ipapi',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Storage Specific Configuration
+ |--------------------------------------------------------------------------
+ |
+ | Here you may configure as many storage drivers as you wish.
+ |
+ */
+
+ 'services' => [
+
+ 'maxmind_database' => [
+ 'class' => \Torann\GeoIP\Services\MaxMindDatabase::class,
+ 'database_path' => storage_path('app/geoip.mmdb'),
+ 'update_url' => sprintf('https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=%s&suffix=tar.gz', env('MAXMIND_LICENSE_KEY')),
+ 'locales' => ['en'],
+ ],
+
+ 'maxmind_api' => [
+ 'class' => \Torann\GeoIP\Services\MaxMindWebService::class,
+ 'user_id' => env('MAXMIND_USER_ID'),
+ 'license_key' => env('MAXMIND_LICENSE_KEY'),
+ 'locales' => ['en'],
+ ],
+
+ 'ipapi' => [
+ 'class' => \Torann\GeoIP\Services\IPApi::class,
+ 'secure' => true,
+ 'key' => env('IPAPI_KEY'),
+ 'continent_path' => storage_path('app/continents.json'),
+ 'lang' => 'en',
+ ],
+
+ 'ipgeolocation' => [
+ 'class' => \Torann\GeoIP\Services\IPGeoLocation::class,
+ 'secure' => true,
+ 'key' => env('IPGEOLOCATION_KEY'),
+ 'continent_path' => storage_path('app/continents.json'),
+ 'lang' => 'en',
+ ],
+
+ 'ipdata' => [
+ 'class' => \Torann\GeoIP\Services\IPData::class,
+ 'key' => env('IPDATA_API_KEY'),
+ 'secure' => true,
+ ],
+
+ 'ipfinder' => [
+ 'class' => \Torann\GeoIP\Services\IPFinder::class,
+ 'key' => env('IPFINDER_API_KEY'),
+ 'secure' => true,
+ 'locales' => ['en'],
+ ],
+
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Default Cache Driver
+ |--------------------------------------------------------------------------
+ |
+ | Here you may specify the type of caching that should be used
+ | by the package.
+ |
+ | Options:
+ |
+ | all - All location are cached
+ | some - Cache only the requesting user
+ | none - Disable cached
+ |
+ */
+
+ 'cache' => 'all',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Cache Tags
+ |--------------------------------------------------------------------------
+ |
+ | Cache tags are not supported when using the file or database cache
+ | drivers in Laravel. This is done so that only locations can be cleared.
+ |
+ */
+
+ 'cache_tags' => ['torann-geoip-location'],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Cache Expiration
+ |--------------------------------------------------------------------------
+ |
+ | Define how long cached location are valid.
+ |
+ */
+
+ 'cache_expires' => 30,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Default Location
+ |--------------------------------------------------------------------------
+ |
+ | Return when a location is not found.
+ |
+ */
+
+ 'default_location' => [
+ 'ip' => '127.0.0.0',
+ 'iso_code' => 'US',
+ 'country' => 'United States',
+ 'city' => 'New Haven',
+ 'state' => 'CT',
+ 'state_name' => 'Connecticut',
+ 'postal_code' => '06510',
+ 'lat' => 41.31,
+ 'lon' => -72.92,
+ 'timezone' => 'America/New_York',
+ 'continent' => 'NA',
+ 'default' => true,
+ 'currency' => 'USD',
+ ],
+
+];
diff --git a/config/google2fa.php b/config/google2fa.php
new file mode 100644
index 0000000..67956f3
--- /dev/null
+++ b/config/google2fa.php
@@ -0,0 +1,79 @@
+ env('OTP_ENABLED', true),
+
+ /*
+ * Lifetime in minutes.
+ *
+ * In case you need your users to be asked for a new one time passwords from time to time.
+ */
+ 'lifetime' => env('OTP_LIFETIME', 0), // 0 = eternal
+
+ /*
+ * Renew lifetime at every new request.
+ */
+ 'keep_alive' => env('OTP_KEEP_ALIVE', true),
+
+ /*
+ * Auth container binding.
+ */
+ 'auth' => 'auth',
+
+ /*
+ * 2FA verified session var.
+ */
+
+ 'session_var' => 'google2fa',
+
+ /*
+ * One Time Password request input name.
+ */
+ 'otp_input' => 'one_time_password',
+
+ /*
+ * One Time Password Window.
+ */
+ 'window' => 1,
+
+ /*
+ * Forbid user to reuse One Time Passwords.
+ */
+ 'forbid_old_passwords' => false,
+
+ /*
+ * User's table column for google2fa secret.
+ */
+ 'otp_secret_column' => 'google2fa_secret',
+
+ /*
+ * One Time Password View.
+ */
+ 'view' => 'google2fa.index',
+
+ /*
+ * One Time Password error message.
+ */
+ 'error_messages' => [
+ 'wrong_otp' => "The 'One Time Password' typed was wrong.",
+ 'cannot_be_empty' => 'One Time Password cannot be empty.',
+ 'unknown' => 'An unknown error has occurred. Please try again.',
+ ],
+
+ /*
+ * Throw exceptions or just fire events?
+ */
+ 'throw_exceptions' => env('OTP_THROW_EXCEPTION', true),
+
+ /*
+ * Which image backend to use for generating QR codes?
+ *
+ * Supports imagemagick, svg and eps
+ */
+ 'qrcode_image_backend' => \PragmaRX\Google2FALaravel\Support\Constants::QRCODE_IMAGE_BACKEND_IMAGEMAGICK,
+
+];
diff --git a/config/hashing.php b/config/hashing.php
new file mode 100644
index 0000000..8425770
--- /dev/null
+++ b/config/hashing.php
@@ -0,0 +1,52 @@
+ 'bcrypt',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Bcrypt Options
+ |--------------------------------------------------------------------------
+ |
+ | Here you may specify the configuration options that should be used when
+ | passwords are hashed using the Bcrypt algorithm. This will allow you
+ | to control the amount of time it takes to hash the given password.
+ |
+ */
+
+ 'bcrypt' => [
+ 'rounds' => env('BCRYPT_ROUNDS', 10),
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Argon Options
+ |--------------------------------------------------------------------------
+ |
+ | Here you may specify the configuration options that should be used when
+ | passwords are hashed using the Argon algorithm. These will allow you
+ | to control the amount of time it takes to hash the given password.
+ |
+ */
+
+ 'argon' => [
+ 'memory' => 1024,
+ 'threads' => 2,
+ 'time' => 2,
+ ],
+
+];
diff --git a/config/jwt.php b/config/jwt.php
new file mode 100644
index 0000000..baae1ff
--- /dev/null
+++ b/config/jwt.php
@@ -0,0 +1,304 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+return [
+
+ /*
+ |--------------------------------------------------------------------------
+ | JWT Authentication Secret
+ |--------------------------------------------------------------------------
+ |
+ | Don't forget to set this in your .env file, as it will be used to sign
+ | your tokens. A helper command is provided for this:
+ | `php artisan jwt:secret`
+ |
+ | Note: This will be used for Symmetric algorithms only (HMAC),
+ | since RSA and ECDSA use a private/public key combo (See below).
+ |
+ */
+
+ 'secret' => env('JWT_SECRET'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | JWT Authentication Keys
+ |--------------------------------------------------------------------------
+ |
+ | The algorithm you are using, will determine whether your tokens are
+ | signed with a random string (defined in `JWT_SECRET`) or using the
+ | following public & private keys.
+ |
+ | Symmetric Algorithms:
+ | HS256, HS384 & HS512 will use `JWT_SECRET`.
+ |
+ | Asymmetric Algorithms:
+ | RS256, RS384 & RS512 / ES256, ES384 & ES512 will use the keys below.
+ |
+ */
+
+ 'keys' => [
+
+ /*
+ |--------------------------------------------------------------------------
+ | Public Key
+ |--------------------------------------------------------------------------
+ |
+ | A path or resource to your public key.
+ |
+ | E.g. 'file://path/to/public/key'
+ |
+ */
+
+ 'public' => env('JWT_PUBLIC_KEY'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Private Key
+ |--------------------------------------------------------------------------
+ |
+ | A path or resource to your private key.
+ |
+ | E.g. 'file://path/to/private/key'
+ |
+ */
+
+ 'private' => env('JWT_PRIVATE_KEY'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Passphrase
+ |--------------------------------------------------------------------------
+ |
+ | The passphrase for your private key. Can be null if none set.
+ |
+ */
+
+ 'passphrase' => env('JWT_PASSPHRASE'),
+
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | JWT time to live
+ |--------------------------------------------------------------------------
+ |
+ | Specify the length of time (in minutes) that the token will be valid for.
+ | Defaults to 1 hour.
+ |
+ | You can also set this to null, to yield a never expiring token.
+ | Some people may want this behaviour for e.g. a mobile app.
+ | This is not particularly recommended, so make sure you have appropriate
+ | systems in place to revoke the token if necessary.
+ | Notice: If you set this to null you should remove 'exp' element from 'required_claims' list.
+ |
+ */
+
+ 'ttl' => env('JWT_TTL', 60 * 60 * 24),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Refresh time to live
+ |--------------------------------------------------------------------------
+ |
+ | Specify the length of time (in minutes) that the token can be refreshed
+ | within. I.E. The user can refresh their token within a 2 week window of
+ | the original token being created until they must re-authenticate.
+ | Defaults to 2 weeks.
+ |
+ | You can also set this to null, to yield an infinite refresh time.
+ | Some may want this instead of never expiring tokens for e.g. a mobile app.
+ | This is not particularly recommended, so make sure you have appropriate
+ | systems in place to revoke the token if necessary.
+ |
+ */
+
+ 'refresh_ttl' => env('JWT_REFRESH_TTL', 20160),
+
+ /*
+ |--------------------------------------------------------------------------
+ | JWT hashing algorithm
+ |--------------------------------------------------------------------------
+ |
+ | Specify the hashing algorithm that will be used to sign the token.
+ |
+ | See here: https://github.com/namshi/jose/tree/master/src/Namshi/JOSE/Signer/OpenSSL
+ | for possible values.
+ |
+ */
+
+ 'algo' => env('JWT_ALGO', 'HS256'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Required Claims
+ |--------------------------------------------------------------------------
+ |
+ | Specify the required claims that must exist in any token.
+ | A TokenInvalidException will be thrown if any of these claims are not
+ | present in the payload.
+ |
+ */
+
+ 'required_claims' => [
+ 'iss',
+ 'iat',
+ 'exp',
+ 'nbf',
+ 'sub',
+ 'jti',
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Persistent Claims
+ |--------------------------------------------------------------------------
+ |
+ | Specify the claim keys to be persisted when refreshing a token.
+ | `sub` and `iat` will automatically be persisted, in
+ | addition to the these claims.
+ |
+ | Note: If a claim does not exist then it will be ignored.
+ |
+ */
+
+ 'persistent_claims' => [
+ // 'foo',
+ // 'bar',
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Lock Subject
+ |--------------------------------------------------------------------------
+ |
+ | This will determine whether a `prv` claim is automatically added to
+ | the token. The purpose of this is to ensure that if you have multiple
+ | authentication models e.g. `App\User` & `App\OtherPerson`, then we
+ | should prevent one authentication request from impersonating another,
+ | if 2 tokens happen to have the same id across the 2 different models.
+ |
+ | Under specific circumstances, you may want to disable this behaviour
+ | e.g. if you only have one authentication model, then you would save
+ | a little on token size.
+ |
+ */
+
+ 'lock_subject' => true,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Leeway
+ |--------------------------------------------------------------------------
+ |
+ | This property gives the jwt timestamp claims some "leeway".
+ | Meaning that if you have any unavoidable slight clock skew on
+ | any of your servers then this will afford you some level of cushioning.
+ |
+ | This applies to the claims `iat`, `nbf` and `exp`.
+ |
+ | Specify in seconds - only if you know you need it.
+ |
+ */
+
+ 'leeway' => env('JWT_LEEWAY', 0),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Blacklist Enabled
+ |--------------------------------------------------------------------------
+ |
+ | In order to invalidate tokens, you must have the blacklist enabled.
+ | If you do not want or need this functionality, then set this to false.
+ |
+ */
+
+ 'blacklist_enabled' => env('JWT_BLACKLIST_ENABLED', true),
+
+ /*
+ | -------------------------------------------------------------------------
+ | Blacklist Grace Period
+ | -------------------------------------------------------------------------
+ |
+ | When multiple concurrent requests are made with the same JWT,
+ | it is possible that some of them fail, due to token regeneration
+ | on every request.
+ |
+ | Set grace period in seconds to prevent parallel request failure.
+ |
+ */
+
+ 'blacklist_grace_period' => env('JWT_BLACKLIST_GRACE_PERIOD', 0),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Cookies encryption
+ |--------------------------------------------------------------------------
+ |
+ | By default Laravel encrypt cookies for security reason.
+ | If you decide to not decrypt cookies, you will have to configure Laravel
+ | to not encrypt your cookie token by adding its name into the $except
+ | array available in the middleware "EncryptCookies" provided by Laravel.
+ | see https://laravel.com/docs/master/responses#cookies-and-encryption
+ | for details.
+ |
+ | Set it to true if you want to decrypt cookies.
+ |
+ */
+
+ 'decrypt_cookies' => false,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Providers
+ |--------------------------------------------------------------------------
+ |
+ | Specify the various providers used throughout the package.
+ |
+ */
+
+ 'providers' => [
+
+ /*
+ |--------------------------------------------------------------------------
+ | JWT Provider
+ |--------------------------------------------------------------------------
+ |
+ | Specify the provider that is used to create and decode the tokens.
+ |
+ */
+
+ 'jwt' => Tymon\JWTAuth\Providers\JWT\Lcobucci::class,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Authentication Provider
+ |--------------------------------------------------------------------------
+ |
+ | Specify the provider that is used to authenticate users.
+ |
+ */
+
+ 'auth' => Tymon\JWTAuth\Providers\Auth\Illuminate::class,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Storage Provider
+ |--------------------------------------------------------------------------
+ |
+ | Specify the provider that is used to store tokens in the blacklist.
+ |
+ */
+
+ 'storage' => Tymon\JWTAuth\Providers\Storage\Illuminate::class,
+
+ ],
+
+];
diff --git a/config/logging.php b/config/logging.php
new file mode 100644
index 0000000..d09cd7d
--- /dev/null
+++ b/config/logging.php
@@ -0,0 +1,94 @@
+ env('LOG_CHANNEL', 'stack'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Log Channels
+ |--------------------------------------------------------------------------
+ |
+ | Here you may configure the log channels for your application. Out of
+ | the box, Laravel uses the Monolog PHP logging library. This gives
+ | you a variety of powerful log handlers / formatters to utilize.
+ |
+ | Available Drivers: "single", "daily", "slack", "syslog",
+ | "errorlog", "monolog",
+ | "custom", "stack"
+ |
+ */
+
+ 'channels' => [
+ 'stack' => [
+ 'driver' => 'stack',
+ 'channels' => ['daily'],
+ 'ignore_exceptions' => false,
+ ],
+
+ 'single' => [
+ 'driver' => 'single',
+ 'path' => storage_path('logs/laravel.log'),
+ 'level' => 'debug',
+ ],
+
+ 'daily' => [
+ 'driver' => 'daily',
+ 'path' => storage_path('logs/laravel.log'),
+ 'level' => 'debug',
+ 'days' => 14,
+ ],
+
+ 'slack' => [
+ 'driver' => 'slack',
+ 'url' => env('LOG_SLACK_WEBHOOK_URL'),
+ 'username' => 'Laravel Log',
+ 'emoji' => ':boom:',
+ 'level' => 'critical',
+ ],
+
+ 'papertrail' => [
+ 'driver' => 'monolog',
+ 'level' => 'debug',
+ 'handler' => SyslogUdpHandler::class,
+ 'handler_with' => [
+ 'host' => env('PAPERTRAIL_URL'),
+ 'port' => env('PAPERTRAIL_PORT'),
+ ],
+ ],
+
+ 'stderr' => [
+ 'driver' => 'monolog',
+ 'handler' => StreamHandler::class,
+ 'formatter' => env('LOG_STDERR_FORMATTER'),
+ 'with' => [
+ 'stream' => 'php://stderr',
+ ],
+ ],
+
+ 'syslog' => [
+ 'driver' => 'syslog',
+ 'level' => 'debug',
+ ],
+
+ 'errorlog' => [
+ 'driver' => 'errorlog',
+ 'level' => 'debug',
+ ],
+ ],
+
+];
diff --git a/config/mail.php b/config/mail.php
new file mode 100644
index 0000000..6f8469f
--- /dev/null
+++ b/config/mail.php
@@ -0,0 +1,136 @@
+ env('MAIL_DRIVER', 'smtp'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | SMTP Host Address
+ |--------------------------------------------------------------------------
+ |
+ | Here you may provide the host address of the SMTP server used by your
+ | applications. A default option is provided that is compatible with
+ | the Mailgun mail service which will provide reliable deliveries.
+ |
+ */
+
+ 'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | SMTP Host Port
+ |--------------------------------------------------------------------------
+ |
+ | This is the SMTP port used by your application to deliver e-mails to
+ | users of the application. Like the host we have set this value to
+ | stay compatible with the Mailgun e-mail application by default.
+ |
+ */
+
+ 'port' => env('MAIL_PORT', 587),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Global "From" Address
+ |--------------------------------------------------------------------------
+ |
+ | You may wish for all e-mails sent by your application to be sent from
+ | the same address. Here, you may specify a name and address that is
+ | used globally for all e-mails that are sent by your application.
+ |
+ */
+
+ 'from' => [
+ 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
+ 'name' => env('MAIL_FROM_NAME', 'Example'),
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | E-Mail Encryption Protocol
+ |--------------------------------------------------------------------------
+ |
+ | Here you may specify the encryption protocol that should be used when
+ | the application send e-mail messages. A sensible default using the
+ | transport layer security protocol should provide great security.
+ |
+ */
+
+ 'encryption' => env('MAIL_ENCRYPTION', 'tls'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | SMTP Server Username
+ |--------------------------------------------------------------------------
+ |
+ | If your SMTP server requires a username for authentication, you should
+ | set it here. This will get used to authenticate with your server on
+ | connection. You may also set the "password" value below this one.
+ |
+ */
+
+ 'username' => env('MAIL_USERNAME'),
+
+ 'password' => env('MAIL_PASSWORD'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Sendmail System Path
+ |--------------------------------------------------------------------------
+ |
+ | When using the "sendmail" driver to send e-mails, we will need to know
+ | the path to where Sendmail lives on this server. A default path has
+ | been provided here, which will work well on most of your systems.
+ |
+ */
+
+ 'sendmail' => '/usr/sbin/sendmail -bs',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Markdown Mail Settings
+ |--------------------------------------------------------------------------
+ |
+ | If you are using Markdown based email rendering, you may configure your
+ | theme and component paths here, allowing you to customize the design
+ | of the emails. Or, you may simply stick with the Laravel defaults!
+ |
+ */
+
+ 'markdown' => [
+ 'theme' => 'default',
+
+ 'paths' => [
+ resource_path('views/vendor/mail'),
+ ],
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Log Channel
+ |--------------------------------------------------------------------------
+ |
+ | If you are using the "log" driver, you may specify the logging channel
+ | if you prefer to keep mail messages separate from other log entries
+ | for simpler reading. Otherwise, the default channel will be used.
+ |
+ */
+
+ 'log_channel' => env('MAIL_LOG_CHANNEL'),
+
+];
diff --git a/config/queue.php b/config/queue.php
new file mode 100644
index 0000000..07c7d2a
--- /dev/null
+++ b/config/queue.php
@@ -0,0 +1,87 @@
+ env('QUEUE_CONNECTION', 'sync'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Queue Connections
+ |--------------------------------------------------------------------------
+ |
+ | Here you may configure the connection information for each server that
+ | is used by your application. A default configuration has been added
+ | for each back-end shipped with Laravel. You are free to add more.
+ |
+ | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
+ |
+ */
+
+ 'connections' => [
+
+ 'sync' => [
+ 'driver' => 'sync',
+ ],
+
+ 'database' => [
+ 'driver' => 'database',
+ 'table' => 'jobs',
+ 'queue' => 'default',
+ 'retry_after' => 90,
+ ],
+
+ 'beanstalkd' => [
+ 'driver' => 'beanstalkd',
+ 'host' => 'localhost',
+ 'queue' => 'default',
+ 'retry_after' => 90,
+ 'block_for' => 0,
+ ],
+
+ 'sqs' => [
+ 'driver' => 'sqs',
+ 'key' => env('AWS_ACCESS_KEY_ID'),
+ 'secret' => env('AWS_SECRET_ACCESS_KEY'),
+ 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
+ 'queue' => env('SQS_QUEUE', 'your-queue-name'),
+ 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
+ ],
+
+ 'redis' => [
+ 'driver' => 'redis',
+ 'connection' => 'default',
+ 'queue' => env('REDIS_QUEUE', 'default'),
+ 'retry_after' => 90,
+ 'block_for' => null,
+ ],
+
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Failed Queue Jobs
+ |--------------------------------------------------------------------------
+ |
+ | These options configure the behavior of failed queue job logging so you
+ | can control which database and table are used to store the jobs that
+ | have failed. You may change them to any database / table you wish.
+ |
+ */
+
+ 'failed' => [
+ 'database' => env('DB_CONNECTION', 'mysql'),
+ 'table' => 'failed_jobs',
+ ],
+
+];
diff --git a/config/rsakey.php b/config/rsakey.php
new file mode 100644
index 0000000..56d8bbe
--- /dev/null
+++ b/config/rsakey.php
@@ -0,0 +1,29 @@
+ '-----BEGIN PUBLIC KEY-----
+MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDCHFnD1TrkIwe7b1oZR0H/fuvZ
+9Asx8rE1PoCvw5XKeOVVgqoWyCGAZYZkYqZ3uDokY8ulaJkmeiUs2B9N5+osbFow
+60e6Nr+W5vsBirhbSQbPgOOMsXRfBRWC5LZyAtutUBxR5/7fgWopdt+OJsVlAl/C
+Mz5wvi5sdazfJtFkGwIDAQAB
+-----END PUBLIC KEY-----
+',
+ 'private_key' => '-----BEGIN RSA PRIVATE KEY-----
+MIICXAIBAAKBgQDCHFnD1TrkIwe7b1oZR0H/fuvZ9Asx8rE1PoCvw5XKeOVVgqoW
+yCGAZYZkYqZ3uDokY8ulaJkmeiUs2B9N5+osbFow60e6Nr+W5vsBirhbSQbPgOOM
+sXRfBRWC5LZyAtutUBxR5/7fgWopdt+OJsVlAl/CMz5wvi5sdazfJtFkGwIDAQAB
+AoGAIwVabKqb5W0sh/SfHNBuZ9pOUxRksK5IqoKMVSnEbLNDLRpV9aZF5RRsGtBx
+mEf0tXwL0dv9RaPj8SNNApFE/k5crOIkYrUmP4IVrMeztgct+/Z1EsQ57wnWvNtK
+4yM8rWj8OFcFLqTsOM93ba8QpdMNqyyTa/N0zWXEHFEKOYECQQDhocsEssA2e14h
+wp/tTe/J+KSXhjcyFhziOTR2lop1EO+BYvT2s1EseJejdtIyCQuWeQf+ZnTej8Cs
+PMl6nEgtAkEA3Dx8GMjVa86vwaTVX75NH1uyQ2jpj7iaCy3qRcXe7yNo0D9liGKk
+oUQQtOtk3Y/nBlOKLfIgccpM/KypeuACZwJATS5dFgRXP8u/jWjX8ALi7YHCO5rL
+srRhuPi8e3xPbHAYnXfON71rHP07Uc1JZZg2gIhyNZGylJcz3zcD7I8dGQJAFmCi
+71XAsbKPkypvb8oDRhNoGodXa/4C0O36ZtqDG2NKrBY099WmCqjC1c8xMX4EqFTm
+rmJyv30hs27LzatjMwJBALY/QVuimpMg6fvNYf5YTif/qHOy+9FJmm4ZUW1VjLZW
+JGKwy+IuxUuc1gEtprZ2P/s8nPAm9sQ29ETCkXvnc4k=
+-----END RSA PRIVATE KEY-----
+',
+
+];
diff --git a/config/services.php b/config/services.php
new file mode 100644
index 0000000..8ce6cc6
--- /dev/null
+++ b/config/services.php
@@ -0,0 +1,37 @@
+ [
+ 'domain' => env('MAILGUN_DOMAIN'),
+ 'secret' => env('MAILGUN_SECRET'),
+ 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
+ ],
+
+ 'postmark' => [
+ 'token' => env('POSTMARK_TOKEN'),
+ ],
+
+ 'ses' => [
+ 'key' => env('AWS_ACCESS_KEY_ID'),
+ 'secret' => env('AWS_SECRET_ACCESS_KEY'),
+ 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
+ ],
+
+ 'sparkpost' => [
+ 'secret' => env('SPARKPOST_SECRET'),
+ ],
+
+];
diff --git a/config/session.php b/config/session.php
new file mode 100644
index 0000000..fbb9b4d
--- /dev/null
+++ b/config/session.php
@@ -0,0 +1,199 @@
+ env('SESSION_DRIVER', 'file'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Session Lifetime
+ |--------------------------------------------------------------------------
+ |
+ | Here you may specify the number of minutes that you wish the session
+ | to be allowed to remain idle before it expires. If you want them
+ | to immediately expire on the browser closing, set that option.
+ |
+ */
+
+ 'lifetime' => env('SESSION_LIFETIME', 120),
+
+ 'expire_on_close' => false,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Session Encryption
+ |--------------------------------------------------------------------------
+ |
+ | This option allows you to easily specify that all of your session data
+ | should be encrypted before it is stored. All encryption will be run
+ | automatically by Laravel and you can use the Session like normal.
+ |
+ */
+
+ 'encrypt' => false,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Session File Location
+ |--------------------------------------------------------------------------
+ |
+ | When using the native session driver, we need a location where session
+ | files may be stored. A default has been set for you but a different
+ | location may be specified. This is only needed for file sessions.
+ |
+ */
+
+ 'files' => storage_path('framework/sessions'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Session Database Connection
+ |--------------------------------------------------------------------------
+ |
+ | When using the "database" or "redis" session drivers, you may specify a
+ | connection that should be used to manage these sessions. This should
+ | correspond to a connection in your database configuration options.
+ |
+ */
+
+ 'connection' => env('SESSION_CONNECTION', null),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Session Database Table
+ |--------------------------------------------------------------------------
+ |
+ | When using the "database" session driver, you may specify the table we
+ | should use to manage the sessions. Of course, a sensible default is
+ | provided for you; however, you are free to change this as needed.
+ |
+ */
+
+ 'table' => 'sessions',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Session Cache Store
+ |--------------------------------------------------------------------------
+ |
+ | When using the "apc", "memcached", or "dynamodb" session drivers you may
+ | list a cache store that should be used for these sessions. This value
+ | must match with one of the application's configured cache "stores".
+ |
+ */
+
+ 'store' => env('SESSION_STORE', null),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Session Sweeping Lottery
+ |--------------------------------------------------------------------------
+ |
+ | Some session drivers must manually sweep their storage location to get
+ | rid of old sessions from storage. Here are the chances that it will
+ | happen on a given request. By default, the odds are 2 out of 100.
+ |
+ */
+
+ 'lottery' => [2, 100],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Session Cookie Name
+ |--------------------------------------------------------------------------
+ |
+ | Here you may change the name of the cookie used to identify a session
+ | instance by ID. The name specified here will get used every time a
+ | new session cookie is created by the framework for every driver.
+ |
+ */
+
+ 'cookie' => env(
+ 'SESSION_COOKIE',
+ Str::slug(env('APP_NAME', 'laravel'), '_').'_session'
+ ),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Session Cookie Path
+ |--------------------------------------------------------------------------
+ |
+ | The session cookie path determines the path for which the cookie will
+ | be regarded as available. Typically, this will be the root path of
+ | your application but you are free to change this when necessary.
+ |
+ */
+
+ 'path' => '/',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Session Cookie Domain
+ |--------------------------------------------------------------------------
+ |
+ | Here you may change the domain of the cookie used to identify a session
+ | in your application. This will determine which domains the cookie is
+ | available to in your application. A sensible default has been set.
+ |
+ */
+
+ 'domain' => env('SESSION_DOMAIN', null),
+
+ /*
+ |--------------------------------------------------------------------------
+ | HTTPS Only Cookies
+ |--------------------------------------------------------------------------
+ |
+ | By setting this option to true, session cookies will only be sent back
+ | to the server if the browser has a HTTPS connection. This will keep
+ | the cookie from being sent to you if it can not be done securely.
+ |
+ */
+
+ 'secure' => env('SESSION_SECURE_COOKIE', false),
+
+ /*
+ |--------------------------------------------------------------------------
+ | HTTP Access Only
+ |--------------------------------------------------------------------------
+ |
+ | Setting this value to true will prevent JavaScript from accessing the
+ | value of the cookie and the cookie will only be accessible through
+ | the HTTP protocol. You are free to modify this option if needed.
+ |
+ */
+
+ 'http_only' => true,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Same-Site Cookies
+ |--------------------------------------------------------------------------
+ |
+ | This option determines how your cookies behave when cross-site requests
+ | take place, and can be used to mitigate CSRF attacks. By default, we
+ | do not enable this as other CSRF protection services are in place.
+ |
+ | Supported: "lax", "strict"
+ |
+ */
+
+ 'same_site' => null,
+
+];
diff --git a/config/translatable.php b/config/translatable.php
new file mode 100644
index 0000000..75496ac
--- /dev/null
+++ b/config/translatable.php
@@ -0,0 +1,152 @@
+ [
+ 'en',
+ 'zh-CN',
+ 'ko',
+ 'zh-TW',
+// 'fr',
+// 'es' => [
+// 'MX', // mexican spanish
+// 'CO', // colombian spanish
+// ],
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Locale separator
+ |--------------------------------------------------------------------------
+ |
+ | This is a string used to glue the language and the country when defining
+ | the available locales. Example: if set to '-', then the locale for
+ | colombian spanish will be saved as 'es-CO' into the database.
+ |
+ */
+ 'locale_separator' => '-',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Default locale
+ |--------------------------------------------------------------------------
+ |
+ | As a default locale, Translatable takes the locale of Laravel's
+ | translator. If for some reason you want to override this,
+ | you can specify what default should be used here.
+ | If you set a value here it will only use the current config value
+ | and never fallback to the translator one.
+ |
+ */
+ 'locale' => null,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Use fallback
+ |--------------------------------------------------------------------------
+ |
+ | Determine if fallback locales are returned by default or not. To add
+ | more flexibility and configure this option per "translatable"
+ | instance, this value will be overridden by the property
+ | $useTranslationFallback when defined
+ |
+ */
+ 'use_fallback' => false,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Use fallback per property
+ |--------------------------------------------------------------------------
+ |
+ | The property fallback feature will return the translated value of
+ | the fallback locale if the property is empty for the selected
+ | locale. Note that 'use_fallback' must be enabled.
+ |
+ */
+ 'use_property_fallback' => true,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Fallback Locale
+ |--------------------------------------------------------------------------
+ |
+ | A fallback locale is the locale being used to return a translation
+ | when the requested translation is not existing. To disable it
+ | set it to false.
+ | If set to null it will loop through all configured locales until
+ | one existing is found or end of list reached. The locales are looped
+ | from top to bottom and for country based locales the simple one
+ | is used first. So "es" will be checked before "es_MX".
+ |
+ */
+ 'fallback_locale' => 'en',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Translation Model Namespace
+ |--------------------------------------------------------------------------
+ |
+ | Defines the default 'Translation' class namespace. For example, if
+ | you want to use App\Translations\CountryTranslation instead of App\CountryTranslation
+ | set this to 'App\Translations'.
+ |
+ */
+ 'translation_model_namespace' => null,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Translation Suffix
+ |--------------------------------------------------------------------------
+ |
+ | Defines the default 'Translation' class suffix. For example, if
+ | you want to use CountryTrans instead of CountryTranslation
+ | application, set this to 'Trans'.
+ |
+ */
+ 'translation_suffix' => 'Translation',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Locale key
+ |--------------------------------------------------------------------------
+ |
+ | Defines the 'locale' field name, which is used by the
+ | translation model.
+ |
+ */
+ 'locale_key' => 'locale',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Always load translations when converting to array
+ |--------------------------------------------------------------------------
+ | Setting this to false will have a performance improvement but will
+ | not return the translations when using toArray(), unless the
+ | translations relationship is already loaded.
+ |
+ */
+ 'to_array_always_loads_translations' => true,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Configure the default behavior of the rule factory
+ |--------------------------------------------------------------------------
+ | The default values used to control the behavior of the RuleFactory.
+ | Here you can set your own default format and delimiters for
+ | your whole app.
+ *
+ */
+ 'rule_factory' => [
+ 'format' => \Astrotomic\Translatable\Validation\RuleFactory::FORMAT_ARRAY,
+ 'prefix' => '%',
+ 'suffix' => '%',
+ ],
+];
diff --git a/config/ueditor.php b/config/ueditor.php
new file mode 100644
index 0000000..ca60a92
--- /dev/null
+++ b/config/ueditor.php
@@ -0,0 +1,96 @@
+ 'uploadimage', /* 执行上传图片的action名称 */
+ 'imageFieldName' => 'upfile', /* 提交的图片表单名称 */
+ 'imageMaxSize' => 2048000, /* 上传大小限制,单位B */
+ 'imageAllowFiles' => ['.png', '.jpg', '.jpeg', '.gif', '.bmp'], /* 上传图片格式显示 */
+ 'imageCompressEnable' => true, /* 是否压缩图片,默认是true */
+ 'imageCompressBorder' => 1600, /* 图片压缩最长边限制 */
+ 'imageInsertAlign' => 'none', /* 插入的图片浮动方式 */
+ 'imageUrlPrefix' => '', /* 图片访问路径前缀 */
+ 'imagePathFormat' => '/ueditor/image/{yyyy}{mm}{dd}/{time}{rand:6}', /* 上传保存路径,可以自定义保存路径和文件名格式 */
+ /* {filename} 会替换成原文件名,配置这项需要注意中文乱码问题 */
+ /* {rand:6} 会替换成随机数,后面的数字是随机数的位数 */
+ /* {time} 会替换成时间戳 */
+ /* {yyyy} 会替换成四位年份 */
+ /* {yy} 会替换成两位年份 */
+ /* {mm} 会替换成两位月份 */
+ /* {dd} 会替换成两位日期 */
+ /* {hh} 会替换成两位小时 */
+ /* {ii} 会替换成两位分钟 */
+ /* {ss} 会替换成两位秒 */
+ /* 非法字符 \ => * ? ' < > | */
+ /* 具请体看线上文档 => fex.baidu.com/ueditor/#use-format_upload_filename */
+
+ /* 涂鸦图片上传配置项 */
+ 'scrawlActionName' => 'uploadscrawl', /* 执行上传涂鸦的action名称 */
+ 'scrawlFieldName' => 'upfile', /* 提交的图片表单名称 */
+ 'scrawlPathFormat' => '/ueditor/image/{yyyy}{mm}{dd}/{time}{rand:6}', /* 上传保存路径,可以自定义保存路径和文件名格式 */
+ 'scrawlMaxSize' => 2048000, /* 上传大小限制,单位B */
+ 'scrawlUrlPrefix' => '', /* 图片访问路径前缀 */
+ 'scrawlInsertAlign' => 'none',
+
+ /* 截图工具上传 */
+ 'snapscreenActionName' => 'uploadimage', /* 执行上传截图的action名称 */
+ 'snapscreenPathFormat' => '/ueditor/php/image/{yyyy}{mm}{dd}/{time}{rand:6}', /* 上传保存路径,可以自定义保存路径和文件名格式 */
+ 'snapscreenUrlPrefix' => '', /* 图片访问路径前缀 */
+ 'snapscreenInsertAlign' => 'none', /* 插入的图片浮动方式 */
+
+ /* 抓取远程图片配置 */
+ 'catcherLocalDomain' => ['127.0.0.1', 'localhost', 'img.baidu.com'],
+ 'catcherActionName' => 'catchimage', /* 执行抓取远程图片的action名称 */
+ 'catcherFieldName' => 'source', /* 提交的图片列表表单名称 */
+ 'catcherPathFormat' => '/ueditor/php/image/{yyyy}{mm}{dd}/{time}{rand:6}', /* 上传保存路径,可以自定义保存路径和文件名格式 */
+ 'catcherUrlPrefix' => '', /* 图片访问路径前缀 */
+ 'catcherMaxSize' => 2048000, /* 上传大小限制,单位B */
+ 'catcherAllowFiles' => ['.png', '.jpg', '.jpeg', '.gif', '.bmp'], /* 抓取图片格式显示 */
+
+ /* 上传视频配置 */
+ 'videoActionName' => 'uploadvideo', /* 执行上传视频的action名称 */
+ 'videoFieldName' => 'upfile', /* 提交的视频表单名称 */
+ 'videoPathFormat' => '/ueditor/video/{yyyy}{mm}{dd}/{time}{rand:6}', /* 上传保存路径,可以自定义保存路径和文件名格式 */
+ 'videoUrlPrefix' => '', /* 视频访问路径前缀 */
+ 'videoMaxSize' => 102400000, /* 上传大小限制,单位B,默认100MB */
+ 'videoAllowFiles' => [
+ '.flv', '.swf', '.mkv', '.avi', '.rm', '.rmvb', '.mpeg', '.mpg',
+ '.ogg', '.ogv', '.mov', '.wmv', '.mp4', '.webm', '.mp3', '.wav', '.mid'], /* 上传视频格式显示 */
+
+ /* 上传文件配置 */
+ 'fileActionName' => 'uploadfile', /* controller里,执行上传视频的action名称 */
+ 'fileFieldName' => 'upfile', /* 提交的文件表单名称 */
+ 'filePathFormat' => '/ueditor/file/{yyyy}{mm}{dd}/{time}{rand:6}', /* 上传保存路径,可以自定义保存路径和文件名格式 */
+ 'fileUrlPrefix' => '', /* 文件访问路径前缀 */
+ 'fileMaxSize' => 51200000, /* 上传大小限制,单位B,默认50MB */
+ 'fileAllowFiles' => [
+ '.png', '.jpg', '.jpeg', '.gif', '.bmp',
+ '.flv', '.swf', '.mkv', '.avi', '.rm', '.rmvb', '.mpeg', '.mpg',
+ '.ogg', '.ogv', '.mov', '.wmv', '.mp4', '.webm', '.mp3', '.wav', '.mid',
+ '.rar', '.zip', '.tar', '.gz', '.7z', '.bz2', '.cab', '.iso',
+ '.doc', '.docx', '.xls', '.xlsx', '.ppt', '.pptx', '.pdf', '.txt', '.md', '.xml'
+ ], /* 上传文件格式显示 */
+
+ /* 列出指定目录下的图片 */
+ 'imageManagerActionName' => 'listimage', /* 执行图片管理的action名称 */
+ 'imageManagerListPath' => '/ueditor/image/', /* 指定要列出图片的目录 */
+ 'imageManagerListSize' => 20, /* 每次列出文件数量 */
+ 'imageManagerUrlPrefix' => '', /* 图片访问路径前缀 */
+ 'imageManagerInsertAlign' => 'none', /* 插入的图片浮动方式 */
+ 'imageManagerAllowFiles' => ['.png', '.jpg', '.jpeg', '.gif', '.bmp'], /* 列出的文件类型 */
+
+ /* 列出指定目录下的文件 */
+ 'fileManagerActionName' => 'listfile', /* 执行文件管理的action名称 */
+ 'fileManagerListPath' => '/ueditor/file/', /* 指定要列出文件的目录 */
+ 'fileManagerUrlPrefix' => '', /* 文件访问路径前缀 */
+ 'fileManagerListSize' => 20, /* 每次列出文件数量 */
+ 'fileManagerAllowFiles' => [
+ '.png', '.jpg', '.jpeg', '.gif', '.bmp',
+ '.flv', '.swf', '.mkv', '.avi', '.rm', '.rmvb', '.mpeg', '.mpg',
+ '.ogg', '.ogv', '.mov', '.wmv', '.mp4', '.webm', '.mp3', '.wav', '.mid',
+ '.rar', '.zip', '.tar', '.gz', '.7z', '.bz2', '.cab', '.iso',
+ '.doc', '.docx', '.xls', '.xlsx', '.ppt', '.pptx', '.pdf', '.txt', '.md', '.xml'
+ ] /* 列出的文件类型 */
+
+];
diff --git a/config/view.php b/config/view.php
new file mode 100644
index 0000000..22b8a18
--- /dev/null
+++ b/config/view.php
@@ -0,0 +1,36 @@
+ [
+ resource_path('views'),
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Compiled View Path
+ |--------------------------------------------------------------------------
+ |
+ | This option determines where all the compiled Blade templates will be
+ | stored for your application. Typically, this is within the storage
+ | directory. However, as usual, you are free to change this value.
+ |
+ */
+
+ 'compiled' => env(
+ 'VIEW_COMPILED_PATH',
+ realpath(storage_path('framework/views'))
+ ),
+
+];
diff --git a/config/workerman.php b/config/workerman.php
new file mode 100644
index 0000000..4a0984e
--- /dev/null
+++ b/config/workerman.php
@@ -0,0 +1,15 @@
+ [
+ 'service' => \App\Workerman\Swap\Swap::class,
+ 'eventHandler' => \App\Workerman\Swap\Events::class,
+ ],
+
+ 'option' => [
+ 'service' => \App\Workerman\Option\Option::class,
+ 'eventHandler' => \App\Workerman\Option\Events::class,
+ ],
+
+];
diff --git a/vendor.zip b/vendor.zip
new file mode 100644
index 0000000..48556ab
Binary files /dev/null and b/vendor.zip differ