├── .editorconfig
├── .eslintignore
├── .eslintrc.js
├── .github
└── workflows
│ ├── release.yml
│ ├── test.yml
│ └── validate.yml
├── .gitignore
├── .npmignore
├── .npmrc
├── .prettierignore
├── CHANGELOG.md
├── LICENSE
├── README.md
├── __tests__
├── index.test.js
└── lib
│ └── utils.js
├── commitlint.config.js
├── docs
├── configure.md
└── upload.md
├── example
├── .editorconfig
├── .env.example
├── .gitattributes
├── .gitignore
├── .styleci.yml
├── app
│ ├── Console
│ │ └── Kernel.php
│ ├── Exceptions
│ │ └── Handler.php
│ ├── Http
│ │ ├── Controllers
│ │ │ └── Controller.php
│ │ ├── Kernel.php
│ │ └── Middleware
│ │ │ ├── Authenticate.php
│ │ │ ├── CheckForMaintenanceMode.php
│ │ │ ├── EncryptCookies.php
│ │ │ ├── RedirectIfAuthenticated.php
│ │ │ ├── TrimStrings.php
│ │ │ ├── TrustHosts.php
│ │ │ ├── TrustProxies.php
│ │ │ └── VerifyCsrfToken.php
│ ├── Providers
│ │ ├── AppServiceProvider.php
│ │ ├── AuthServiceProvider.php
│ │ ├── BroadcastServiceProvider.php
│ │ ├── EventServiceProvider.php
│ │ └── RouteServiceProvider.php
│ └── User.php
├── artisan
├── bootstrap
│ ├── app.php
│ └── cache
│ │ └── .gitignore
├── composer.json
├── composer.lock
├── config
│ ├── app.php
│ ├── auth.php
│ ├── broadcasting.php
│ ├── cache.php
│ ├── cors.php
│ ├── database.php
│ ├── filesystems.php
│ ├── hashing.php
│ ├── logging.php
│ ├── mail.php
│ ├── queue.php
│ ├── services.php
│ ├── session.php
│ └── view.php
├── database
│ ├── .gitignore
│ ├── factories
│ │ └── UserFactory.php
│ ├── migrations
│ │ ├── 2014_10_12_000000_create_users_table.php
│ │ └── 2019_08_19_000000_create_failed_jobs_table.php
│ └── seeds
│ │ └── DatabaseSeeder.php
├── package.json
├── phpunit.xml
├── public
│ ├── .htaccess
│ ├── favicon.ico
│ ├── index.php
│ ├── robots.txt
│ └── web.config
├── resources
│ ├── js
│ │ ├── app.js
│ │ └── bootstrap.js
│ ├── lang
│ │ └── en
│ │ │ ├── auth.php
│ │ │ ├── pagination.php
│ │ │ ├── passwords.php
│ │ │ └── validation.php
│ ├── sass
│ │ └── app.scss
│ └── views
│ │ └── welcome.blade.php
├── routes
│ ├── api.php
│ ├── channels.php
│ ├── console.php
│ └── web.php
├── server.php
├── serverless.yml
└── webpack.mix.js
├── jest.config.js
├── package.json
├── prettier.config.js
├── release.config.js
├── serverless.component.yml
└── src
├── _shims
└── sl_handler.php
├── config.js
├── package.json
├── serverless.js
└── utils.js
/.editorconfig:
--------------------------------------------------------------------------------
1 | # EditorConfig is awesome: http://EditorConfig.org
2 |
3 | # top-most EditorConfig file
4 | root = true
5 |
6 | [*]
7 | charset = utf-8
8 | end_of_line = lf
9 | insert_final_newline = true
10 | indent_size = 2
11 | indent_style = space
12 | trim_trailing_whitespace = true
13 |
14 | [*.md]
15 | trim_trailing_whitespace = false
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | coverage
2 | dist
3 | node_modules
4 | example
5 | *.test.js
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | extends: ['prettier'],
4 | plugins: ['import', 'prettier'],
5 | env: {
6 | es6: true,
7 | jest: true,
8 | node: true
9 | },
10 | parser: 'babel-eslint',
11 | parserOptions: {
12 | ecmaVersion: 2018,
13 | sourceType: 'module',
14 | ecmaFeatures: {
15 | jsx: true
16 | }
17 | },
18 | globals: {
19 | on: true // for the Socket file
20 | },
21 | rules: {
22 | 'array-bracket-spacing': [
23 | 'error',
24 | 'never',
25 | {
26 | objectsInArrays: false,
27 | arraysInArrays: false
28 | }
29 | ],
30 | 'arrow-parens': ['error', 'always'],
31 | 'arrow-spacing': ['error', { before: true, after: true }],
32 | 'comma-dangle': ['error', 'never'],
33 | curly: 'error',
34 | 'eol-last': 'error',
35 | 'func-names': 'off',
36 | 'id-length': [
37 | 'error',
38 | {
39 | min: 1,
40 | max: 50,
41 | properties: 'never',
42 | exceptions: ['e', 'i', 'n', 't', 'x', 'y', 'z', '_', '$']
43 | }
44 | ],
45 | 'no-alert': 'error',
46 | 'no-console': 'off',
47 | 'no-const-assign': 'error',
48 | 'no-else-return': 'error',
49 | 'no-empty': 'off',
50 | 'no-shadow': 'error',
51 | 'no-undef': 'error',
52 | 'no-unused-vars': 'error',
53 | 'no-use-before-define': 'error',
54 | 'no-useless-constructor': 'error',
55 | 'object-curly-newline': 'off',
56 | 'object-shorthand': 'off',
57 | 'prefer-const': 'error',
58 | 'prefer-destructuring': ['error', { object: true, array: false }],
59 | quotes: [
60 | 'error',
61 | 'single',
62 | {
63 | allowTemplateLiterals: true,
64 | avoidEscape: true
65 | }
66 | ],
67 | semi: ['error', 'never'],
68 | 'spaced-comment': 'error',
69 | strict: ['error', 'global'],
70 | 'prettier/prettier': 'error'
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/.github/workflows/release.yml:
--------------------------------------------------------------------------------
1 | name: Release
2 |
3 | on:
4 | push:
5 | branches: [master]
6 |
7 | jobs:
8 | release:
9 | name: Release
10 | runs-on: ubuntu-latest
11 | env:
12 | GH_TOKEN: ${{ secrets.GH_TOKEN }}
13 | steps:
14 | - name: Checkout repository
15 | uses: actions/checkout@v2
16 | with:
17 | persist-credentials: false
18 |
19 | - name: Install Node.js and npm
20 | uses: actions/setup-node@v1
21 | with:
22 | node-version: 14.x
23 | registry-url: https://registry.npmjs.org
24 |
25 | - name: Retrieve dependencies from cache
26 | id: cacheNpm
27 | uses: actions/cache@v2
28 | with:
29 | path: |
30 | ~/.npm
31 | node_modules
32 | key: npm-v14-${{ runner.os }}-refs/heads/master-${{ hashFiles('package.json') }}
33 | restore-keys: npm-v14-${{ runner.os }}-refs/heads/master-
34 |
35 | - name: Install dependencies
36 | if: steps.cacheNpm.outputs.cache-hit != 'true'
37 | run: |
38 | npm update --no-save
39 | npm update --save-dev --no-save
40 | - name: Releasing
41 | run: |
42 | npm run release
43 | env:
44 | GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
45 | GIT_AUTHOR_NAME: slsplus
46 | GIT_AUTHOR_EMAIL: slsplus.sz@gmail.com
47 | GIT_COMMITTER_NAME: slsplus
48 | GIT_COMMITTER_EMAIL: slsplus.sz@gmail.com
49 |
--------------------------------------------------------------------------------
/.github/workflows/test.yml:
--------------------------------------------------------------------------------
1 | name: Test
2 |
3 | on:
4 | pull_request:
5 | branches: [master]
6 |
7 | jobs:
8 | test:
9 | name: Test
10 | runs-on: ubuntu-latest
11 | steps:
12 | - name: Checkout repository
13 | uses: actions/checkout@v2
14 | with:
15 | # Ensure connection with 'master' branch
16 | fetch-depth: 2
17 |
18 | - name: Install Node.js and npm
19 | uses: actions/setup-node@v1
20 | with:
21 | node-version: 14.x
22 | registry-url: https://registry.npmjs.org
23 |
24 | - name: Retrieve dependencies from cache
25 | id: cacheNpm
26 | uses: actions/cache@v2
27 | with:
28 | path: |
29 | ~/.npm
30 | node_modules
31 | key: npm-v14-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }}
32 | restore-keys: |
33 | npm-v14-${{ runner.os }}-${{ github.ref }}-
34 | npm-v14-${{ runner.os }}-refs/heads/master-
35 |
36 | - name: Install dependencies
37 | if: steps.cacheNpm.outputs.cache-hit != 'true'
38 | run: |
39 | npm update --no-save
40 | npm update --save-dev --no-save
41 | - name: Running tests
42 | run: npm run test
43 | env:
44 | SERVERLESS_PLATFORM_VENDOR: tencent
45 | GLOBAL_ACCELERATOR_NA: true
46 | TENCENT_SECRET_ID: ${{ secrets.TENCENT_SECRET_ID }}
47 | TENCENT_SECRET_KEY: ${{ secrets.TENCENT_SECRET_KEY }}
48 |
--------------------------------------------------------------------------------
/.github/workflows/validate.yml:
--------------------------------------------------------------------------------
1 | name: Validate
2 |
3 | on:
4 | pull_request:
5 | branches: [master]
6 |
7 | jobs:
8 | lintAndFormatting:
9 | name: Lint & Formatting
10 | runs-on: ubuntu-latest
11 | steps:
12 | - name: Checkout repository
13 | uses: actions/checkout@v2
14 | with:
15 | # Ensure connection with 'master' branch
16 | fetch-depth: 2
17 |
18 | - name: Install Node.js and npm
19 | uses: actions/setup-node@v1
20 | with:
21 | node-version: 14.x
22 | registry-url: https://registry.npmjs.org
23 |
24 | - name: Retrieve dependencies from cache
25 | id: cacheNpm
26 | uses: actions/cache@v2
27 | with:
28 | path: |
29 | ~/.npm
30 | node_modules
31 | key: npm-v14-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('package.json') }}
32 | restore-keys: |
33 | npm-v14-${{ runner.os }}-${{ github.ref }}-
34 | npm-v14-${{ runner.os }}-refs/heads/master-
35 |
36 | - name: Install dependencies
37 | if: steps.cacheNpm.outputs.cache-hit != 'true'
38 | run: |
39 | npm update --no-save
40 | npm update --save-dev --no-save
41 |
42 | - name: Validate Formatting
43 | run: npm run prettier:fix
44 | - name: Validate Lint rules
45 | run: npm run lint:fix
46 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | *.sublime-project
3 | *.sublime-workspace
4 | *.log
5 | .serverless
6 | v8-compile-cache-*
7 | jest/*
8 | coverage
9 | .serverless_plugins
10 | testProjects/*/package-lock.json
11 | testProjects/*/yarn.lock
12 | .serverlessUnzipped
13 | node_modules
14 | .vscode/
15 | .eslintcache
16 | dist
17 | .idea
18 | build/
19 | .env*
20 | env.js
21 | package-lock.json
22 | test
23 | yarn.lock
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | test
2 | example
--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------
1 | package-lock=false
2 |
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | *.sublime-project
3 | *.sublime-workspace
4 | *.log
5 | .serverless
6 | v8-compile-cache-*
7 | jest/*
8 | coverage
9 | .serverless_plugins
10 | testProjects/*/package-lock.json
11 | testProjects/*/yarn.lock
12 | .serverlessUnzipped
13 | node_modules
14 | .vscode/
15 | .eslintcache
16 | dist
17 | .idea
18 | build/
19 | .env*
20 | env.js
21 | package-lock.json
22 | yarn.lock
23 | example
24 | CHANGELOG.md
25 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## [0.2.1](https://github.com/serverless-components/tencent-laravel/compare/v0.2.0...v0.2.1) (2021-02-23)
2 |
3 |
4 | ### Bug Fixes
5 |
6 | * support base64 encode ([db98f6b](https://github.com/serverless-components/tencent-laravel/commit/db98f6ba368fabe898d42020b153eb88e9f30efd))
7 |
8 | # [0.2.0](https://github.com/serverless-components/tencent-laravel/compare/v0.1.2...v0.2.0) (2021-02-23)
9 |
10 |
11 | ### Features
12 |
13 | * support post form data ([ea1af31](https://github.com/serverless-components/tencent-laravel/commit/ea1af31739596d818b99d7206c84180662dd24da))
14 |
15 | ## [0.1.2](https://github.com/serverless-components/tencent-laravel/compare/v0.1.1...v0.1.2) (2020-12-15)
16 |
17 |
18 | ### Bug Fixes
19 |
20 | * update deploy and remove flow ([#19](https://github.com/serverless-components/tencent-laravel/issues/19)) ([7bd779a](https://github.com/serverless-components/tencent-laravel/commit/7bd779af406ecb863160b6272ff2bb6395167364))
21 |
22 | ## [0.1.1](https://github.com/serverless-components/tencent-laravel/compare/v0.1.0...v0.1.1) (2020-12-04)
23 |
24 |
25 | ### Bug Fixes
26 |
27 | * update prepare inputs method ([#18](https://github.com/serverless-components/tencent-laravel/issues/18)) ([4d940f7](https://github.com/serverless-components/tencent-laravel/commit/4d940f7f9c4ed6716fe31a65fc374f632cd7bb95))
28 |
29 | # [0.1.0](https://github.com/serverless-components/tencent-laravel/compare/v0.0.8...v0.1.0) (2020-12-04)
30 |
31 |
32 | ### Bug Fixes
33 |
34 | * update deps ([82d8696](https://github.com/serverless-components/tencent-laravel/commit/82d8696e0b4446414f81cd398646b4f9410d602c))
35 |
36 |
37 | ### Features
38 |
39 | * support no migration deploy ([9670f55](https://github.com/serverless-components/tencent-laravel/commit/9670f55e521b15886297b99d8d89d5fe10a90cac))
40 |
41 | ## [0.0.8](https://github.com/serverless-components/tencent-laravel/compare/v0.0.7...v0.0.8) (2020-09-07)
42 |
43 |
44 | ### Bug Fixes
45 |
46 | * update deploy flow for multi region ([b63c58e](https://github.com/serverless-components/tencent-laravel/commit/b63c58e6ba06597cd18dee4e963404f28b062ba3))
47 |
48 | ## [0.0.7](https://github.com/serverless-components/tencent-laravel/compare/v0.0.6...v0.0.7) (2020-09-04)
49 |
50 |
51 | ### Bug Fixes
52 |
53 | * update deps ([665a6cd](https://github.com/serverless-components/tencent-laravel/commit/665a6cde0b0bf5df90b5d84eafa28ff9e37339aa))
54 |
55 | ## [0.0.6](https://github.com/serverless-components/tencent-laravel/compare/v0.0.5...v0.0.6) (2020-09-02)
56 |
57 |
58 | ### Bug Fixes
59 |
60 | * support cfs config ([1af615b](https://github.com/serverless-components/tencent-laravel/commit/1af615bf4bf6950c862387b25f414f8d14cc1fbe))
61 | * update tencnet-component-toolkit for api mark ([b5de551](https://github.com/serverless-components/tencent-laravel/commit/b5de551fe3fcddfc7021f01f7b0563c0b2cc9669))
62 |
63 | ## [0.0.5](https://github.com/serverless-components/tencent-laravel/compare/v0.0.4...v0.0.5) (2020-08-26)
64 |
65 |
66 | ### Bug Fixes
67 |
68 | * apigw isDisabled ([c27183d](https://github.com/serverless-components/tencent-laravel/commit/c27183d7ec1b420c5a16dcd03185bb72c0413f7c))
69 | * prettier config ([3e06493](https://github.com/serverless-components/tencent-laravel/commit/3e06493fbf9c99f9e293f2f851884cd0a5315577))
70 | * support eip config ([0a18bc0](https://github.com/serverless-components/tencent-laravel/commit/0a18bc0e12e2422806c9eab3edfc2ffa064ae4c1))
71 | * support fonts type binary ([242dc08](https://github.com/serverless-components/tencent-laravel/commit/242dc080162f93c27aa8f94adc67db307269ecb2))
72 | * traffic zero display bug ([63e53eb](https://github.com/serverless-components/tencent-laravel/commit/63e53eb393dab71f9b38fdd627910f947a865ca5))
73 | * update get credential error message ([6cd73f0](https://github.com/serverless-components/tencent-laravel/commit/6cd73f0e78dd6ab5e95d721cc0dbc82d2d01fdc8))
74 | * upgrade deps ([4880ca3](https://github.com/serverless-components/tencent-laravel/commit/4880ca396d8dc4673504e189c900f971c83a357a))
75 | * upgrade deps ([7bc2f9e](https://github.com/serverless-components/tencent-laravel/commit/7bc2f9e076d2ab02cf0bddc8180666844cf3ecf3))
76 | * upgrade deps ([c9166b7](https://github.com/serverless-components/tencent-laravel/commit/c9166b7733e769175aed9103c2aeeab923ba3e85))
77 |
78 |
79 | ### Features
80 |
81 | * support scf publish version and traffic setup ([947b2f7](https://github.com/serverless-components/tencent-laravel/commit/947b2f7f16b82fc9aca3b5e822a6b00041f77586))
82 | * support usage plan & auth ([a41c2b5](https://github.com/serverless-components/tencent-laravel/commit/a41c2b591400e814e2b1826b2d100f92d8f75e04))
83 | * upgrade laravel to v2 ([77574f9](https://github.com/serverless-components/tencent-laravel/commit/77574f9de9ba70391f0729087dd82846ae01facd))
84 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 Tencent Cloud, Inc.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ⚠️⚠️⚠️ 所有框架组件项目迁移到 [tencent-framework-components](https://github.com/serverless-components/tencent-framework-components).
2 |
3 | [](http://serverless.com)
4 |
5 | [](https://github.com/serverless-components/tencent-laravel/actions?query=workflow:Test)
6 |
7 |
8 |
9 | 腾讯云 [Laravel](https://github.com/laravel/laravel) Serverless Component, 支持 `Laravel >= 6.0`。
10 |
11 |
12 |
13 | 特性介绍:
14 |
15 | - [x] **按需付费** - 按照请求的使用量进行收费,没有请求时无需付费
16 | - [x] **"0"配置** - 只需要关心项目代码,之后部署即可,Serverless Framework 会搞定所有配置。
17 | - [x] **极速部署** - 仅需几秒,部署你的整个 laravel 应用。
18 | - [x] **便捷协作** - 通过云端的状态信息和部署日志,方便的进行多人协作开发。
19 | - [x] **自定义域名** - 支持配置自定义域名及 HTTPS 访问
20 |
21 |
22 |
23 | 快速开始:
24 |
25 | 1. [**安装**](#1-安装)
26 | 2. [**创建**](#2-创建)
27 | 3. [**部署**](#3-部署)
28 | 4. [**配置**](#4-配置)
29 | 5. [**查看状态**](#5-查看状态)
30 | 6. [**移除**](#6-移除)
31 |
32 | 更多资源:
33 |
34 | - [**架构说明**](#架构说明)
35 | - [**账号配置**](#账号配置)
36 |
37 |
38 |
39 | ### 1. 安装
40 |
41 | 通过 npm 安装最新版本的 Serverless Framework
42 |
43 | ```bash
44 | $ npm install -g serverless
45 | ```
46 |
47 | ### 2. 创建
48 |
49 | 通过如下命令和模板链接,快速创建一个 laravel 应用:
50 |
51 | ```bash
52 | $ serverless init laravel-starter --name serverless-laravel
53 | $ cd example
54 | ```
55 |
56 | ### 3. 部署
57 |
58 | 在 `serverless.yml` 文件所在的项目根目录,运行以下指令进行部署:
59 |
60 | ```bash
61 | $ serverless deploy
62 | ```
63 |
64 | 部署时需要进行身份验证,如您的账号未 [登陆](https://cloud.tencent.com/login) 或 [注册](https://cloud.tencent.com/register) 腾讯云,您可以直接通过 `微信` 扫描命令行中的二维码进行授权登陆和注册。
65 |
66 | > 注意: 如果希望查看更多部署过程的信息,可以通过`serverless deploy --debug` 命令查看部署过程中的实时日志信息。
67 |
68 | ### 4. 配置
69 |
70 | laravel 组件支持 0 配置部署,也就是可以直接通过配置文件中的默认值进行部署。但你依然可以修改更多可选配置来进一步开发该 laravel 项目。
71 |
72 | 以下是 laravel 组件的 `serverless.yml`配置示例:
73 |
74 | ```yml
75 | # serverless.yml
76 |
77 | app: appDemo
78 | stage: dev
79 |
80 | component: laravel
81 | name: laravelDemo
82 |
83 | inputs:
84 | src:
85 | src: ./
86 | functionName: laravelDemo
87 | region: ap-guangzhou
88 | runtime: Php7
89 | apigatewayConf:
90 | protocols:
91 | - http
92 | - https
93 | environment: release
94 | ```
95 |
96 | 点此查看[全量配置及配置说明](https://github.com/serverless-components/tencent-laravel/tree/master/docs/configure.md)
97 |
98 | 当你根据该配置文件更新配置字段后,再次运行 `serverless deploy` 或者 `serverless` 就可以更新配置到云端。
99 |
100 | ### 5. 查看状态
101 |
102 | 在`serverless.yml`文件所在的目录下,通过如下命令查看部署状态:
103 |
104 | ```
105 | $ serverless info
106 | ```
107 |
108 | ### 6. 移除
109 |
110 | 在`serverless.yml`文件所在的目录下,通过以下命令移除部署的 laravel 服务。移除后该组件会对应删除云上部署时所创建的所有相关资源。
111 |
112 | ```
113 | $ serverless remove
114 | ```
115 |
116 | 和部署类似,支持通过 `serverless remove --debug` 命令查看移除过程中的实时日志信息。
117 |
118 | ## 架构说明
119 |
120 | laravel 组件将在腾讯云账户中使用到如下 Serverless 服务:
121 |
122 | - [x] **API 网关** - API 网关将会接收外部请求并且转发到 SCF 云函数中。
123 | - [x] **SCF 云函数** - 云函数将承载 laravel.js 应用。
124 | - [x] **CAM 访问控制** - 该组件会创建默认 CAM 角色用于授权访问关联资源。
125 | - [x] **COS 对象存储** - 为确保上传速度和质量,云函数压缩并上传代码时,会默认将代码包存储在特定命名的 COS 桶中。
126 | - [x] **SSL 证书服务** - 如果你在 yaml 文件中配置了 `apigatewayConf.customDomains` 字段,需要做自定义域名绑定并开启 HTTPS 时,也会用到证书管理服务和域名服务。Serverless Framework 会根据已经备案的域名自动申请并配置 SSL 证书。
127 |
128 | ## 账号配置
129 |
130 | 当前默认支持 CLI 扫描二维码登录,如您希望配置持久的环境变量/秘钥信息,也可以本地创建 `.env` 文件
131 |
132 | ```console
133 | $ touch .env # 腾讯云的配置信息
134 | ```
135 |
136 | 在 `.env` 文件中配置腾讯云的 SecretId 和 SecretKey 信息并保存
137 |
138 | 如果没有腾讯云账号,可以在此[注册新账号](https://cloud.tencent.com/register)。
139 |
140 | 如果已有腾讯云账号,可以在[API 密钥管理](https://console.cloud.tencent.com/cam/capi)中获取 `SecretId` 和`SecretKey`.
141 |
142 | ```
143 | # .env
144 | TENCENT_SECRET_ID=123
145 | TENCENT_SECRET_KEY=123
146 | ```
147 |
148 | ## License
149 |
150 | MIT License
151 |
152 | Copyright (c) 2020 Tencent Cloud, Inc.
153 |
--------------------------------------------------------------------------------
/__tests__/index.test.js:
--------------------------------------------------------------------------------
1 | const { generateId, getServerlessSdk } = require('./lib/utils')
2 | const axios = require('axios')
3 |
4 | const instanceYaml = {
5 | org: 'orgDemo',
6 | app: 'appDemo',
7 | component: 'laravel@dev',
8 | name: `laravel-integration-tests-${generateId()}`,
9 | stage: 'dev',
10 | inputs: {
11 | runtime: 'Php7',
12 | region: 'ap-guangzhou',
13 | apigatewayConf: { environment: 'test' }
14 | }
15 | }
16 |
17 | const credentials = {
18 | tencent: {
19 | SecretId: process.env.TENCENT_SECRET_ID,
20 | SecretKey: process.env.TENCENT_SECRET_KEY
21 | }
22 | }
23 |
24 | const sdk = getServerlessSdk(instanceYaml.org)
25 |
26 | it('should deploy success', async () => {
27 | const instance = await sdk.deploy(instanceYaml, credentials)
28 |
29 | expect(instance).toBeDefined()
30 | expect(instance.instanceName).toEqual(instanceYaml.name)
31 | expect(instance.outputs).toBeDefined()
32 | // get src from template by default
33 | expect(instance.outputs.templateUrl).toBeDefined()
34 | expect(instance.outputs.region).toEqual(instanceYaml.inputs.region)
35 | expect(instance.outputs.apigw).toBeDefined()
36 | expect(instance.outputs.apigw.environment).toEqual(instanceYaml.inputs.apigatewayConf.environment)
37 |
38 | const response = await axios.get(instance.outputs.apigw.url)
39 | expect(response.data.includes('Laravel')).toBeTruthy()
40 | })
41 |
42 | it('should remove success', async () => {
43 | await sdk.remove(instanceYaml, credentials)
44 | result = await sdk.getInstance(
45 | instanceYaml.org,
46 | instanceYaml.stage,
47 | instanceYaml.app,
48 | instanceYaml.name
49 | )
50 |
51 | expect(result.instance.instanceStatus).toEqual('inactive')
52 | })
53 |
--------------------------------------------------------------------------------
/__tests__/lib/utils.js:
--------------------------------------------------------------------------------
1 | const { ServerlessSDK } = require('@serverless/platform-client-china')
2 |
3 | /*
4 | * Generate random id
5 | */
6 | const generateId = () =>
7 | Math.random()
8 | .toString(36)
9 | .substring(6)
10 |
11 | /*
12 | * Initializes and returns an instance of the serverless sdk
13 | * @param ${string} orgName - the serverless org name.
14 | */
15 | const getServerlessSdk = (orgName) => {
16 | const sdk = new ServerlessSDK({
17 | context: {
18 | orgName
19 | }
20 | })
21 | return sdk
22 | }
23 |
24 | module.exports = { generateId, getServerlessSdk }
25 |
--------------------------------------------------------------------------------
/commitlint.config.js:
--------------------------------------------------------------------------------
1 | const Configuration = {
2 | /*
3 | * Resolve and load @commitlint/config-conventional from node_modules.
4 | * Referenced packages must be installed
5 | */
6 | extends: ['@commitlint/config-conventional']
7 | }
8 |
9 | module.exports = Configuration
10 |
--------------------------------------------------------------------------------
/docs/configure.md:
--------------------------------------------------------------------------------
1 | # 配置文档
2 |
3 | ## 全部配置
4 |
5 | ```yml
6 | # serverless.yml
7 | app: appDemo # (可选) 用于记录组织信息. 默认与name相同,必须为字符串
8 | stage: dev # (可选) 用于区分环境信息,默认值是 dev
9 |
10 | component: laravel # (必选) 组件名称
11 | name: laravelDemo # 必选) 组件实例名称.
12 |
13 | inputs:
14 | region: ap-guangzhou # 云函数所在区域
15 | src: # 部署src下的文件代码,并打包成zip上传到bucket上
16 | src: ./ # 本地需要打包的文件目录
17 | exclude: # 被排除的文件或目录
18 | - .env
19 | - 'node_modules/**'
20 | # src: # 在指定存储桶bucket中已经存在了object代码,直接部署
21 | # bucket: bucket01 # bucket name,当前会默认在bucket name后增加 appid 后缀, 本例中为 bucket01-appid
22 | # object: cos.zip # bucket key 指定存储桶内的文件
23 | functionConf: # 函数配置相关
24 | name: webDemo # 云函数名称
25 | runtime: Php7 # 运行环境
26 | timeout: 10 # 超时时间,单位秒
27 | eip: false # 是否固定出口IP
28 | memorySize: 128 # 内存大小,单位MB
29 | environment: # 环境变量
30 | variables: # 环境变量数组
31 | TEST: vale
32 | vpc: # 私有网络配置
33 | vpcId: 'vpc-xxx' # 私有网络的Id
34 | subnetId: 'subnet-xxx' # 子网ID
35 | layers:
36 | - name: layerName # layer名称
37 | version: 1 # 版本
38 | tags:
39 | tagKey: tagValue
40 | apigatewayConf: # api网关配置
41 | isDisabled: false # 是否禁用自动创建 API 网关功能
42 | isBase64Encoded: false # 是否开启 base64 编码
43 | id: service-np1uloxw # api网关服务ID
44 | name: serverless # api网关服务名称
45 | description: serverless apigw # api网关描述
46 | enableCORS: true # 允许跨域
47 | timeout: 15 # api 超时时间
48 | protocols:
49 | - http
50 | - https
51 | environment: test
52 | customDomains: # 自定义域名绑定
53 | - domain: abc.com # 待绑定的自定义的域名
54 | certificateId: abcdefg # 待绑定自定义域名的证书唯一 ID
55 | # 如要设置自定义路径映射,请设置为 false
56 | isDefaultMapping: false
57 | # 自定义路径映射的路径。使用自定义映射时,可一次仅映射一个 path 到一个环境,也可映射多个 path 到多个环境。并且一旦使用自定义映射,原本的默认映射规则不再生效,只有自定义映射路径生效。
58 | pathMappingSet:
59 | - path: /
60 | environment: release
61 | protocols: # 绑定自定义域名的协议类型,默认与服务的前端协议一致。
62 | - http # 支持http协议
63 | - https # 支持https协议
64 | usagePlan: # 用户使用计划
65 | usagePlanId: 1111
66 | usagePlanName: slscmp
67 | usagePlanDesc: sls create
68 | maxRequestNum: 1000
69 | auth: # 密钥
70 | secretName: secret
71 | secretIds:
72 | - xxx
73 | ```
74 |
75 | ## inputs 配置参数
76 |
77 | 主要的参数
78 |
79 | | 参数名称 | 必选 | 类型 | 默认值 | 描述 |
80 | | -------------- | :--: | :------------------------ | :-------------: | :--------------- |
81 | | region | 否 | string | `ap-guangzhou` | 项目部署所在区域 |
82 | | src | 否 | [Src](#Src) | `process.cwd()` | 项目代码配置 |
83 | | functionConf | 否 | [Function](#Function) | | 函数配置 |
84 | | apigatewayConf | 否 | [Apigateway](#Apigateway) | | API 网关配置 |
85 |
86 | ## Src
87 |
88 | 项目代码配置
89 |
90 | | 参数名称 | 是否必选 | 类型 | 默认值 | 描述 |
91 | | -------- | :------: | :------: | :----: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
92 | | src | 否 | string | | 代码路径。与 object 不能同时存在。 |
93 | | exclude | 否 | string[] | | 不包含的文件或路径, 遵守 [glob 语法][glob] |
94 | | bucket | 否 | string | | bucket 名称。如果配置了 src,表示部署 src 的代码并压缩成 zip 后上传到 bucket-appid 对应的存储桶中;如果配置了 object,表示获取 bucket-appid 对应存储桶中 object 对应的代码进行部署。 |
95 | | object | 否 | string | | 部署的代码在存储桶中的路径。 |
96 |
97 | ### Function
98 |
99 | 函数配置
100 |
101 | | 参数名称 | 是否必选 | 类型 | 默认值 | 描述 |
102 | | ----------- | :------: | :-------------------------- | :-----: | :------------------------------------------------------------------------------ |
103 | | runtime | 否 | string | `Php7` | 执行环境, 支持: Php7,Php5 |
104 | | timeout | 否 | number | `3` | 函数最长执行时间,单位为秒,可选值范围 1-900 秒,默认为 3 秒 |
105 | | memorySize | 否 | number | `128` | 函数运行时内存大小,默认为 128M,可选范围 64、128MB-3072MB,并且以 128MB 为阶梯 |
106 | | environment | 否 | [Environment](#Environment) | | 函数的环境变量 |
107 | | vpc | 否 | [Vpc](#Vpc) | | 函数的 VPC 配置 |
108 | | layers | 否 | [Layer](#Layer)[] | | 云函数绑定的 layer |
109 | | tags | 否 | object | | 云函数标签,`key-value` 形式配置 |
110 | | eip | 否 | boolean | `false` | 是否固定出口 IP |
111 |
112 | > 此处只是列举,`faas` 参数支持 [scf][scf-config] 组件的所有基础配置( `events` 除外)
113 |
114 | `runtime` 运行环境说明:
115 |
116 | ```
117 | Nodejs 框架支持:Nodejs6.10, Nodejs8.9, Nodejs10.15, Nodejs12.16
118 | Python 框架支持:Python3.6, Python2.7
119 | PHP 框架支持:Php7,Php5
120 | ```
121 |
122 | ##### Layer
123 |
124 | 层配置
125 |
126 | | 参数名称 | 是否必选 | 类型 | 默认值 | 描述 |
127 | | -------- | :------: | :----: | :----: | :------- |
128 | | name | 否 | string | | 层名称 |
129 | | version | 否 | string | | 层版本号 |
130 |
131 | ##### Environment
132 |
133 | 环境变量
134 |
135 | | 参数名称 | 类型 | 描述 |
136 | | --------- | ------ | :---------------------------------------- |
137 | | variables | object | 环境变量参数, 包含多对 key-value 的键值对 |
138 |
139 | ##### Vpc
140 |
141 | VPC 配置
142 |
143 | | 参数名称 | 类型 | 描述 |
144 | | -------- | ------ | :---------- |
145 | | vpcId | string | 私有网络 ID |
146 | | subnetId | string | 子网 ID |
147 |
148 | ### Apigateway
149 |
150 | API 网关配置
151 |
152 | | 参数名称 | 是否必选 | 类型 | 默认值 | 描述 |
153 | | --------------- | :------: | :------------------------------ | :----------- | :--------------------------------------------------------------- |
154 | | id | 否 | string | | API 网关服务 ID, 如果存在将使用这个 API 网关服务 |
155 | | name | 否 | string | `serverless` | API 网关服务名称, 默认创建一个新的服务名称 |
156 | | description | 否 | string | `serverless` | API 网关服务描述 |
157 | | protocols | 否 | string[] | `['http']` | 前端请求的类型,如 http,https,http 与 https |
158 | | environment | 否 | string | `release` | 发布环境. 网关环境: test, prepub 与 release |
159 | | usagePlan | 否 | [UsagePlan](#UsagePlan) | | 使用计划配置 |
160 | | auth | 否 | [ApuAuth](#ApiAuth) | | API 密钥配置 |
161 | | customDomain | 否 | [CustomDomain](#CustomDomain)[] | | 自定义 API 域名配置 |
162 | | enableCORS | 否 | boolean | `false` | 开启跨域。默认值为否。 |
163 | | timeout | 否 | number | `15` | Api 超时时间,单位: 秒 |
164 | | isDisabled | 否 | boolean | `false` | 关闭自动创建 API 网关功能。默认值为否,即默认自动创建 API 网关。 |
165 | | isBase64Encoded | 否 | Boolean | `false` | 是否开启 Base64 编码,如果需要文件上传,请配置为 `true` |
166 |
167 | ##### UsagePlan
168 |
169 | 使用计划配置
170 |
171 | 参考: https://cloud.tencent.com/document/product/628/14947
172 |
173 | | 参数名称 | 是否必选 | 类型 | 描述 |
174 | | ------------- | :------: | :----- | :------------------------------------------------------ |
175 | | usagePlanId | 否 | string | 用户自定义使用计划 ID |
176 | | usagePlanName | 否 | string | 用户自定义的使用计划名称 |
177 | | usagePlanDesc | 否 | string | 用户自定义的使用计划描述 |
178 | | maxRequestNum | 否 | number | 请求配额总数,如果为空,将使用-1 作为默认值,表示不开启 |
179 |
180 | ##### ApiAuth
181 |
182 | API 密钥配置
183 |
184 | | 参数名称 | 类型 | 描述 |
185 | | ---------- | :----- | :------- |
186 | | secretName | string | 密钥名称 |
187 | | secretIds | string | 密钥 ID |
188 |
189 | ##### CustomDomain
190 |
191 | 自定义域名配置
192 |
193 | | 参数名称 | 是否必选 | 类型 | 默认值 | 描述 |
194 | | ---------------- | :------: | :-------------------- | :----: | :---------------------------------------------------------------------------------- |
195 | | domain | 是 | string | | 待绑定的自定义的域名。 |
196 | | protocol | 否 | string[] | | 绑定自定义域名的协议类型,默认与服务的前端协议一致。 |
197 | | certificateId | 否 | string | | 待绑定自定义域名的证书 ID,如果设置了 `protocol` 含有 https,则为必选 |
198 | | isDefaultMapping | 否 | string | `true` | 是否使用默认路径映射。为 `false` 时,表示自定义路径映射,此时 pathMappingSet 必填。 |
199 | | pathMappingSet | 否 | [PathMap](#PathMap)[] | `[]` | 自定义路径映射的路径。 |
200 |
201 | > 注意:使用自定义映射时,可一次仅映射一个 path 到一个环境,也可映射多个 path 到多个环境。并且一旦使用自定义映射,原本的默认映射规则不再生效,只有自定义映射路径生效。
202 |
203 | ###### PathMap
204 |
205 | 自定义路径映射
206 |
207 | | 参数名称 | 是否必选 | 类型 | Description |
208 | | ----------- | :------: | :----- | :------------- |
209 | | path | 是 | string | 自定义映射路径 |
210 | | environment | 是 | string | 自定义映射环境 |
211 |
212 |
213 |
214 | [glob]: https://github.com/isaacs/node-glob
215 | [scf-config]: https://github.com/serverless-components/tencent-scf/tree/master/docs/configure.md
216 |
--------------------------------------------------------------------------------
/docs/upload.md:
--------------------------------------------------------------------------------
1 | ## 文件上传说明
2 |
3 | 项目中如果涉及到文件上传,需要依赖 API 网关提供的 [Base64 编码能力](https://cloud.tencent.com/document/product/628/51799),使用时只需要 `serverless.yml` 中配置 `isBase64Encoded` 为 `true`,如下:
4 |
5 | ```yaml
6 | app: appDemo
7 | stage: dev
8 | component: laravel
9 | name: laravelDemo
10 |
11 | inputs:
12 | # 省略...
13 | apigatewayConf:
14 | isBase64Encoded: true
15 | # 省略...
16 | # 省略...
17 | ```
18 |
19 | 当前 API 网关支持上传最大文件大小为 `2M`,如果文件过大,请修改为前端直传对象存储方案。
20 |
21 | ## Base64 示例
22 |
23 | 此 Github 项目的 `example` 目录下 `routes/api.php` 文件中有 `POST /upload` 接口如下:
24 |
25 | ```php
26 | // 上传文件接口
27 | Route::post('/upload', function (Request $request) {
28 | // 表单中字段为 file
29 | if ($request->file) {
30 | // TODO: 这里只是存储在了 /tmp 临时目录下,用户需要根据个人需要存储到持久化存储服务,比如腾讯云的对象存储、文件存储等。
31 | $upload = $request->file->store('upload');
32 | $uploadFile = storage_path()."/app/".$upload;
33 | }
34 |
35 | return response()->json([
36 | 'title' => 'serverless',
37 | 'upload' => $uploadFile ?? null,
38 | ]);
39 | });
40 | ```
41 |
--------------------------------------------------------------------------------
/example/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | end_of_line = lf
6 | insert_final_newline = true
7 | indent_style = space
8 | indent_size = 4
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | trim_trailing_whitespace = false
13 |
14 | [*.{yml,yaml}]
15 | indent_size = 2
16 |
--------------------------------------------------------------------------------
/example/.env.example:
--------------------------------------------------------------------------------
1 | APP_NAME=Laravel
2 | APP_ENV=local
3 | APP_KEY=
4 | APP_DEBUG=true
5 | APP_URL=http://localhost
6 |
7 | LOG_CHANNEL=stack
8 |
9 | DB_CONNECTION=mysql
10 | DB_HOST=127.0.0.1
11 | DB_PORT=3306
12 | DB_DATABASE=laravel
13 | DB_USERNAME=root
14 | DB_PASSWORD=
15 |
16 | BROADCAST_DRIVER=log
17 | CACHE_DRIVER=file
18 | QUEUE_CONNECTION=sync
19 | SESSION_DRIVER=file
20 | SESSION_LIFETIME=120
21 |
22 | REDIS_HOST=127.0.0.1
23 | REDIS_PASSWORD=null
24 | REDIS_PORT=6379
25 |
26 | MAIL_MAILER=smtp
27 | MAIL_HOST=smtp.mailtrap.io
28 | MAIL_PORT=2525
29 | MAIL_USERNAME=null
30 | MAIL_PASSWORD=null
31 | MAIL_ENCRYPTION=null
32 | MAIL_FROM_ADDRESS=null
33 | MAIL_FROM_NAME="${APP_NAME}"
34 |
35 | AWS_ACCESS_KEY_ID=
36 | AWS_SECRET_ACCESS_KEY=
37 | AWS_DEFAULT_REGION=us-east-1
38 | AWS_BUCKET=
39 |
40 | PUSHER_APP_ID=
41 | PUSHER_APP_KEY=
42 | PUSHER_APP_SECRET=
43 | PUSHER_APP_CLUSTER=mt1
44 |
45 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
46 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
47 |
48 | # tencent crendential
49 | TENCENT_SECRET_ID=xxx
50 | TENCENT_SECRET_KEY=xxx
51 |
--------------------------------------------------------------------------------
/example/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 | *.css linguist-vendored
3 | *.scss linguist-vendored
4 | *.js linguist-vendored
5 | CHANGELOG.md export-ignore
6 |
--------------------------------------------------------------------------------
/example/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules
2 | /public/hot
3 | /public/storage
4 | /storage/*.key
5 | /vendor
6 | .env
7 | .env.backup
8 | .phpunit.result.cache
9 | Homestead.json
10 | Homestead.yaml
11 | npm-debug.log
12 | yarn-error.log
13 |
14 | /storage/
15 |
--------------------------------------------------------------------------------
/example/.styleci.yml:
--------------------------------------------------------------------------------
1 | php:
2 | preset: laravel
3 | disabled:
4 | - unused_use
5 | finder:
6 | not-name:
7 | - index.php
8 | - server.php
9 | js:
10 | finder:
11 | not-name:
12 | - webpack.mix.js
13 | css: true
14 |
--------------------------------------------------------------------------------
/example/app/Console/Kernel.php:
--------------------------------------------------------------------------------
1 | command('inspire')->hourly();
28 | }
29 |
30 | /**
31 | * Register the commands for the application.
32 | *
33 | * @return void
34 | */
35 | protected function commands()
36 | {
37 | $this->load(__DIR__.'/Commands');
38 |
39 | require base_path('routes/console.php');
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/example/app/Exceptions/Handler.php:
--------------------------------------------------------------------------------
1 | [
33 | \App\Http\Middleware\EncryptCookies::class,
34 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
35 | \Illuminate\Session\Middleware\StartSession::class,
36 | // \Illuminate\Session\Middleware\AuthenticateSession::class,
37 | \Illuminate\View\Middleware\ShareErrorsFromSession::class,
38 | \App\Http\Middleware\VerifyCsrfToken::class,
39 | \Illuminate\Routing\Middleware\SubstituteBindings::class,
40 | ],
41 |
42 | 'api' => [
43 | 'throttle:60,1',
44 | \Illuminate\Routing\Middleware\SubstituteBindings::class,
45 | ],
46 | ];
47 |
48 | /**
49 | * The application's route middleware.
50 | *
51 | * These middleware may be assigned to groups or used individually.
52 | *
53 | * @var array
54 | */
55 | protected $routeMiddleware = [
56 | 'auth' => \App\Http\Middleware\Authenticate::class,
57 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
58 | 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
59 | 'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
60 | 'can' => \Illuminate\Auth\Middleware\Authorize::class,
61 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
62 | 'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
63 | 'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
64 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
65 | 'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
66 | ];
67 | }
68 |
--------------------------------------------------------------------------------
/example/app/Http/Middleware/Authenticate.php:
--------------------------------------------------------------------------------
1 | expectsJson()) {
18 | return route('login');
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/example/app/Http/Middleware/CheckForMaintenanceMode.php:
--------------------------------------------------------------------------------
1 | check()) {
22 | return redirect(RouteServiceProvider::HOME);
23 | }
24 |
25 | return $next($request);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/example/app/Http/Middleware/TrimStrings.php:
--------------------------------------------------------------------------------
1 | allSubdomainsOfApplicationUrl(),
18 | ];
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/example/app/Http/Middleware/TrustProxies.php:
--------------------------------------------------------------------------------
1 | 'App\Policies\ModelPolicy',
17 | ];
18 |
19 | /**
20 | * Register any authentication / authorization services.
21 | *
22 | * @return void
23 | */
24 | public function boot()
25 | {
26 | $this->registerPolicies();
27 |
28 | //
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/example/app/Providers/BroadcastServiceProvider.php:
--------------------------------------------------------------------------------
1 | [
19 | SendEmailVerificationNotification::class,
20 | ],
21 | ];
22 |
23 | /**
24 | * Register any events for your application.
25 | *
26 | * @return void
27 | */
28 | public function boot()
29 | {
30 | parent::boot();
31 |
32 | //
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/example/app/Providers/RouteServiceProvider.php:
--------------------------------------------------------------------------------
1 | mapApiRoutes();
46 |
47 | $this->mapWebRoutes();
48 |
49 | //
50 | }
51 |
52 | /**
53 | * Define the "web" routes for the application.
54 | *
55 | * These routes all receive session state, CSRF protection, etc.
56 | *
57 | * @return void
58 | */
59 | protected function mapWebRoutes()
60 | {
61 | Route::middleware('web')
62 | ->namespace($this->namespace)
63 | ->group(base_path('routes/web.php'));
64 | }
65 |
66 | /**
67 | * Define the "api" routes for the application.
68 | *
69 | * These routes are typically stateless.
70 | *
71 | * @return void
72 | */
73 | protected function mapApiRoutes()
74 | {
75 | Route::prefix('api')
76 | ->middleware('api')
77 | ->namespace($this->namespace)
78 | ->group(base_path('routes/api.php'));
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/example/app/User.php:
--------------------------------------------------------------------------------
1 | 'datetime',
38 | ];
39 | }
40 |
--------------------------------------------------------------------------------
/example/artisan:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env php
2 | make(Illuminate\Contracts\Console\Kernel::class);
34 |
35 | $status = $kernel->handle(
36 | $input = new Symfony\Component\Console\Input\ArgvInput,
37 | new Symfony\Component\Console\Output\ConsoleOutput
38 | );
39 |
40 | /*
41 | |--------------------------------------------------------------------------
42 | | Shutdown The Application
43 | |--------------------------------------------------------------------------
44 | |
45 | | Once Artisan has finished running, we will fire off the shutdown events
46 | | so that any final work may be done by the application before we shut
47 | | down the process. This is the last thing to happen to the request.
48 | |
49 | */
50 |
51 | $kernel->terminate($input, $status);
52 |
53 | exit($status);
54 |
--------------------------------------------------------------------------------
/example/bootstrap/app.php:
--------------------------------------------------------------------------------
1 | singleton(
30 | Illuminate\Contracts\Http\Kernel::class,
31 | App\Http\Kernel::class
32 | );
33 |
34 | $app->singleton(
35 | Illuminate\Contracts\Console\Kernel::class,
36 | App\Console\Kernel::class
37 | );
38 |
39 | $app->singleton(
40 | Illuminate\Contracts\Debug\ExceptionHandler::class,
41 | App\Exceptions\Handler::class
42 | );
43 |
44 | /*
45 | |--------------------------------------------------------------------------
46 | | Return The Application
47 | |--------------------------------------------------------------------------
48 | |
49 | | This script returns the application instance. The instance is given to
50 | | the calling script so we can separate the building of the instances
51 | | from the actual running of the application and sending responses.
52 | |
53 | */
54 |
55 | return $app;
56 |
--------------------------------------------------------------------------------
/example/bootstrap/cache/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/example/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "laravel/laravel",
3 | "type": "project",
4 | "description": "The Laravel Framework.",
5 | "keywords": [
6 | "framework",
7 | "laravel"
8 | ],
9 | "license": "MIT",
10 | "require": {
11 | "php": "^7.2.5",
12 | "fideloper/proxy": "^4.2",
13 | "fruitcake/laravel-cors": "^1.0",
14 | "guzzlehttp/guzzle": "^6.3",
15 | "laravel/framework": "^7.0",
16 | "laravel/tinker": "^2.0"
17 | },
18 | "require-dev": {
19 | "facade/ignition": "^2.0",
20 | "fzaninotto/faker": "^1.9.1",
21 | "mockery/mockery": "^1.3.1",
22 | "nunomaduro/collision": "^4.1",
23 | "phpunit/phpunit": "^8.5"
24 | },
25 | "config": {
26 | "optimize-autoloader": true,
27 | "preferred-install": "dist",
28 | "sort-packages": true
29 | },
30 | "extra": {
31 | "laravel": {
32 | "dont-discover": []
33 | }
34 | },
35 | "autoload": {
36 | "psr-4": {
37 | "App\\": "app/"
38 | },
39 | "classmap": [
40 | "database/seeds",
41 | "database/factories"
42 | ]
43 | },
44 | "autoload-dev": {
45 | "psr-4": {
46 | "Tests\\": "tests/"
47 | }
48 | },
49 | "minimum-stability": "dev",
50 | "prefer-stable": true,
51 | "scripts": {
52 | "post-autoload-dump": [
53 | "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
54 | "@php artisan package:discover --ansi"
55 | ],
56 | "post-root-package-install": [
57 | "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
58 | ],
59 | "post-create-project-cmd": [
60 | "@php artisan key:generate --ansi"
61 | ]
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/example/config/app.php:
--------------------------------------------------------------------------------
1 | env('APP_NAME', 'Laravel'),
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Application Environment
21 | |--------------------------------------------------------------------------
22 | |
23 | | This value determines the "environment" your application is currently
24 | | running in. This may determine how you prefer to configure various
25 | | services the application utilizes. Set this in your ".env" file.
26 | |
27 | */
28 |
29 | 'env' => env('APP_ENV', 'production'),
30 |
31 | /*
32 | |--------------------------------------------------------------------------
33 | | Application Debug Mode
34 | |--------------------------------------------------------------------------
35 | |
36 | | When your application is in debug mode, detailed error messages with
37 | | stack traces will be shown on every error that occurs within your
38 | | application. If disabled, a simple generic error page is shown.
39 | |
40 | */
41 |
42 | 'debug' => (bool) env('APP_DEBUG', false),
43 |
44 | /*
45 | |--------------------------------------------------------------------------
46 | | Application URL
47 | |--------------------------------------------------------------------------
48 | |
49 | | This URL is used by the console to properly generate URLs when using
50 | | the Artisan command line tool. You should set this to the root of
51 | | your application so that it is used when running Artisan tasks.
52 | |
53 | */
54 |
55 | 'url' => env('APP_URL', 'http://localhost'),
56 |
57 | 'asset_url' => env('ASSET_URL', null),
58 |
59 | /*
60 | |--------------------------------------------------------------------------
61 | | Application Timezone
62 | |--------------------------------------------------------------------------
63 | |
64 | | Here you may specify the default timezone for your application, which
65 | | will be used by the PHP date and date-time functions. We have gone
66 | | ahead and set this to a sensible default for you out of the box.
67 | |
68 | */
69 |
70 | 'timezone' => 'UTC',
71 |
72 | /*
73 | |--------------------------------------------------------------------------
74 | | Application Locale Configuration
75 | |--------------------------------------------------------------------------
76 | |
77 | | The application locale determines the default locale that will be used
78 | | by the translation service provider. You are free to set this value
79 | | to any of the locales which will be supported by the application.
80 | |
81 | */
82 |
83 | 'locale' => 'en',
84 |
85 | /*
86 | |--------------------------------------------------------------------------
87 | | Application Fallback Locale
88 | |--------------------------------------------------------------------------
89 | |
90 | | The fallback locale determines the locale to use when the current one
91 | | is not available. You may change the value to correspond to any of
92 | | the language folders that are provided through your application.
93 | |
94 | */
95 |
96 | 'fallback_locale' => 'en',
97 |
98 | /*
99 | |--------------------------------------------------------------------------
100 | | Faker Locale
101 | |--------------------------------------------------------------------------
102 | |
103 | | This locale will be used by the Faker PHP library when generating fake
104 | | data for your database seeds. For example, this will be used to get
105 | | localized telephone numbers, street address information and more.
106 | |
107 | */
108 |
109 | 'faker_locale' => 'en_US',
110 |
111 | /*
112 | |--------------------------------------------------------------------------
113 | | Encryption Key
114 | |--------------------------------------------------------------------------
115 | |
116 | | This key is used by the Illuminate encrypter service and should be set
117 | | to a random, 32 character string, otherwise these encrypted strings
118 | | will not be safe. Please do this before deploying an application!
119 | |
120 | */
121 |
122 | 'key' => env('APP_KEY'),
123 |
124 | 'cipher' => 'AES-256-CBC',
125 |
126 | /*
127 | |--------------------------------------------------------------------------
128 | | Autoloaded Service Providers
129 | |--------------------------------------------------------------------------
130 | |
131 | | The service providers listed here will be automatically loaded on the
132 | | request to your application. Feel free to add your own services to
133 | | this array to grant expanded functionality to your applications.
134 | |
135 | */
136 |
137 | 'providers' => [
138 |
139 | /*
140 | * Laravel Framework Service Providers...
141 | */
142 | Illuminate\Auth\AuthServiceProvider::class,
143 | Illuminate\Broadcasting\BroadcastServiceProvider::class,
144 | Illuminate\Bus\BusServiceProvider::class,
145 | Illuminate\Cache\CacheServiceProvider::class,
146 | Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
147 | Illuminate\Cookie\CookieServiceProvider::class,
148 | Illuminate\Database\DatabaseServiceProvider::class,
149 | Illuminate\Encryption\EncryptionServiceProvider::class,
150 | Illuminate\Filesystem\FilesystemServiceProvider::class,
151 | Illuminate\Foundation\Providers\FoundationServiceProvider::class,
152 | Illuminate\Hashing\HashServiceProvider::class,
153 | Illuminate\Mail\MailServiceProvider::class,
154 | Illuminate\Notifications\NotificationServiceProvider::class,
155 | Illuminate\Pagination\PaginationServiceProvider::class,
156 | Illuminate\Pipeline\PipelineServiceProvider::class,
157 | Illuminate\Queue\QueueServiceProvider::class,
158 | Illuminate\Redis\RedisServiceProvider::class,
159 | Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
160 | Illuminate\Session\SessionServiceProvider::class,
161 | Illuminate\Translation\TranslationServiceProvider::class,
162 | Illuminate\Validation\ValidationServiceProvider::class,
163 | Illuminate\View\ViewServiceProvider::class,
164 |
165 | /*
166 | * Package Service Providers...
167 | */
168 |
169 | /*
170 | * Application Service Providers...
171 | */
172 | App\Providers\AppServiceProvider::class,
173 | App\Providers\AuthServiceProvider::class,
174 | // App\Providers\BroadcastServiceProvider::class,
175 | App\Providers\EventServiceProvider::class,
176 | App\Providers\RouteServiceProvider::class,
177 |
178 | ],
179 |
180 | /*
181 | |--------------------------------------------------------------------------
182 | | Class Aliases
183 | |--------------------------------------------------------------------------
184 | |
185 | | This array of class aliases will be registered when this application
186 | | is started. However, feel free to register as many as you wish as
187 | | the aliases are "lazy" loaded so they don't hinder performance.
188 | |
189 | */
190 |
191 | 'aliases' => [
192 |
193 | 'App' => Illuminate\Support\Facades\App::class,
194 | 'Arr' => Illuminate\Support\Arr::class,
195 | 'Artisan' => Illuminate\Support\Facades\Artisan::class,
196 | 'Auth' => Illuminate\Support\Facades\Auth::class,
197 | 'Blade' => Illuminate\Support\Facades\Blade::class,
198 | 'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
199 | 'Bus' => Illuminate\Support\Facades\Bus::class,
200 | 'Cache' => Illuminate\Support\Facades\Cache::class,
201 | 'Config' => Illuminate\Support\Facades\Config::class,
202 | 'Cookie' => Illuminate\Support\Facades\Cookie::class,
203 | 'Crypt' => Illuminate\Support\Facades\Crypt::class,
204 | 'DB' => Illuminate\Support\Facades\DB::class,
205 | 'Eloquent' => Illuminate\Database\Eloquent\Model::class,
206 | 'Event' => Illuminate\Support\Facades\Event::class,
207 | 'File' => Illuminate\Support\Facades\File::class,
208 | 'Gate' => Illuminate\Support\Facades\Gate::class,
209 | 'Hash' => Illuminate\Support\Facades\Hash::class,
210 | 'Http' => Illuminate\Support\Facades\Http::class,
211 | 'Lang' => Illuminate\Support\Facades\Lang::class,
212 | 'Log' => Illuminate\Support\Facades\Log::class,
213 | 'Mail' => Illuminate\Support\Facades\Mail::class,
214 | 'Notification' => Illuminate\Support\Facades\Notification::class,
215 | 'Password' => Illuminate\Support\Facades\Password::class,
216 | 'Queue' => Illuminate\Support\Facades\Queue::class,
217 | 'Redirect' => Illuminate\Support\Facades\Redirect::class,
218 | 'Redis' => Illuminate\Support\Facades\Redis::class,
219 | 'Request' => Illuminate\Support\Facades\Request::class,
220 | 'Response' => Illuminate\Support\Facades\Response::class,
221 | 'Route' => Illuminate\Support\Facades\Route::class,
222 | 'Schema' => Illuminate\Support\Facades\Schema::class,
223 | 'Session' => Illuminate\Support\Facades\Session::class,
224 | 'Storage' => Illuminate\Support\Facades\Storage::class,
225 | 'Str' => Illuminate\Support\Str::class,
226 | 'URL' => Illuminate\Support\Facades\URL::class,
227 | 'Validator' => Illuminate\Support\Facades\Validator::class,
228 | 'View' => Illuminate\Support\Facades\View::class,
229 |
230 | ],
231 |
232 | ];
233 |
--------------------------------------------------------------------------------
/example/config/auth.php:
--------------------------------------------------------------------------------
1 | [
17 | 'guard' => 'web',
18 | 'passwords' => 'users',
19 | ],
20 |
21 | /*
22 | |--------------------------------------------------------------------------
23 | | Authentication Guards
24 | |--------------------------------------------------------------------------
25 | |
26 | | Next, you may define every authentication guard for your application.
27 | | Of course, a great default configuration has been defined for you
28 | | here which uses session storage and the Eloquent user provider.
29 | |
30 | | All authentication drivers have a user provider. This defines how the
31 | | users are actually retrieved out of your database or other storage
32 | | mechanisms used by this application to persist your user's data.
33 | |
34 | | Supported: "session", "token"
35 | |
36 | */
37 |
38 | 'guards' => [
39 | 'web' => [
40 | 'driver' => 'session',
41 | 'provider' => 'users',
42 | ],
43 |
44 | 'api' => [
45 | 'driver' => 'token',
46 | 'provider' => 'users',
47 | 'hash' => false,
48 | ],
49 | ],
50 |
51 | /*
52 | |--------------------------------------------------------------------------
53 | | User Providers
54 | |--------------------------------------------------------------------------
55 | |
56 | | All authentication drivers have a user provider. This defines how the
57 | | users are actually retrieved out of your database or other storage
58 | | mechanisms used by this application to persist your user's data.
59 | |
60 | | If you have multiple user tables or models you may configure multiple
61 | | sources which represent each model / table. These sources may then
62 | | be assigned to any extra authentication guards you have defined.
63 | |
64 | | Supported: "database", "eloquent"
65 | |
66 | */
67 |
68 | 'providers' => [
69 | 'users' => [
70 | 'driver' => 'eloquent',
71 | 'model' => App\User::class,
72 | ],
73 |
74 | // 'users' => [
75 | // 'driver' => 'database',
76 | // 'table' => 'users',
77 | // ],
78 | ],
79 |
80 | /*
81 | |--------------------------------------------------------------------------
82 | | Resetting Passwords
83 | |--------------------------------------------------------------------------
84 | |
85 | | You may specify multiple password reset configurations if you have more
86 | | than one user table or model in the application and you want to have
87 | | separate password reset settings based on the specific user types.
88 | |
89 | | The expire time is the number of minutes that the reset token should be
90 | | considered valid. This security feature keeps tokens short-lived so
91 | | they have less time to be guessed. You may change this as needed.
92 | |
93 | */
94 |
95 | 'passwords' => [
96 | 'users' => [
97 | 'provider' => 'users',
98 | 'table' => 'password_resets',
99 | 'expire' => 60,
100 | 'throttle' => 60,
101 | ],
102 | ],
103 |
104 | /*
105 | |--------------------------------------------------------------------------
106 | | Password Confirmation Timeout
107 | |--------------------------------------------------------------------------
108 | |
109 | | Here you may define the amount of seconds before a password confirmation
110 | | times out and the user is prompted to re-enter their password via the
111 | | confirmation screen. By default, the timeout lasts for three hours.
112 | |
113 | */
114 |
115 | 'password_timeout' => 10800,
116 |
117 | ];
118 |
--------------------------------------------------------------------------------
/example/config/broadcasting.php:
--------------------------------------------------------------------------------
1 | env('BROADCAST_DRIVER', 'null'),
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Broadcast Connections
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may define all of the broadcast connections that will be used
26 | | to broadcast events to other systems or over websockets. Samples of
27 | | each available type of connection are provided inside this array.
28 | |
29 | */
30 |
31 | 'connections' => [
32 |
33 | 'pusher' => [
34 | 'driver' => 'pusher',
35 | 'key' => env('PUSHER_APP_KEY'),
36 | 'secret' => env('PUSHER_APP_SECRET'),
37 | 'app_id' => env('PUSHER_APP_ID'),
38 | 'options' => [
39 | 'cluster' => env('PUSHER_APP_CLUSTER'),
40 | 'useTLS' => true,
41 | ],
42 | ],
43 |
44 | 'redis' => [
45 | 'driver' => 'redis',
46 | 'connection' => 'default',
47 | ],
48 |
49 | 'log' => [
50 | 'driver' => 'log',
51 | ],
52 |
53 | 'null' => [
54 | 'driver' => 'null',
55 | ],
56 |
57 | ],
58 |
59 | ];
60 |
--------------------------------------------------------------------------------
/example/config/cache.php:
--------------------------------------------------------------------------------
1 | env('CACHE_DRIVER', 'file'),
22 |
23 | /*
24 | |--------------------------------------------------------------------------
25 | | Cache Stores
26 | |--------------------------------------------------------------------------
27 | |
28 | | Here you may define all of the cache "stores" for your application as
29 | | well as their drivers. You may even define multiple stores for the
30 | | same cache driver to group types of items stored in your caches.
31 | |
32 | */
33 |
34 | 'stores' => [
35 |
36 | 'apc' => [
37 | 'driver' => 'apc',
38 | ],
39 |
40 | 'array' => [
41 | 'driver' => 'array',
42 | 'serialize' => false,
43 | ],
44 |
45 | 'database' => [
46 | 'driver' => 'database',
47 | 'table' => 'cache',
48 | 'connection' => null,
49 | ],
50 |
51 | 'file' => [
52 | 'driver' => 'file',
53 | 'path' => storage_path('framework/cache/data'),
54 | ],
55 |
56 | 'memcached' => [
57 | 'driver' => 'memcached',
58 | 'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
59 | 'sasl' => [
60 | env('MEMCACHED_USERNAME'),
61 | env('MEMCACHED_PASSWORD'),
62 | ],
63 | 'options' => [
64 | // Memcached::OPT_CONNECT_TIMEOUT => 2000,
65 | ],
66 | 'servers' => [
67 | [
68 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'),
69 | 'port' => env('MEMCACHED_PORT', 11211),
70 | 'weight' => 100,
71 | ],
72 | ],
73 | ],
74 |
75 | 'redis' => [
76 | 'driver' => 'redis',
77 | 'connection' => 'cache',
78 | ],
79 |
80 | 'dynamodb' => [
81 | 'driver' => 'dynamodb',
82 | 'key' => env('AWS_ACCESS_KEY_ID'),
83 | 'secret' => env('AWS_SECRET_ACCESS_KEY'),
84 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
85 | 'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
86 | 'endpoint' => env('DYNAMODB_ENDPOINT'),
87 | ],
88 |
89 | ],
90 |
91 | /*
92 | |--------------------------------------------------------------------------
93 | | Cache Key Prefix
94 | |--------------------------------------------------------------------------
95 | |
96 | | When utilizing a RAM based store such as APC or Memcached, there might
97 | | be other applications utilizing the same cache. So, we'll specify a
98 | | value to get prefixed to all our keys so we can avoid collisions.
99 | |
100 | */
101 |
102 | 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'),
103 |
104 | ];
105 |
--------------------------------------------------------------------------------
/example/config/cors.php:
--------------------------------------------------------------------------------
1 | ['api/*'],
19 |
20 | 'allowed_methods' => ['*'],
21 |
22 | 'allowed_origins' => ['*'],
23 |
24 | 'allowed_origins_patterns' => [],
25 |
26 | 'allowed_headers' => ['*'],
27 |
28 | 'exposed_headers' => [],
29 |
30 | 'max_age' => 0,
31 |
32 | 'supports_credentials' => false,
33 |
34 | ];
35 |
--------------------------------------------------------------------------------
/example/config/database.php:
--------------------------------------------------------------------------------
1 | env('DB_CONNECTION', 'mysql'),
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Database Connections
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here are each of the database connections setup for your application.
26 | | Of course, examples of configuring each database platform that is
27 | | supported by Laravel is shown below to make development simple.
28 | |
29 | |
30 | | All database work in Laravel is done through the PHP PDO facilities
31 | | so make sure you have the driver for your particular database of
32 | | choice installed on your machine before you begin development.
33 | |
34 | */
35 |
36 | 'connections' => [
37 |
38 | 'sqlite' => [
39 | 'driver' => 'sqlite',
40 | 'url' => env('DATABASE_URL'),
41 | 'database' => env('DB_DATABASE', database_path('database.sqlite')),
42 | 'prefix' => '',
43 | 'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
44 | ],
45 |
46 | 'mysql' => [
47 | 'driver' => 'mysql',
48 | 'url' => env('DATABASE_URL'),
49 | 'host' => env('DB_HOST', '127.0.0.1'),
50 | 'port' => env('DB_PORT', '3306'),
51 | 'database' => env('DB_DATABASE', 'forge'),
52 | 'username' => env('DB_USERNAME', 'forge'),
53 | 'password' => env('DB_PASSWORD', ''),
54 | 'unix_socket' => env('DB_SOCKET', ''),
55 | 'charset' => 'utf8mb4',
56 | 'collation' => 'utf8mb4_unicode_ci',
57 | 'prefix' => '',
58 | 'prefix_indexes' => true,
59 | 'strict' => true,
60 | 'engine' => null,
61 | 'options' => extension_loaded('pdo_mysql') ? array_filter([
62 | PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
63 | ]) : [],
64 | ],
65 |
66 | 'pgsql' => [
67 | 'driver' => 'pgsql',
68 | 'url' => env('DATABASE_URL'),
69 | 'host' => env('DB_HOST', '127.0.0.1'),
70 | 'port' => env('DB_PORT', '5432'),
71 | 'database' => env('DB_DATABASE', 'forge'),
72 | 'username' => env('DB_USERNAME', 'forge'),
73 | 'password' => env('DB_PASSWORD', ''),
74 | 'charset' => 'utf8',
75 | 'prefix' => '',
76 | 'prefix_indexes' => true,
77 | 'schema' => 'public',
78 | 'sslmode' => 'prefer',
79 | ],
80 |
81 | 'sqlsrv' => [
82 | 'driver' => 'sqlsrv',
83 | 'url' => env('DATABASE_URL'),
84 | 'host' => env('DB_HOST', 'localhost'),
85 | 'port' => env('DB_PORT', '1433'),
86 | 'database' => env('DB_DATABASE', 'forge'),
87 | 'username' => env('DB_USERNAME', 'forge'),
88 | 'password' => env('DB_PASSWORD', ''),
89 | 'charset' => 'utf8',
90 | 'prefix' => '',
91 | 'prefix_indexes' => true,
92 | ],
93 |
94 | ],
95 |
96 | /*
97 | |--------------------------------------------------------------------------
98 | | Migration Repository Table
99 | |--------------------------------------------------------------------------
100 | |
101 | | This table keeps track of all the migrations that have already run for
102 | | your application. Using this information, we can determine which of
103 | | the migrations on disk haven't actually been run in the database.
104 | |
105 | */
106 |
107 | 'migrations' => 'migrations',
108 |
109 | /*
110 | |--------------------------------------------------------------------------
111 | | Redis Databases
112 | |--------------------------------------------------------------------------
113 | |
114 | | Redis is an open source, fast, and advanced key-value store that also
115 | | provides a richer body of commands than a typical key-value system
116 | | such as APC or Memcached. Laravel makes it easy to dig right in.
117 | |
118 | */
119 |
120 | 'redis' => [
121 |
122 | 'client' => env('REDIS_CLIENT', 'phpredis'),
123 |
124 | 'options' => [
125 | 'cluster' => env('REDIS_CLUSTER', 'redis'),
126 | 'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
127 | ],
128 |
129 | 'default' => [
130 | 'url' => env('REDIS_URL'),
131 | 'host' => env('REDIS_HOST', '127.0.0.1'),
132 | 'password' => env('REDIS_PASSWORD', null),
133 | 'port' => env('REDIS_PORT', '6379'),
134 | 'database' => env('REDIS_DB', '0'),
135 | ],
136 |
137 | 'cache' => [
138 | 'url' => env('REDIS_URL'),
139 | 'host' => env('REDIS_HOST', '127.0.0.1'),
140 | 'password' => env('REDIS_PASSWORD', null),
141 | 'port' => env('REDIS_PORT', '6379'),
142 | 'database' => env('REDIS_CACHE_DB', '1'),
143 | ],
144 |
145 | ],
146 |
147 | ];
148 |
--------------------------------------------------------------------------------
/example/config/filesystems.php:
--------------------------------------------------------------------------------
1 | env('FILESYSTEM_DRIVER', 'local'),
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Default Cloud Filesystem Disk
21 | |--------------------------------------------------------------------------
22 | |
23 | | Many applications store files both locally and in the cloud. For this
24 | | reason, you may specify a default "cloud" driver here. This driver
25 | | will be bound as the Cloud disk implementation in the container.
26 | |
27 | */
28 |
29 | 'cloud' => env('FILESYSTEM_CLOUD', 's3'),
30 |
31 | /*
32 | |--------------------------------------------------------------------------
33 | | Filesystem Disks
34 | |--------------------------------------------------------------------------
35 | |
36 | | Here you may configure as many filesystem "disks" as you wish, and you
37 | | may even configure multiple disks of the same driver. Defaults have
38 | | been setup for each driver as an example of the required options.
39 | |
40 | | Supported Drivers: "local", "ftp", "sftp", "s3"
41 | |
42 | */
43 |
44 | 'disks' => [
45 |
46 | 'local' => [
47 | 'driver' => 'local',
48 | 'root' => storage_path('app'),
49 | ],
50 |
51 | 'public' => [
52 | 'driver' => 'local',
53 | 'root' => storage_path('app/public'),
54 | 'url' => env('APP_URL').'/storage',
55 | 'visibility' => 'public',
56 | ],
57 |
58 | 's3' => [
59 | 'driver' => 's3',
60 | 'key' => env('AWS_ACCESS_KEY_ID'),
61 | 'secret' => env('AWS_SECRET_ACCESS_KEY'),
62 | 'region' => env('AWS_DEFAULT_REGION'),
63 | 'bucket' => env('AWS_BUCKET'),
64 | 'url' => env('AWS_URL'),
65 | 'endpoint' => env('AWS_ENDPOINT'),
66 | ],
67 |
68 | ],
69 |
70 | /*
71 | |--------------------------------------------------------------------------
72 | | Symbolic Links
73 | |--------------------------------------------------------------------------
74 | |
75 | | Here you may configure the symbolic links that will be created when the
76 | | `storage:link` Artisan command is executed. The array keys should be
77 | | the locations of the links and the values should be their targets.
78 | |
79 | */
80 |
81 | 'links' => [
82 | public_path('storage') => storage_path('app/public'),
83 | ],
84 |
85 | ];
86 |
--------------------------------------------------------------------------------
/example/config/hashing.php:
--------------------------------------------------------------------------------
1 | 'bcrypt',
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Bcrypt Options
23 | |--------------------------------------------------------------------------
24 | |
25 | | Here you may specify the configuration options that should be used when
26 | | passwords are hashed using the Bcrypt algorithm. This will allow you
27 | | to control the amount of time it takes to hash the given password.
28 | |
29 | */
30 |
31 | 'bcrypt' => [
32 | 'rounds' => env('BCRYPT_ROUNDS', 10),
33 | ],
34 |
35 | /*
36 | |--------------------------------------------------------------------------
37 | | Argon Options
38 | |--------------------------------------------------------------------------
39 | |
40 | | Here you may specify the configuration options that should be used when
41 | | passwords are hashed using the Argon algorithm. These will allow you
42 | | to control the amount of time it takes to hash the given password.
43 | |
44 | */
45 |
46 | 'argon' => [
47 | 'memory' => 1024,
48 | 'threads' => 2,
49 | 'time' => 2,
50 | ],
51 |
52 | ];
53 |
--------------------------------------------------------------------------------
/example/config/logging.php:
--------------------------------------------------------------------------------
1 | env('LOG_CHANNEL', 'stack'),
21 |
22 | /*
23 | |--------------------------------------------------------------------------
24 | | Log Channels
25 | |--------------------------------------------------------------------------
26 | |
27 | | Here you may configure the log channels for your application. Out of
28 | | the box, Laravel uses the Monolog PHP logging library. This gives
29 | | you a variety of powerful log handlers / formatters to utilize.
30 | |
31 | | Available Drivers: "single", "daily", "slack", "syslog",
32 | | "errorlog", "monolog",
33 | | "custom", "stack"
34 | |
35 | */
36 |
37 | 'channels' => [
38 | 'stack' => [
39 | 'driver' => 'stack',
40 | 'channels' => ['single'],
41 | 'ignore_exceptions' => false,
42 | ],
43 |
44 | 'single' => [
45 | 'driver' => 'single',
46 | 'path' => storage_path('logs/laravel.log'),
47 | 'level' => 'debug',
48 | ],
49 |
50 | 'daily' => [
51 | 'driver' => 'daily',
52 | 'path' => storage_path('logs/laravel.log'),
53 | 'level' => 'debug',
54 | 'days' => 14,
55 | ],
56 |
57 | 'slack' => [
58 | 'driver' => 'slack',
59 | 'url' => env('LOG_SLACK_WEBHOOK_URL'),
60 | 'username' => 'Laravel Log',
61 | 'emoji' => ':boom:',
62 | 'level' => 'critical',
63 | ],
64 |
65 | 'papertrail' => [
66 | 'driver' => 'monolog',
67 | 'level' => 'debug',
68 | 'handler' => SyslogUdpHandler::class,
69 | 'handler_with' => [
70 | 'host' => env('PAPERTRAIL_URL'),
71 | 'port' => env('PAPERTRAIL_PORT'),
72 | ],
73 | ],
74 |
75 | 'stderr' => [
76 | 'driver' => 'monolog',
77 | 'handler' => StreamHandler::class,
78 | 'formatter' => env('LOG_STDERR_FORMATTER'),
79 | 'with' => [
80 | 'stream' => 'php://stderr',
81 | ],
82 | ],
83 |
84 | 'syslog' => [
85 | 'driver' => 'syslog',
86 | 'level' => 'debug',
87 | ],
88 |
89 | 'errorlog' => [
90 | 'driver' => 'errorlog',
91 | 'level' => 'debug',
92 | ],
93 |
94 | 'null' => [
95 | 'driver' => 'monolog',
96 | 'handler' => NullHandler::class,
97 | ],
98 |
99 | 'emergency' => [
100 | 'path' => storage_path('logs/laravel.log'),
101 | ],
102 | ],
103 |
104 | ];
105 |
--------------------------------------------------------------------------------
/example/config/mail.php:
--------------------------------------------------------------------------------
1 | env('MAIL_MAILER', 'smtp'),
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Mailer Configurations
21 | |--------------------------------------------------------------------------
22 | |
23 | | Here you may configure all of the mailers used by your application plus
24 | | their respective settings. Several examples have been configured for
25 | | you and you are free to add your own as your application requires.
26 | |
27 | | Laravel supports a variety of mail "transport" drivers to be used while
28 | | sending an e-mail. You will specify which one you are using for your
29 | | mailers below. You are free to add additional mailers as required.
30 | |
31 | | Supported: "smtp", "sendmail", "mailgun", "ses",
32 | | "postmark", "log", "array"
33 | |
34 | */
35 |
36 | 'mailers' => [
37 | 'smtp' => [
38 | 'transport' => 'smtp',
39 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
40 | 'port' => env('MAIL_PORT', 587),
41 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'),
42 | 'username' => env('MAIL_USERNAME'),
43 | 'password' => env('MAIL_PASSWORD'),
44 | 'timeout' => null,
45 | 'auth_mode' => null,
46 | ],
47 |
48 | 'ses' => [
49 | 'transport' => 'ses',
50 | ],
51 |
52 | 'mailgun' => [
53 | 'transport' => 'mailgun',
54 | ],
55 |
56 | 'postmark' => [
57 | 'transport' => 'postmark',
58 | ],
59 |
60 | 'sendmail' => [
61 | 'transport' => 'sendmail',
62 | 'path' => '/usr/sbin/sendmail -bs',
63 | ],
64 |
65 | 'log' => [
66 | 'transport' => 'log',
67 | 'channel' => env('MAIL_LOG_CHANNEL'),
68 | ],
69 |
70 | 'array' => [
71 | 'transport' => 'array',
72 | ],
73 | ],
74 |
75 | /*
76 | |--------------------------------------------------------------------------
77 | | Global "From" Address
78 | |--------------------------------------------------------------------------
79 | |
80 | | You may wish for all e-mails sent by your application to be sent from
81 | | the same address. Here, you may specify a name and address that is
82 | | used globally for all e-mails that are sent by your application.
83 | |
84 | */
85 |
86 | 'from' => [
87 | 'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'),
88 | 'name' => env('MAIL_FROM_NAME', 'Example'),
89 | ],
90 |
91 | /*
92 | |--------------------------------------------------------------------------
93 | | Markdown Mail Settings
94 | |--------------------------------------------------------------------------
95 | |
96 | | If you are using Markdown based email rendering, you may configure your
97 | | theme and component paths here, allowing you to customize the design
98 | | of the emails. Or, you may simply stick with the Laravel defaults!
99 | |
100 | */
101 |
102 | 'markdown' => [
103 | 'theme' => 'default',
104 |
105 | 'paths' => [
106 | resource_path('views/vendor/mail'),
107 | ],
108 | ],
109 |
110 | ];
111 |
--------------------------------------------------------------------------------
/example/config/queue.php:
--------------------------------------------------------------------------------
1 | env('QUEUE_CONNECTION', 'sync'),
17 |
18 | /*
19 | |--------------------------------------------------------------------------
20 | | Queue Connections
21 | |--------------------------------------------------------------------------
22 | |
23 | | Here you may configure the connection information for each server that
24 | | is used by your application. A default configuration has been added
25 | | for each back-end shipped with Laravel. You are free to add more.
26 | |
27 | | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
28 | |
29 | */
30 |
31 | 'connections' => [
32 |
33 | 'sync' => [
34 | 'driver' => 'sync',
35 | ],
36 |
37 | 'database' => [
38 | 'driver' => 'database',
39 | 'table' => 'jobs',
40 | 'queue' => 'default',
41 | 'retry_after' => 90,
42 | ],
43 |
44 | 'beanstalkd' => [
45 | 'driver' => 'beanstalkd',
46 | 'host' => 'localhost',
47 | 'queue' => 'default',
48 | 'retry_after' => 90,
49 | 'block_for' => 0,
50 | ],
51 |
52 | 'sqs' => [
53 | 'driver' => 'sqs',
54 | 'key' => env('AWS_ACCESS_KEY_ID'),
55 | 'secret' => env('AWS_SECRET_ACCESS_KEY'),
56 | 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
57 | 'queue' => env('SQS_QUEUE', 'your-queue-name'),
58 | 'suffix' => env('SQS_SUFFIX'),
59 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
60 | ],
61 |
62 | 'redis' => [
63 | 'driver' => 'redis',
64 | 'connection' => 'default',
65 | 'queue' => env('REDIS_QUEUE', 'default'),
66 | 'retry_after' => 90,
67 | 'block_for' => null,
68 | ],
69 |
70 | ],
71 |
72 | /*
73 | |--------------------------------------------------------------------------
74 | | Failed Queue Jobs
75 | |--------------------------------------------------------------------------
76 | |
77 | | These options configure the behavior of failed queue job logging so you
78 | | can control which database and table are used to store the jobs that
79 | | have failed. You may change them to any database / table you wish.
80 | |
81 | */
82 |
83 | 'failed' => [
84 | 'driver' => env('QUEUE_FAILED_DRIVER', 'database'),
85 | 'database' => env('DB_CONNECTION', 'mysql'),
86 | 'table' => 'failed_jobs',
87 | ],
88 |
89 | ];
90 |
--------------------------------------------------------------------------------
/example/config/services.php:
--------------------------------------------------------------------------------
1 | [
18 | 'domain' => env('MAILGUN_DOMAIN'),
19 | 'secret' => env('MAILGUN_SECRET'),
20 | 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
21 | ],
22 |
23 | 'postmark' => [
24 | 'token' => env('POSTMARK_TOKEN'),
25 | ],
26 |
27 | 'ses' => [
28 | 'key' => env('AWS_ACCESS_KEY_ID'),
29 | 'secret' => env('AWS_SECRET_ACCESS_KEY'),
30 | 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
31 | ],
32 |
33 | ];
34 |
--------------------------------------------------------------------------------
/example/config/session.php:
--------------------------------------------------------------------------------
1 | env('SESSION_DRIVER', 'file'),
22 |
23 | /*
24 | |--------------------------------------------------------------------------
25 | | Session Lifetime
26 | |--------------------------------------------------------------------------
27 | |
28 | | Here you may specify the number of minutes that you wish the session
29 | | to be allowed to remain idle before it expires. If you want them
30 | | to immediately expire on the browser closing, set that option.
31 | |
32 | */
33 |
34 | 'lifetime' => env('SESSION_LIFETIME', 120),
35 |
36 | 'expire_on_close' => false,
37 |
38 | /*
39 | |--------------------------------------------------------------------------
40 | | Session Encryption
41 | |--------------------------------------------------------------------------
42 | |
43 | | This option allows you to easily specify that all of your session data
44 | | should be encrypted before it is stored. All encryption will be run
45 | | automatically by Laravel and you can use the Session like normal.
46 | |
47 | */
48 |
49 | 'encrypt' => false,
50 |
51 | /*
52 | |--------------------------------------------------------------------------
53 | | Session File Location
54 | |--------------------------------------------------------------------------
55 | |
56 | | When using the native session driver, we need a location where session
57 | | files may be stored. A default has been set for you but a different
58 | | location may be specified. This is only needed for file sessions.
59 | |
60 | */
61 |
62 | 'files' => storage_path('framework/sessions'),
63 |
64 | /*
65 | |--------------------------------------------------------------------------
66 | | Session Database Connection
67 | |--------------------------------------------------------------------------
68 | |
69 | | When using the "database" or "redis" session drivers, you may specify a
70 | | connection that should be used to manage these sessions. This should
71 | | correspond to a connection in your database configuration options.
72 | |
73 | */
74 |
75 | 'connection' => env('SESSION_CONNECTION', null),
76 |
77 | /*
78 | |--------------------------------------------------------------------------
79 | | Session Database Table
80 | |--------------------------------------------------------------------------
81 | |
82 | | When using the "database" session driver, you may specify the table we
83 | | should use to manage the sessions. Of course, a sensible default is
84 | | provided for you; however, you are free to change this as needed.
85 | |
86 | */
87 |
88 | 'table' => 'sessions',
89 |
90 | /*
91 | |--------------------------------------------------------------------------
92 | | Session Cache Store
93 | |--------------------------------------------------------------------------
94 | |
95 | | While using one of the framework's cache driven session backends you may
96 | | list a cache store that should be used for these sessions. This value
97 | | must match with one of the application's configured cache "stores".
98 | |
99 | | Affects: "apc", "dynamodb", "memcached", "redis"
100 | |
101 | */
102 |
103 | 'store' => env('SESSION_STORE', null),
104 |
105 | /*
106 | |--------------------------------------------------------------------------
107 | | Session Sweeping Lottery
108 | |--------------------------------------------------------------------------
109 | |
110 | | Some session drivers must manually sweep their storage location to get
111 | | rid of old sessions from storage. Here are the chances that it will
112 | | happen on a given request. By default, the odds are 2 out of 100.
113 | |
114 | */
115 |
116 | 'lottery' => [2, 100],
117 |
118 | /*
119 | |--------------------------------------------------------------------------
120 | | Session Cookie Name
121 | |--------------------------------------------------------------------------
122 | |
123 | | Here you may change the name of the cookie used to identify a session
124 | | instance by ID. The name specified here will get used every time a
125 | | new session cookie is created by the framework for every driver.
126 | |
127 | */
128 |
129 | 'cookie' => env(
130 | 'SESSION_COOKIE',
131 | Str::slug(env('APP_NAME', 'laravel'), '_').'_session'
132 | ),
133 |
134 | /*
135 | |--------------------------------------------------------------------------
136 | | Session Cookie Path
137 | |--------------------------------------------------------------------------
138 | |
139 | | The session cookie path determines the path for which the cookie will
140 | | be regarded as available. Typically, this will be the root path of
141 | | your application but you are free to change this when necessary.
142 | |
143 | */
144 |
145 | 'path' => '/',
146 |
147 | /*
148 | |--------------------------------------------------------------------------
149 | | Session Cookie Domain
150 | |--------------------------------------------------------------------------
151 | |
152 | | Here you may change the domain of the cookie used to identify a session
153 | | in your application. This will determine which domains the cookie is
154 | | available to in your application. A sensible default has been set.
155 | |
156 | */
157 |
158 | 'domain' => env('SESSION_DOMAIN', null),
159 |
160 | /*
161 | |--------------------------------------------------------------------------
162 | | HTTPS Only Cookies
163 | |--------------------------------------------------------------------------
164 | |
165 | | By setting this option to true, session cookies will only be sent back
166 | | to the server if the browser has a HTTPS connection. This will keep
167 | | the cookie from being sent to you if it can not be done securely.
168 | |
169 | */
170 |
171 | 'secure' => env('SESSION_SECURE_COOKIE'),
172 |
173 | /*
174 | |--------------------------------------------------------------------------
175 | | HTTP Access Only
176 | |--------------------------------------------------------------------------
177 | |
178 | | Setting this value to true will prevent JavaScript from accessing the
179 | | value of the cookie and the cookie will only be accessible through
180 | | the HTTP protocol. You are free to modify this option if needed.
181 | |
182 | */
183 |
184 | 'http_only' => true,
185 |
186 | /*
187 | |--------------------------------------------------------------------------
188 | | Same-Site Cookies
189 | |--------------------------------------------------------------------------
190 | |
191 | | This option determines how your cookies behave when cross-site requests
192 | | take place, and can be used to mitigate CSRF attacks. By default, we
193 | | will set this value to "lax" since this is a secure default value.
194 | |
195 | | Supported: "lax", "strict", "none", null
196 | |
197 | */
198 |
199 | 'same_site' => 'lax',
200 |
201 | ];
202 |
--------------------------------------------------------------------------------
/example/config/view.php:
--------------------------------------------------------------------------------
1 | [
17 | resource_path('views'),
18 | ],
19 |
20 | /*
21 | |--------------------------------------------------------------------------
22 | | Compiled View Path
23 | |--------------------------------------------------------------------------
24 | |
25 | | This option determines where all the compiled Blade templates will be
26 | | stored for your application. Typically, this is within the storage
27 | | directory. However, as usual, you are free to change this value.
28 | |
29 | */
30 |
31 | 'compiled' => env(
32 | 'VIEW_COMPILED_PATH',
33 | realpath(storage_path('framework/views'))
34 | ),
35 |
36 | ];
37 |
--------------------------------------------------------------------------------
/example/database/.gitignore:
--------------------------------------------------------------------------------
1 | *.sqlite
2 | *.sqlite-journal
3 |
--------------------------------------------------------------------------------
/example/database/factories/UserFactory.php:
--------------------------------------------------------------------------------
1 | define(User::class, function (Faker $faker) {
21 | return [
22 | 'name' => $faker->name,
23 | 'email' => $faker->unique()->safeEmail,
24 | 'email_verified_at' => now(),
25 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
26 | 'remember_token' => Str::random(10),
27 | ];
28 | });
29 |
--------------------------------------------------------------------------------
/example/database/migrations/2014_10_12_000000_create_users_table.php:
--------------------------------------------------------------------------------
1 | id();
18 | $table->string('name');
19 | $table->string('email')->unique();
20 | $table->timestamp('email_verified_at')->nullable();
21 | $table->string('password');
22 | $table->rememberToken();
23 | $table->timestamps();
24 | });
25 | }
26 |
27 | /**
28 | * Reverse the migrations.
29 | *
30 | * @return void
31 | */
32 | public function down()
33 | {
34 | Schema::dropIfExists('users');
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/example/database/migrations/2019_08_19_000000_create_failed_jobs_table.php:
--------------------------------------------------------------------------------
1 | id();
18 | $table->text('connection');
19 | $table->text('queue');
20 | $table->longText('payload');
21 | $table->longText('exception');
22 | $table->timestamp('failed_at')->useCurrent();
23 | });
24 | }
25 |
26 | /**
27 | * Reverse the migrations.
28 | *
29 | * @return void
30 | */
31 | public function down()
32 | {
33 | Schema::dropIfExists('failed_jobs');
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/example/database/seeds/DatabaseSeeder.php:
--------------------------------------------------------------------------------
1 | call(UserSeeder::class);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/example/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "private": true,
3 | "scripts": {
4 | "dev": "npm run development",
5 | "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
6 | "watch": "npm run development -- --watch",
7 | "watch-poll": "npm run watch -- --watch-poll",
8 | "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --disable-host-check --config=node_modules/laravel-mix/setup/webpack.config.js",
9 | "prod": "npm run production",
10 | "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
11 | },
12 | "devDependencies": {
13 | "axios": "^0.19",
14 | "cross-env": "^7.0",
15 | "laravel-mix": "^5.0.1",
16 | "lodash": "^4.17.13",
17 | "resolve-url-loader": "^3.1.0",
18 | "sass": "^1.15.2",
19 | "sass-loader": "^8.0.0"
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/example/phpunit.xml:
--------------------------------------------------------------------------------
1 |
2 |