first commit

This commit is contained in:
mrNikto9 2024-07-13 15:57:07 +05:00
commit 896ecdcfe0
321 changed files with 17306 additions and 0 deletions

13
.babelrc Normal file
View File

@ -0,0 +1,13 @@
{
"presets": ["@babel/preset-env"],
"plugins": [
[
"module-resolver", {
"root": ["."],
"alias": {
"helpers": "./tests/js/helpers"
}
}
]
]
}

12
.editorconfig Normal file
View File

@ -0,0 +1,12 @@
# EditorConfig is awesome: http://EditorConfig.org
# top-most EditorConfig file
root = true
[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 4

48
.env.example Normal file
View File

@ -0,0 +1,48 @@
APP_NAME="October CMS"
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost
APP_LOCALE=en
ACTIVE_THEME=demo
BACKEND_URI=/admin
BACKEND_TURBO_ROUTER=false
CMS_ROUTE_CACHE=false
CMS_ASSET_CACHE=false
CMS_SAFE_MODE=false
LINK_POLICY=detect
DEFAULT_FILE_MASK=775
DEFAULT_FOLDER_MASK=775
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=database
DB_USERNAME=root
DB_PASSWORD=
LOG_CHANNEL=single
BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_MAILER=log
MAIL_HOST=mailpit
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=noreply@octobercms.tld
MAIL_FROM_NAME="${APP_NAME}"
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
* text=auto

30
.gitignore vendored Normal file
View File

@ -0,0 +1,30 @@
# Common
composer.phar
.DS_Store
.idea
.env
.env.*.php
.env.php
auth.json
php_errors.log
nginx-error.log
nginx-access.log
nginx-ssl.access.log
nginx-ssl.error.log
php-errors.log
sftp-config.json
.ftpconfig
.vscode/
selenium.php
composer.lock
package-lock.json
/node_modules
_ide_helper.php
.phpunit.result.cache
nbproject
.phpstorm.meta.php
# Project
/bootstrap/compiled.php
/vendor
/modules

78
.htaccess Normal file
View File

@ -0,0 +1,78 @@
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
##
## You may need to uncomment the following line for some hosting environments,
## if you have installed to a subdirectory, enter the name here also.
##
# RewriteBase /
##
## Uncomment following lines to force HTTPS.
##
# RewriteCond %{HTTPS} off
# RewriteRule (.*) https://%{SERVER_NAME}/$1 [L,R=301]
##
## Uncomment to redirect trailing slashes in URLs.
##
# RewriteCond %{REQUEST_FILENAME} !-d
# RewriteRule ^(.*)/$ /$1 [L,R=301]
##
## Uncomment to redirect /index.php/path to /path
##
# RewriteRule ^index\.php/(.*)$ /$1 [L,R=301]
##
## Handle Authorization Header
##
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
##
## Blocked folders
##
RewriteRule ^bootstrap/.* index.php [L,NC]
RewriteRule ^config/.* index.php [L,NC]
RewriteRule ^vendor/.* index.php [L,NC]
RewriteRule ^storage/cms/.* index.php [L,NC]
RewriteRule ^storage/logs/.* index.php [L,NC]
RewriteRule ^storage/framework/.* index.php [L,NC]
RewriteRule ^storage/temp/protected/.* index.php [L,NC]
RewriteRule ^storage/app/uploads/protected/.* index.php [L,NC]
##
## Allowed folders
##
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} !/.well-known/*
RewriteCond %{REQUEST_FILENAME} !/app/(assets|resources)/.*
RewriteCond %{REQUEST_FILENAME} !/storage/app/media/.*
RewriteCond %{REQUEST_FILENAME} !/storage/app/resources/.*
RewriteCond %{REQUEST_FILENAME} !/storage/app/uploads/public/.*
RewriteCond %{REQUEST_FILENAME} !/storage/temp/public/.*
RewriteCond %{REQUEST_FILENAME} !/themes/.*/(assets|resources)/.*
RewriteCond %{REQUEST_FILENAME} !/plugins/.*/(assets|resources)/.*
RewriteCond %{REQUEST_FILENAME} !/modules/.*/(assets|resources)/.*
RewriteRule !^index.php index.php [L,NC]
##
## Block all PHP files, except index
##
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} \.php$
RewriteRule !^index.php index.php [L,NC]
##
## Standard routes
##
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>

5
.jshintrc Normal file
View File

@ -0,0 +1,5 @@
{
"esversion": 6,
"curly": true,
"asi": true
}

1
CHANGELOG.md Normal file
View File

@ -0,0 +1 @@
View the changelog on the [October CMS website](https://octobercms.com/changelog)

305
LICENSE.md Normal file
View File

@ -0,0 +1,305 @@
Copyright (c) 2013-2022 Responsiv Pty Ltd
This End User License Agreement (“EULA”) constitutes a binding agreement between you (the “Licensee”, “you” or “your”) and Responsiv Pty Ltd - ACN 159 492 823 (the “Company”, “we”, “us” or “our”) with respect to your use of the October CMS software (“Licensed Software” or “October CMS Software”). The Company and the Licensee are each individually referred to as “Party” and collectively as “Parties”.
Please carefully read the terms and conditions of this EULA before installing and using the Licensed Software. By using the Licensed Software, you represent that you have read this EULA, and you agree to be bound by all the terms and conditions of this EULA, including any other agreements and policies referenced in this EULA. If you do not agree with any provisions of this EULA, please do not install the October CMS Software.
The Company reserves the right to modify or discontinue the October CMS Software or any portion thereof, temporarily or permanently, with or without notice to you. The Company will not be under any obligation to support or update the Licensed Software, except as described in this EULA.
YOU AGREE THAT THE COMPANY SHALL NOT BE LIABLE TO YOU OR ANY THIRD PARTY IN THE EVENT THAT WE EXERCISE OUR RIGHT TO MODIFY OR DISCONTINUE THE LICENSED SOFTWARE OR ANY PORTION THEREOF.
## Summary
This section outlines some of the key provisions covered in this EULA. Please note that this summary is provided for your convenience only, and it does not relieve you of your obligation to read the full EULA before installing/using the October CMS Software.
By proceeding to use the October CMS Software, you understand and agree that:
- You must be at least 18 years of age to enter into this EULA;
- You will only use the October CMS Software in compliance with applicable laws;
- October CMS Software licenses are only issued for Projects created through the website. To acquire/renew your Project licence, you need to sign in to your October CMS Account, and select/create the Project for which you wish to acquire/renew the licence;
- You will be responsible for paying the full License Fee prior to installing the October CMS Software;
- All License Fee Payments are non-refundable;
- Upon full payment of the License Fee, you will receive a License Key that allows you to install the Licensed Software to create a single production or non-production website and ancillary installations needed to support that single production or non-production website;
- Each new/renewed Project licence comes with one year of Updates. You may continue to use your expired Project license in perpetuity, but if you wish to continue receiving all the Updates, you will be required to keep your Project licence active by renewing it every year;
- Subject to the payment of full License Fee and compliance with this EULA, the Company and its third party licensors grant you a limited, non-exclusive, non-transferable, non-assignable, perpetual and worldwide license to install and/or use the October CMS Software;
- The Company and its licensors retain all rights, title and interest in the October CMS Software, Documentation and other similar proprietary materials made available to you;
- You will not sublicense, resell, distribute, or transfer the Licensed Software to any third party without the Companys prior written consent;
- You will not remove, obscure or otherwise modify any copyright notices from the October CMS Software files or this EULA;
- You will not modify, disassemble, or reverse engineer any part of the October CMS Software;
- You will take all required steps to prevent unauthorised installation/use of the October CMS Software and prevent any breach of this EULA;
- The Company may terminate this EULA if you are in breach of any provision of this EULA or if we discontinue the October CMS Software;
- SUBJECT TO YOUR STATUTORY RIGHTS, THE COMPANY PROVIDES THE OCTOBER CMS SOFTWARE TO YOU “AS IS” AND “WITH ALL FAULTS”. THE COMPANY DOES NOT OFFER ANY WARRANTIES, WHETHER EXPRESS OR IMPLIED. IN NO EVENT WILL THE COMPANYS AGGREGATE LIABILITY TO YOU FOR ANY CLAIMS CONNECTED WITH THIS EULA OR THE OCTOBER CMS SOFTWARE EXCEED THE AMOUNT ACTUALLY PAID BY YOU TO THE COMPANY FOR THE OCTOBER CMS SOFTWARE IN THE TWELVE MONTHS PRECEDING THE DATE WHEN THE CLAIM FIRST AROSE;
- This EULA shall be governed by and construed in accordance with the laws of the state of New South Wales, Australia, without giving effect to any principles of conflict of laws.
## Table of Contents
- [1. Definitions](#Definitions)
- [2. Authorisation](#Authorisation)
- [3. License Grant](#License-Grant)
- [4. License Purchase and Renewal](#License-Purchase-and-Renewal)
- [5. License Fees, Payments and Refunds](#License-Fees-Payments-and-Refunds)
- [6. Ownership](#Ownership)
- [7. Use and Restrictions](#Use-and-Restrictions)
- [8. Technical Support](#Technical-Support)
- [9. Termination](#Termination)
- [10. Statutory Consumer Rights](#Statutory-Consumer-Rights)
- [11. Disclaimer of Warranties](#Disclaimer-of-Warranties)
- [12. Limitation of Liability](#Limitation-of-Liability)
- [13. Waiver](#Waiver)
- [14. Indemnification](#Indemnification)
- [15. Compliance with the Laws](#Compliance-with-the-Laws)
- [16. Data Protection](#Data-Protection)
- [17. Delivery](#Delivery)
- [18. General](#General)
<a name="Definitions"></a>
## 1. Definitions
The following words shall have the meaning given hereunder whenever they appear in this EULA:
Term | Definition
---- | -----------
Account | refers to a user account registered on the Website by an individual or entity.
Active Term | means the period commencing from the date of License purchase/renewal until the License expiry date as specified on the Project page in your Account.
Documentation | means the current version of the documentation relating to the October CMS Software available at https://docs.octobercms.com or otherwise made available by the Company in electronic format. Documentation includes but is not limited to installation instructions, user guides and help documents regarding the use of the October CMS Software.
License Fee | means the fee payable by the Licensee for the use of the October CMS Software in accordance with the provisions of this EULA and any other applicable agreements referenced in this EULA.
License Key | means a unique string of characters provided by the Company that enables users to install the October CMS Software for a specific Project.
Modifications | means any changes to the original code or files of the October CMS Software by the Licensee or any third party. For the avoidance of any doubt, the term “Modifications” does not include any Updates furnished by the Company.
October CMS Software | refers to the collection of proprietary code and graphics in various file formats provided by the Company to the Licensee.
Project | means a collection of extensions and themes to be used in a single production website.
Updates | means all new releases of the October CMS Software, including but not limited to new features and fixes which are provided by the Company to a Licensee during the Active Term of the License.
The Website | refers to the Company website located at www.octobercms.com.
<a name="Authorisation"></a>
## 2. Authorisation
You must be at least 18 years of age and have the legal capacity to enter into this EULA. If you are accepting this EULA on behalf of a corporation, organisation, or other legal entity (corporate entity), you warrant that you have the authority to enter into this EULA on behalf of such corporate entity and to bind the former to this EULA.
<a name="License-Grant"></a>
## 3. License Grant
Subject to your compliance with all the terms and conditions of this EULA and the payment of the full License Fee, the Company and its third party licensors grant you a limited, non-exclusive, non-transferable, non-assignable, perpetual and worldwide license to install and/or use the October CMS Software.
You shall be solely responsible for ensuring that all your authorised employees, contractors or other users of the Licensed Software comply with all the terms and conditions of this EULA, and any failure to comply with this EULA will be deemed as a breach of this EULA by you.
The Company and its third party licensors may make changes to the Licensed Software, which are provided to you through Updates. You will only receive all such Updates during the Active Term of your license. You will not have any right to receive Updates after the expiration of your license. Please note that if you terminate your Account, you will not be able to access your Projects and renew your license/receive any future Updates.
UNLESS EXPRESSLY PROVIDED IN THIS EULA, YOU MAY NOT COPY OR MODIFY THE OCTOBER CMS SOFTWARE.
<a name="License-Purchase-and-Renewal"></a>
## 4. License Purchase and Renewal
October CMS Software licenses are only issued for Projects created through the Website. To acquire a new Project licence or to renew an existing Project licence, you must sign in to your October CMS Account and select/create the Project for which you wish to acquire/renew the licence.
Upon full payment of the License Fee, you will receive a License Key that allows you to install the Licensed Software to create a single production or non-production website and ancillary installations needed to support that single production or non-production website.
Each new/renewed Project licence comes with one year of Updates starting from the date on which you pay the License Fee. You are not under any legal obligation to renew your Project licence, and you can continue to use your expired Project license for your website in perpetuity. Please note that expired Project licenses do not receive any Updates. If you wish to continue receiving all the Updates, you will be required to keep your Project licence active by renewing it every year.
By installing and using the October CMS Software, you assume full responsibility for your selection of the Licensed Software, its installation, and the results obtained from the use of the October CMS Software.
<a name="License-Fees-Payments-and-Refunds"></a>
## 5. License Fees, Payments and Refunds
The current License Fee for the October CMS Software is published on the Website, and the amount is specified in United States Dollars (USD). The License fee as specified on the Website does not include any taxes which shall be payable by the Licensee in addition to the License Fee.
The License fee becomes due and payable in full at the time the Licensee purchases a new Project license or renews an existing Project license.
All Project licenses are issued/renewed subject to the payment of the License Fee by the Licensee as outlined in Section 7 of our [Website Terms of Use](https://octobercms.com/help/terms/website#fees-payments-refunds-policy) and incorporated into this EULA by reference. The Company reserves the right to refuse issuance of a new Project license or renewal of an existing license until the Company receives the full payment.
To the extent permitted by law, all License Fee payments are non-refundable.
<a name="Ownership"></a>
## 6. Ownership
Nothing in this EULA constitutes the sale of October CMS Software to you. The Company and its licensors retain all rights, title and interest in the October CMS Software, Documentation and other similar proprietary materials made available to you (collectively “Proprietary Material”). All Proprietary Material is protected by copyright and other intellectual property laws of Australia and international conventions. You acknowledge that the October CMS Software may contain some open source software that is not owned by the Company and which shall be governed by its own license terms.
Except where authorised by the Company in writing, any use of the October CMS trademark, trade name, or logo is strictly prohibited. The Company reserves all rights that are not expressly granted in and to the Proprietary Material.
<a name="Use-and-Restrictions"></a>
## 7. Use and Restrictions
You hereby agree that:
1. A License Key may only be used to create a single production or non-production website as provided in Section 4 (License Purchase and Renewal) of this EULA. If you wish to create another website, you will need to create a new Project and acquire a new License for that Project;
2. Unless expressly provided otherwise in this EULA or other applicable agreements referenced herein, you will not sublicense, resell, distribute, or transfer the Licensed Software to any third party without the Companys prior written consent;
3. You will not remove, obscure or otherwise modify any copyright notices from the October CMS Software files or this EULA;
4. You will not modify, disassemble, or reverse engineer any part of the October CMS Software;
5. You will take all required steps to prevent unauthorised installation/use of the October CMS Software and prevent any breach of this EULA;
6. You do not receive any rights, interests or titles in the “October CMS” trademark, trade name or service mark (“Marks”), and you will not use any of these Marks without our express consent.
<a name="Technical-Support"></a>
## 8. Technical Support
The Company does not offer any technical support except as described in our Premium Support Policy. The Company reserves the right to deny any and all technical support for any Modifications of the October CMS Software or in the event of any breach of this EULA.
<a name="Termination"></a>
## 9. Termination
This EULA shall remain effective until terminated by either Party as described below.
### 9.1 Termination by Licensee
You may terminate this EULA by uninstalling the October CMS Software and deleting all files and your Account. Please note that once you delete your Account, you will not be able to reactivate it to restore your Projects and access your License Key.
### 9.2 Termination by the Company
The Company may terminate this EULA if you are in breach of any provision of this EULA or if we discontinue the October CMS Software.
### 9.3 Survival
Section 11 (Disclaimer of Warranties), Section 12 (Limitation of Liability), Section 13 (Waiver), Section 14 (Indemnification) and other sections of this EULA that by their nature are intended to survive the termination of this EULA shall survive.
Unless expressly specified otherwise in this EULA, any termination of this EULA either by you or the Company does not create any obligation on the Company to issue a full or partial refund of the License Fee paid by you.
<a name="Statutory-Consumer-Rights"></a>
## 10. Statutory Consumer Rights
### 10.1 CONSUMERS IN AUSTRALIA
If you acquire the October CMS Software license as a “consumer”, nothing in this EULA will exclude, limit or modify any rights and guarantees conferred on you by legislation, including the Australian Consumer Law (ACL) in the Competition and Consumer Act 2010 (Cth) (Statutory Rights). If the Company is in breach of any such Statutory Rights, then the Companys liability shall be limited (at the Companys option) to:
10.1.1 In case of products supplied to you, to resupplying, replacing or paying the cost of resupplying or replacing the product in respect of which the breach occurred;
10.1.2 In case of services supplied to you, to resupply the service or to pay the cost of resupplying the service in respect of which the breach occurred.
Unless expressly specified otherwise in this EULA, you agree that the Companys liability for the October CMS Software is governed solely by this EULA and the Australian Consumer Law.
### 10.1 CONSUMERS OUTSIDE OF AUSTRALIA
If you are deemed a “consumer” by statutory law in your country of residence, you may enjoy some legal rights under your local law which prohibit the exclusions, modification or limitations of certain liabilities from applying to you, and where such prohibition exists in your country of residence, any such limitations or exclusions will only apply to you to the extent it is permitted by your local law.
You agree that apart from the application of your statutory consumer rights, the Companys liability for the October CMS Software is governed solely by this EULA.
<a name="Disclaimer-of-Warranties"></a>
## 11. Disclaimer of Warranties
SUBJECT TO YOUR STATUTORY RIGHTS AS PROVIDED IN SECTION 10 ABOVE, THE COMPANY PROVIDES THE OCTOBER CMS SOFTWARE TO YOU “AS IS” AND “WITH ALL FAULTS”.
EXCLUDING ANY EXPRESS WARRANTIES OFFERED IN THIS EULA, TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE COMPANY, ITS EMPLOYEES, DIRECTORS, CONTRACTORS, AFFILIATES (“THE COMPANY AND ITS OFFICERS”) DISCLAIM ANY EXPRESS OR IMPLIED WARRANTIES WITH RESPECT TO THE OCTOBER CMS SOFTWARE, INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, RELIABILITY, COURSE OF PERFORMANCE OR USAGE IN TRADE. THE COMPANY DOES NOT WARRANT THAT THE OCTOBER CMS SOFTWARE: WILL MEET YOUR REQUIREMENTS; WILL BE UNINTERRUPTED, ERROR-FREE, OR SECURE; OR THAT THE COMPANY WILL BE ABLE TO RECTIFY ANY ERRORS, BUGS, SECURITY VULNERABILITIES. NO OBLIGATION, WARRANTIES OR LIABILITY SHALL ARISE OUT OF ANY TECHNICAL SUPPORT SERVICES PROVIDED BY THE COMPANY AND ITS OFFICERS IN CONNECTION WITH THE OCTOBER CMS SOFTWARE. NO VERBAL OR WRITTEN COMMUNICATION RECEIVED FROM THE COMPANY AND ITS OFFICERS, WHETHER MARKETING, PROMOTIONAL OR TECHNICAL SUPPORT, SHALL CREATE ANY WARRANTIES THAT ARE NOT EXPRESSLY PROVIDED IN THIS EULA.
ALTHOUGH THE COMPANY PERIODICALLY RELEASES UPDATES FOR THE OCTOBER CMS SOFTWARE THAT MAY INCLUDE FIXES FOR KNOWN VULNERABILITIES, YOU ACKNOWLEDGE AND AGREE THAT THERE MAY BE VULNERABILITIES THAT THE COMPANY HAS NOT YET IDENTIFIED AND THEREFORE CANNOT ADDRESS. YOU ACKNOWLEDGE AND AGREE THAT YOU ARE SOLELY RESPONSIBLE FOR TAKING ALL THE PRECAUTIONS AND SAFEGUARDS NECESSARY TO PROTECT YOUR WEBSITE AND DATA FROM ANY EXTERNAL ATTACKS, INCLUDING BUT NOT LIMITED TO KEEPING YOUR OCTOBER CMS SOFTWARE INSTALLATION CURRENT AND UP TO DATE.
SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO THE ABOVE EXCLUSION MAY NOT APPLY TO YOU.
<a name="Limitation-of-Liability"></a>
## 12. Limitation of Liability
IN NO EVENT SHALL THE COMPANY BE LIABLE TO YOU OR ANY THIRD-PARTY FOR ANY LOSS OF REVENUE, LOSS OF PROFITS (ACTUAL OR ANTICIPATED), LOSS OF SAVINGS (ACTUAL OR ANTICIPATED), LOSS OF OPPORTUNITY, LOSS OF REPUTATION, LOSS OF GOODWILL OR FOR ANY INDIRECT, INCIDENTAL, CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES RESULTING FROM THE INSTALLATION, USE OR INABILITY TO USE THE OCTOBER CMS SOFTWARE, WHETHER ARISING FROM ANY BREACH OF CONTRACT, NEGLIGENCE OR ANY OTHER THEORY OF LIABILITY, EVEN IF THE COMPANY WAS PREVIOUSLY ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. THE LICENSEE SHALL BE SOLELY RESPONSIBLE FOR DETERMINING THE SUITABILITY OF THE LICENSED SOFTWARE AND ALL RISKS ASSOCIATED WITH ITS USE.
IN NO EVENT WILL THE COMPANYS AGGREGATE LIABILITY TO YOU FOR ANY CLAIMS CONNECTED WITH THIS EULA OR THE OCTOBER CMS SOFTWARE, INCLUDING THOSE ARISING FROM ANY BREACH OF CONTRACT OR NEGLIGENCE, EXCEED THE AMOUNT ACTUALLY PAID BY YOU TO THE COMPANY FOR THE OCTOBER CMS SOFTWARE IN THE TWELVE MONTHS PRECEDING THE DATE WHEN THE CLAIM FIRST AROSE.
NOTWITHSTANDING ANYTHING TO THE FOREGOING, NOTHING IN THIS PROVISION SHALL LIMIT EITHER PARTYS LIABILITY FOR ANY FRAUD OR LIABILITY THAT CANNOT BE LIMITED BY LAW.
<a name="Waiver"></a>
## 13. Waiver
YOU HEREBY RELEASE THE COMPANY AND ITS OFFICERS FROM ALL UNKNOWN RISKS ARISING OUT OF OR ASSOCIATED WITH THE USE OF THE OCTOBER CMS SOFTWARE. IF YOU ARE A RESIDENT IN THE STATE OF CALIFORNIA, U.S.A., YOU EXPRESSLY WAIVE CALIFORNIA CIVIL CODE SECTION 1542, OR OTHER SIMILAR LAW APPLICABLE TO YOU, WHICH STATES: “A GENERAL RELEASE DOES NOT EXTEND TO CLAIMS WHICH THE CREDITOR DOES NOT KNOW OR SUSPECT TO EXIST IN HIS OR HER FAVOR AT THE TIME OF EXECUTING THE RELEASE, WHICH IF KNOWN BY HIM OR HER MUST HAVE MATERIALLY AFFECTED HIS OR HER SETTLEMENT WITH THE DEBTOR OR RELEASED PARTY. ”
**YOU ACKNOWLEDGE AND AGREE THAT THE LIMITATION OF LIABILITY AND THE WAIVER SET FORTH ABOVE REFLECT A REASONABLE AND FAIR ALLOCATION OF RISK BETWEEN YOU AND THE COMPANY AND THAT THESE PROVISIONS FORM AN ESSENTIAL BASIS OF THE BARGAIN BETWEEN YOU AND THE COMPANY. THE COMPANY WOULD NOT BE ABLE TO PROVIDE THE OCTOBER CMS SOFTWARE TO YOU ON AN ECONOMICALLY REASONABLE BASIS WITHOUT THESE LIMITATIONS.**
<a name="Indemnification"></a>
## 14. Indemnification
14.1 The Company will defend or settle any claims against you that allege that the October CMS Software as supplied to you for installation and use in accordance with this EULA and Documentation infringes the intellectual property rights of a third party provided that:
14.1.1 You immediately notify the Company of any such claim that relates to this indemnity;
14.1.2 The Company has the sole right to control the defence or settlement of such claim; and
14.1.3 You provide the Company with all reasonable assistance in relation to the defence.
14.2 For any claims of infringement of intellectual property mentioned in Section 14.1, the Company reserves the right to:
14.2.1 Modify or replace the Licensed Software to make it non-infringing provided such modification or replacement does not substantively change the functionality of the Licensed Software; or
14.2.2 Acquire at its own expense the right for you to continue the use of the Licensed Software; or
14.2.3 Terminate the Project license and direct you to cease the use of the Licensed Software. In such cases, the Company will provide you with a full refund of the License Fees paid by you for the Licensed Software in the preceding 12 months. Please note that where the Company directs you to cease the use of the October CMS Software due to a third party claim of infringement, you are under a legal obligation to immediately cease such use.
Unless otherwise provided by law, this Section 14 sets out your exclusive remedies for any infringement of intellectual property claims made by a third party against you and nothing in this EULA will create any obligations on the Company to offer greater indemnity. The Company does not have any obligation to defend or indemnify any other third party.
14.3 The Company shall not have any obligation to indemnify you if:
14.3.1 The infringement arises out of any Modification of the October CMS Software;
14.3.2 The infringement arises from any combination, operation, or use of the Licensed Software with any other third party software;
14.3.3 The infringement arises from the use of the Licensed Software in breach of this EULA;
14.3.4 The infringement arises from the use of the Licensed Software after the Company has informed you to cease the use of the Licensed Software due to possible claims.
14.4 You will indemnify the Company against any third party claims, damages, losses and costs, including reasonable attorney fees arising from:
14.4.1 Your actions or omissions (actual or alleged), including without limitation, claims that your actions or omission infringe any third partys intellectual property rights; or
14.4.2 Your violation of any applicable laws; or
14.4.3 Your breach of this EULA.
<a name="Compliance-with-the-Laws"></a>
## 15. Compliance with the Laws
You will only install/use the October CMS Software and fulfil all your obligations under this EULA in compliance with all applicable laws. You hereby confirm that neither you nor the corporate entity that you represent is subject or target of any government Sanctions, and your use of the October CMS Software would not result in violation of any Sanctions by the Company.
You further confirm that the Licensed Software will not be used by any individual or entity engaged in any of the following activities: (i) Terrorist activities; (ii) design, development or production of any weapons of mass destruction; or (iii) any other illegal activity.
<a name="Data-Protection"></a>
## 16. Data Protection
The Company only collects minimal personal data from the Licensee, as described in our Privacy Policy. The Company does not process any data on behalf of the Licensee, and the Licensee shall be solely responsible for compliance with applicable data protection laws for any data it controls or processes.
<a name="Delivery"></a>
## 17. Delivery
The Company will deliver the October CMS Software and this EULA to you by electronic download.
<a name="General"></a>
## 18. General
### 18.1 Amendments
The Company reserves the right to amend the terms and conditions of this EULA at any time and without giving any prior notice to you. You acknowledge that you are responsible for periodically reviewing this EULA to familiarise yourself with any changes. Your continued use of the October CMS Software after any changes to the EULA shall constitute your consent to such change. You can access the latest version of the EULA by visiting https://octobercms.com/eula
### 18.2 Assignment
You may not assign any rights and obligations under this EULA, in whole or in part, without an authorised Company representative's written consent. Any attempt to assign any rights and obligations without the Company's consent shall be void. The Company reserves the right to assign any of its rights and obligations under this EULA to a third party without requiring your consent.
### 18.3 Notices
You hereby consent to receive all notices and communication from the Company electronically.
All notices to the Company under this EULA shall be sent to:
PO Box 47<br />
Queanbeyan NSW 2620<br />
Australia
For any other questions relating to this EULA, please contact us at https://octobercms.com/contact
### 18.4 Governing Law and Jurisdiction
This EULA shall be governed by and construed in accordance with the laws of the state of New South Wales, Australia, without giving effect to any principles of conflict of laws. The parties hereby agree to submit to the non-exclusive jurisdiction of the courts of New South Wales to decide any matter arising out of these Terms. Both Parties hereby agree that the United Nations Convention on Contracts for the International Sale of Goods will not apply to this EULA.
### 18.5 Force Majeure
Neither Party will be liable to the other for any failure or delay in the performance of its obligations to the extent that such failure or delay is caused by any unforeseen events which are beyond the reasonable control of the obligated Party such as an act of God, strike, war, terrorism, epidemic, internet or telecommunication outage or other similar events, and the obligated Party is not able to avoid or remove the force measure by taking reasonable measures.

74
README.md Normal file
View File

@ -0,0 +1,74 @@
<p align="center">
<img src="https://github.com/octobercms/october/blob/develop/themes/demo/assets/images/favicon.png?raw=true" alt="October" width="25%" height="25%" />
</p>
[October](https://octobercms.com) is a Content Management System (CMS) and web platform whose sole purpose is to make your development workflow simple again. It was born out of frustration with existing systems. We feel building websites has become a convoluted and confusing process that leaves developers unsatisfied. We want to turn you around to the simpler side and get back to basics.
October's mission is to show the world that web development is not rocket science.
[![Build Status](https://github.com/octobercms/library/actions/workflows/tests.yml/badge.svg)](https://octobercms.com/)
[![Downloads](https://img.shields.io/packagist/dt/october/rain)](https://docs.octobercms.com/)
[![Version](https://img.shields.io/packagist/v/october/october)](https://octobercms.com/changelog)
[![License](https://poser.pugx.org/october/october/license.svg)](./LICENSE.md)
> *Please note*: October is open source but it is not free software. A license with a small fee is required for each website you build with October CMS.
## Installing October
Instructions on how to install October can be found at the [installation guide](https://docs.octobercms.com/3.x/setup/installation.html).
### Quick Start Installation
If you have composer installed, run this in your terminal to install October CMS from command line. This will place the files in a directory named **myoctober**.
composer create-project october/october myoctober
If you plan on using a database, run this command inside the application directory.
php artisan october:install
## Learning October
The best place to learn October CMS is by [reading the documentation](https://docs.octobercms.com) or [following some tutorials](https://octobercms.com/support/articles/tutorials).
You may also watch this [introductory video](https://www.youtube.com/watch?v=yLZTOeOS7wI). Make sure to check out our [official YouTube channel](https://www.youtube.com/c/OctoberCMSOfficial). There is also the excellent video series by [Watch & Learn](https://watch-learn.com/series/making-websites-with-october-cms).
For code examples of building with October CMS, visit the [RainLab Plugin Suite](https://github.com/rainlab) or the [October Demos Repo](https://github.com/octoberdemos).
## Coding Standards
Please follow the following guides and code standards:
* [PSR 4 Coding Standards](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-4-autoloader.md)
* [PSR 2 Coding Style Guide](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)
* [PSR 1 Coding Standards](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md)
## Security Vulnerabilities
Please review [our security policy](https://github.com/octobercms/october/security/policy) on how to report security vulnerabilities.
## Development Team
October CMS was created by [Alexey Bobkov](https://www.linkedin.com/in/alexey-bobkov-232ba02b/) and [Samuel Georges](https://www.linkedin.com/in/samuel-georges-0a964131/), who both continue to develop the platform.
## Foundation library
The CMS uses [Laravel](https://laravel.com) as a foundation PHP framework.
## Contact
For announcements and updates:
* [Contact Us Page](http://octoberdev.test/contact)
* [Follow us on Twitter](https://twitter.com/octobercms)
* [Like us on Facebook](https://facebook.com/octobercms)
To chat or hang out:
* [Join us on Slack](https://octobercms.slack.com)
* [Join us on Discord](https://discord.gg/gEKgwSZ)
* [Join us on Telegram](https://t.me/octoberchat)
## License
The October CMS platform is licensed software, see [End User License Agreement](./LICENSE.md) (EULA) for more details.

29
app/Provider.php Normal file
View File

@ -0,0 +1,29 @@
<?php namespace App;
use System\Classes\AppBase;
/**
* Provider is an application level plugin, all registration methods are supported.
*/
class Provider extends AppBase
{
/**
* register method, called when the app is first registered.
*
* @return void
*/
public function register()
{
parent::register();
}
/**
* boot method, called right before the request route.
*
* @return void
*/
public function boot()
{
parent::boot();
}
}

0
app/blueprints/.gitkeep Normal file
View File

View File

@ -0,0 +1,34 @@
uuid: 6947ff28-b660-47d7-9240-24ca6d58aeae
handle: Blog\Author
type: entry
name: Author
drafts: false
customMessages:
buttonCreate: New Author
navigation:
label: Authors
parent: Blog\Post
icon: octo-icon-user
order: 200
fields:
avatar:
label: Avatar
type: mediafinder
mode: image
role:
label: Role
type: text
about:
label: About
type: textarea
_social_links:
type: mixin
label: Social Links
source: Fields\SocialLinks
tab: Social

View File

@ -0,0 +1,21 @@
uuid: b022a74b-15e6-4c6b-9eb9-17efc5103543
type: structure
handle: Blog\Category
name: Category
drafts: false
customMessages:
buttonCreate: New Category
structure:
maxDepth: 1
navigation:
label: Categories
parent: Blog\Post
icon: octo-icon-list-ul
order: 150
fields:
description:
label: Description

View File

@ -0,0 +1,36 @@
uuid: 3328c303-7989-462e-b866-27e7037ba275
handle: Blog\Config
type: global
name: Blog Settings
customMessages:
titleUpdateForm: Update Blog Settings
navigation:
label: Settings
parent: Blog\Post
icon: octo-icon-cog
order: 200
fields:
blog_name:
label: Blog Name
tab: General
placeholder: Latest News
about_this_blog:
label: About This Blog
comment: Customize this section to tell your visitors a little bit about your publication, writers, content, or something else entirely. Totally up to you.
type: textarea
size: small
tab: General
_section1:
label: Social Links
type: section
tab: General
_social_links:
type: mixin
source: Fields\SocialLinks
tab: General

View File

@ -0,0 +1,46 @@
uuid: edcd102e-0525-4e4d-b07e-633ae6c18db6
handle: Blog\Post
type: stream
name: Post
drafts: true
customMessages:
buttonCreate: New Post
primaryNavigation:
label: Blog
icon: octo-icon-file
iconSvg: modules/tailor/assets/images/blog-icon.svg
order: 95
navigation:
label: Posts
icon: octo-icon-pencil
order: 100
groups:
regular_post:
name: Regular Post
fields:
content:
tab: Edit
label: Content
type: richeditor
span: adaptive
_blog_post_content:
type: mixin
source: Fields\BlogContent
markdown_post:
name: Markdown Post
fields:
content:
tab: Edit
label: Content
type: markdown
span: adaptive
_blog_post_content:
type: mixin
source: Fields\BlogContent

View File

@ -0,0 +1,57 @@
uuid: 7b193500-ac0b-481f-a79c-2a362646364d
handle: Fields\Blocks
type: mixin
name: Page Blocks
fields:
blocks:
label: Blocks
type: repeater
displayMode: builder
span: adaptive
tab: Blocks
groups:
image_slice:
name: Image Slice
description: A large image with an angled slice.
icon: octo-icon-picture
fields:
_mixin:
type: mixin
source: Blocks\ImageSlice
paragraph_block:
name: Paragraph Block
description: Simple paragraph with image
icon: octo-icon-text-h1
fields:
_mixin:
type: mixin
source: Blocks\ParagraphBlock
detailed_block:
name: Detailed Block
description: Detailed paragraph with image and list
icon: octo-icon-diamond
fields:
_mixin:
type: mixin
source: Blocks\DetailedBlock
scoreboard_metrics:
name: Scoreboard Metrics
description: Show some impressive metrics about the business.
icon: icon-quote-right
fields:
_mixin:
type: mixin
source: Blocks\ScoreboardMetrics
team_leaders:
name: Team Leaders
description: Display the team members.
icon: octo-icon-comment
fields:
_mixin:
type: mixin
source: Blocks\TeamLeaders

View File

@ -0,0 +1,47 @@
uuid: 4d7fd1e4-85f2-48f5-947e-92819fc8664b
handle: Fields\BlogContent
type: mixin
name: Blog Post Content
fields:
banner:
tab: Manage
label: Banner
type: fileupload
mode: image
maxFiles: 1
author:
tab: Manage
label: Author
commentAbove: 'Select the author for this blog post'
type: entries
maxItems: 1
source: Blog\Author
categories:
tab: Manage
label: Categories
commentAbove: 'Select categories the blog post belongs to'
type: entries
source: Blog\Category
featured_text:
tab: Featured
label: Featured Text
type: textarea
size: small
gallery:
label: Gallery
type: fileupload
mode: image
span: adaptive
tab: Gallery
gallery_media:
label: Media
type: mediafinder
mode: image
span: adaptive
tab: Media

View File

@ -0,0 +1,89 @@
uuid: 936f26c0-b816-4c78-afaa-0b6977e80213
handle: Fields\MenuItem
type: mixin
name: Menu Item
fields:
is_hidden:
label: Hidden
comment: Hide this menu item from appearing on the website.
type: checkbox
tab: Display
code:
label: Code
comment: Enter the menu item code if you want to access it with the API.
tab: Attributes
span: auto
type: text
preset:
field: title
type: slug
css_class:
label: CSS Class
comment: Enter a CSS class name to give this menu item a custom appearance.
tab: Attributes
span: auto
type: text
is_external:
label: External Link
comment: Open links for this menu item in a new window.
tab: Attributes
type: checkbox
priority:
label: Priority
commentAbove: The priority of this URL relative to other URLs on your site.
tab: Sitemap
type: radio
column: false
inlineOptions: true
options:
'0.1': '0.1'
'0.2': '0.2'
'0.3': '0.3'
'0.4': '0.4'
'0.5': '0.5'
'0.6': '0.6'
'0.7': '0.7'
'0.8': '0.8'
'0.9': '0.9'
'1.0': '1.0'
changefreq:
commentAbove: How frequently the page is likely to change.
label: Change Frequency
tab: Sitemap
type: radio
column: false
inlineOptions: true
options:
always: Always
hourly: Hourly
daily: Daily
weekly: Weekly
monthly: Monthly
yearly: Yearly
never: Never
nesting:
label: Include nested items
shortLabel: Nesting
comment: Nested items could be generated dynamically by supported page references.
type: checkbox
tab: Reference
column: false
replace:
label: Replace this item with its generated children
comment: Use this checkbox to push generated menu items to the same level with this item. This item itself will be hidden.
type: checkbox
tab: Reference
column: false
scope: false
trigger:
action: disable|empty
field: nesting
condition: unchecked

View File

@ -0,0 +1,27 @@
uuid: ae2d2c25-3a0e-4765-8b36-d1666fc0e31f
name: Social Links
type: mixin
handle: Fields\SocialLinks
fields:
social_links:
type: repeater
prompt: Add Link
form:
fields:
platform:
span: auto
label: Platform
type: dropdown
options:
facebook: Facebook
linkedin: LinkedIn
dribbble: Dribbble
twitter: Twitter
youtube: YouTube
url:
span: auto
label: Social Link
type: text
placeholder: "https://..."

View File

@ -0,0 +1,39 @@
uuid: da034c4f-0e24-4906-94b9-66b26c0549c9
name: Detailed Block
type: mixin
handle: Blocks\DetailedBlock
fields:
title:
label: Title
type: text
content:
label: Description
type: richeditor
size: small
list_items:
label: List Items
type: datatable
btnAddRowLabel: Add Item
btnDeleteRowLabel: Delete Item
columns:
text:
type: string
title: Text
button_text:
label: Button Text
span: auto
placeholder: Main call to action
button_url:
label: Button URL
span: auto
image:
label: Image
type: mediafinder
mode: image
maxItems: 1

View File

@ -0,0 +1,11 @@
uuid: 21aad99b-d3c6-4f5e-b271-15471c81e11b
name: Image Slice
type: mixin
handle: Blocks\ImageSlice
fields:
image:
label: Image
type: mediafinder
mode: image
maxItems: 1

View File

@ -0,0 +1,20 @@
uuid: 015fde4b-23d8-4ba3-8e78-9c6ebfb5fcf7
name: Paragraph Block
type: mixin
handle: Blocks\ParagraphBlock
fields:
title:
label: Title
type: text
content:
label: Description
type: richeditor
size: small
image:
label: Image
type: mediafinder
mode: image
maxItems: 1

View File

@ -0,0 +1,32 @@
uuid: 55615b16-120f-4be9-9429-6ae6dabc523c
name: Scoreboard Metrics
type: mixin
handle: Blocks\ScoreboardMetrics
fields:
metrics:
label: Metrics
type: repeater
form:
fields:
number:
label: Number
type: number
span: row
spanClass: col-md-3
description:
label: Description
type: text
span: row
spanClass: col-md-9
icon:
label: Icon
type: radio
cssClass: inline-options
options:
notepad: Notepad
shield: Shield
basket: Basket
briefcase: Briefcase

View File

@ -0,0 +1,35 @@
uuid: 8c4041cf-f16d-46f8-86be-9372a266ae6d
name: Team Leaders
type: mixin
handle: Blocks\TeamLeaders
fields:
members:
label: Members
type: repeater
itemsExpanded: false
form:
fields:
title:
label: Title
span: left
role:
label: Role
span: right
description:
label: Description
type: textarea
size: tiny
avatar:
label: Image
type: mediafinder
mode: image
maxItems: 1
_social_links:
label: Social Links
type: mixin
source: Fields\SocialLinks

View File

@ -0,0 +1,14 @@
uuid: a63fabaf-7c0b-4c74-b36f-7abf1a3ad1c1
handle: Page\About
type: single
name: About Page
drafts: true
navigation:
icon: icon-rocket
order: 200
fields:
block_builder:
type: mixin
source: Fields\Blocks

View File

@ -0,0 +1,58 @@
uuid: 339b11b7-69ad-43c4-9be1-6953e7738827
handle: Page\Article
type: structure
name: Article
drafts: true
customMessages:
buttonCreate: New Article
structure:
maxDepth: 3
navigation:
label: All Articles
icon: icon-wikipedia-w
order: 100
fields:
content:
label: Content
tab: Edit
type: richeditor
span: adaptive
banner:
label: Banner
type: fileupload
mode: image
maxFiles: 1
show_in_toc:
label: Show in TOC
comment: Include this article in the table of contents
type: checkbox
summary_text:
label: Summary Text
type: textarea
size: small
gallery:
label: Gallery
type: fileupload
mode: image
external_links:
label: External Links
tab: Links
type: repeater
form:
fields:
link_text:
label: Link Text
span: auto
link_url:
label: Link URL
span: auto

View File

@ -0,0 +1,52 @@
uuid: 85e471d2-09b9-4f3d-a63b-1ae9d92d2879
handle: Site\Menus
type: entry
name: Menu
drafts: false
pagefinder: false
customMessages:
buttonCreate: New Menu
navigation:
label: Menus
icon: icon-sitemap
order: 300
fields:
slug:
label: Code
column:
label: Code
invisible: false
validation:
- required
items:
label: Menu Item
type: nesteditems
span: adaptive
maxDepth: 0
customMessages:
buttonCreate: Add Item
titleCreateForm: Create Item
titleUpdateForm: Edit Item
form:
fields:
title:
label: Title
tab: Reference
default: New Menu Item
span: full
type: text
validation:
- required
reference:
label: Reference
type: pagefinder
tab: Reference
tabs:
fields:
_menu_item:
type: mixin
source: Fields\MenuItem

51
artisan Normal file
View File

@ -0,0 +1,51 @@
#!/usr/bin/env php
<?php
/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader
| for our application. We just need to utilize it! We'll require it
| into the script here so that we do not have to worry about the
| loading of any our classes "manually". Feels great to relax.
|
*/
require __DIR__.'/bootstrap/autoload.php';
$app = require_once __DIR__.'/bootstrap/app.php';
/*
|--------------------------------------------------------------------------
| Run The Artisan Application
|--------------------------------------------------------------------------
|
| When we run the console application, the current CLI command will be
| executed in this console and the response sent back to a terminal
| or another output device for the developers. Here goes nothing!
|
*/
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
$status = $kernel->handle(
$input = new Symfony\Component\Console\Input\ArgvInput,
new Symfony\Component\Console\Output\ConsoleOutput
);
/*
|--------------------------------------------------------------------------
| Shutdown The Application
|--------------------------------------------------------------------------
|
| Once Artisan has finished running. We will fire off the shutdown events
| so that any final work may be done by the application before we shut
| down the process. This is the last thing to happen to the request.
|
*/
$kernel->terminate($input, $status);
exit($status);

55
bootstrap/app.php Normal file
View File

@ -0,0 +1,55 @@
<?php
/*
|--------------------------------------------------------------------------
| Create The Application
|--------------------------------------------------------------------------
|
| The first thing we will do is create a new Laravel application instance
| which serves as the "glue" for all the components of Laravel, and is
| the IoC container for the system binding all of the various parts.
|
*/
$app = new October\Rain\Foundation\Application(
$_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
);
/*
|--------------------------------------------------------------------------
| Bind Important Interfaces
|--------------------------------------------------------------------------
|
| Next, we need to bind some important interfaces into the container so
| we will be able to resolve them when needed. The kernels serve the
| incoming requests to this application from both the web and CLI.
|
*/
$app->singleton(
Illuminate\Contracts\Http\Kernel::class,
October\Rain\Foundation\Http\Kernel::class
);
$app->singleton(
Illuminate\Contracts\Console\Kernel::class,
October\Rain\Foundation\Console\Kernel::class
);
$app->singleton(
Illuminate\Contracts\Debug\ExceptionHandler::class,
October\Rain\Foundation\Exception\Handler::class
);
/*
|--------------------------------------------------------------------------
| Return The Application
|--------------------------------------------------------------------------
|
| This script returns the application instance. The instance is given to
| the calling script so we can separate the building of the instances
| from the actual running of the application and sending responses.
|
*/
return $app;

53
bootstrap/autoload.php Normal file
View File

@ -0,0 +1,53 @@
<?php
define('LARAVEL_START', microtime(true));
/*
|--------------------------------------------------------------------------
| Register Core Helpers
|--------------------------------------------------------------------------
|
| We cannot rely on Composer's load order when calculating the weight of
| each package. This line ensures that the core global helpers are
| always given priority one status.
|
*/
$helperPath = __DIR__ . '/../vendor/october/rain/src/Support/helpers.php';
if (!file_exists($helperPath)) {
echo 'Missing vendor files, try running "composer install" to install October CMS' . PHP_EOL;
exit(1);
}
require $helperPath;
/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader for
| this application. We just need to utilize it! We'll simply require it
| into the script here so we don't need to manually load our classes.
|
*/
require __DIR__ . '/../vendor/autoload.php';
/*
|--------------------------------------------------------------------------
| Include The Compiled Class File
|--------------------------------------------------------------------------
|
| To dramatically increase your application's performance, you may use a
| compiled class file which contains all of the classes commonly used
| by a request. The Artisan "optimize" is used to create this file.
|
*/
$compiledPath = __DIR__ . '/../storage/framework/compiled.php';
if (file_exists($compiledPath)) {
require $compiledPath;
}

57
composer.json Normal file
View File

@ -0,0 +1,57 @@
{
"name": "october/october",
"description": "Built using October CMS: The Laravel-Based CMS Engineered For Simplicity",
"type": "project",
"homepage": "https://octobercms.com",
"license": "proprietary",
"require": {
"php": "^8.0.2",
"october/rain": "^3.6",
"laravel/framework": "^9.0",
"october/all": "^3.6"
},
"require-dev": {
"phpunit/phpunit": "^8.5|^9.0"
},
"scripts": {
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
],
"post-autoload-dump": [
"System\\Console\\ComposerScript::postAutoloadDump"
],
"post-update-cmd": [
"System\\Console\\ComposerScript::postUpdateCmd"
],
"pre-package-uninstall": [
"System\\Console\\ComposerScript::prePackageUninstall"
],
"test": [
"phpunit --stop-on-failure"
]
},
"config": {
"preferred-install": "dist",
"allow-plugins": {
"composer/installers": true
}
},
"autoload": {
"psr-4": {
"App\\": "app",
"System\\Console\\": "modules/system/console"
}
},
"minimum-stability": "stable",
"prefer-stable": true,
"repositories": {
"octobercms": {
"type": "composer",
"url": "https://gateway.octobercms.com",
"only": ["october/*", "*-plugin", "*-theme"]
}
}
}

161
config/app.php Normal file
View File

@ -0,0 +1,161 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Application Name
|--------------------------------------------------------------------------
|
| This value is the name of your application. This value is used when the
| framework needs to place the application's name in a notification or
| any other location as required by the application or its packages.
*/
'name' => env('APP_NAME', 'October CMS'),
/*
|--------------------------------------------------------------------------
| 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.
|
| You can create a CMS page with route "/error" to set the contents
| of this page. Otherwise a default error page is shown.
|
*/
'debug' => (bool) env('APP_DEBUG', false),
/*
|--------------------------------------------------------------------------
| 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'),
/*
|--------------------------------------------------------------------------
| 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' => env('APP_LOCALE', 'en'),
/*
|--------------------------------------------------------------------------
| 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' => 'en',
/*
|--------------------------------------------------------------------------
| 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' => array_merge(include(base_path('modules/system/providers.php')), [
// Core Service Provider
System\ServiceProvider::class,
// Package Service Providers...
// Illuminate\Html\HtmlServiceProvider::class, // Example
]),
/*
|--------------------------------------------------------------------------
| 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' => array_merge(include(base_path('modules/system/aliases.php')), [
// 'Str' => Illuminate\Support\Str::class, // Example
]),
/*
|--------------------------------------------------------------------------
| 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.
|
|-------------------------------- WARNING! --------------------------------
|
| Before you change this value, consider carefully if that is actually
| what you want to do. It is highly recommended that this is always set
| to UTC (as your server & DB timezone should be as well) and instead
| you can use backend.timezone or cms.timezone to set the default
| timezone used to display dates & times.
|
*/
'timezone' => 'UTC',
];

211
config/backend.php Normal file
View File

@ -0,0 +1,211 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Backend URI prefix
|--------------------------------------------------------------------------
|
| Specifies the URL name used for accessing backend pages.
| For example: admin -> http://localhost/admin
|
*/
'uri' => env('BACKEND_URI', 'admin'),
/*
|--------------------------------------------------------------------------
| Backend Skin
|--------------------------------------------------------------------------
|
| Specifies the backend skin class to use.
|
*/
'skin' => Backend\Skins\Standard::class,
/*
|--------------------------------------------------------------------------
| Default Branding
|--------------------------------------------------------------------------
|
| The default backend customization settings. These values are all optional
| and remember to set the enabled value to true. Supported values:
|
| - menu_mode: inline, text, tile, collapse, icons, left
| - color_mode: light, dark, auto
| - color_palette: default, classic, oxford, console, valentino, punch
| - login_background_type: color, wallpaper, october_ai_images
| - login_background_wallpaper_size: auto, cover
| - login_image_type: autumn_images, custom
|
*/
'brand' => [
'enabled' => false,
'app_name' => env('APP_NAME', 'October CMS'),
'tagline' => 'Administration Panel',
'menu_mode' => 'icons',
'color_mode' => 'light',
'color_palette' => 'default',
'logo_path' => '~/app/assets/images/logo.png',
'favicon_path' => '~/app/assets/images/favicon.png',
'menu_logo_path' => '~/app/assets/images/menu_logo.png',
'dashboard_icon_path' => '~/app/assets/images/dashboard_icon.png',
'stylesheet_path' => '~/app/assets/css/brand_styles.css',
'login_background_type' => 'color',
'login_background_color' => '#fef6eb',
'login_background_wallpaper' => '~/app/assets/images/login_wallpaper.png',
'login_background_wallpaper_size' => 'auto',
'login_image_type' => 'autumn_images',
'login_custom_image' => '~/app/assets/images/loginimage.png',
],
/*
|--------------------------------------------------------------------------
| Turbo Router
|--------------------------------------------------------------------------
|
| Enhance the backend experience using PJAX (push state and AJAX) so when
| you click a link, the page is automatically swapped client-side without
| the cost of a full page load.
|
*/
'turbo_router' => env('BACKEND_TURBO_ROUTER', false),
/*
|--------------------------------------------------------------------------
| Force HTTPS security
|--------------------------------------------------------------------------
|
| Use this setting to force a secure protocol when accessing any backend
| pages, including the authentication pages. This is usually handled by
| web server config, but can be handled by the app for added security.
|
*/
'force_secure' => false,
/*
|--------------------------------------------------------------------------
| Remember Login
|--------------------------------------------------------------------------
|
| Define live duration of backend sessions:
|
| true - session never expires (cookie expiration in 5 years)
| false - session has a limited time (see session.lifetime)
| null - the form login displays a checkbox that allow user to choose
|
*/
'force_remember' => null,
/*
|--------------------------------------------------------------------------
| Force Single Session
|--------------------------------------------------------------------------
|
| Use this setting to prevent concurrent sessions. When enabled, backend
| users cannot sign in to multiple devices at the same time. When a new
| sign in occurs, all other sessions for that user are invalidated.
|
*/
'force_single_session' => false,
/*
|--------------------------------------------------------------------------
| Force Mail Setting
|--------------------------------------------------------------------------
|
| Use this setting to remove the option to configure the mail settings
| via the backend. This can be used in developer environments to prevent
| accidentally sending mail via the configured database.
|
*/
'force_mail_setting' => false,
/*
|--------------------------------------------------------------------------
| Password Policy
|--------------------------------------------------------------------------
|
| Specify the password policy for backend administrators.
|
| allow_reset - Allow administrators to reset their own passwords via self service
| min_length - Password minimum length between 4 - 128 chars
| require_uppercase - Require at least one uppercase letter (AZ)
| require_lowercase - Require at least one lowercase letter (az)
| require_number - Require at least one number
| require_nonalpha - Require at least one non-alphanumeric character
| expire_days - Enable password expiration after number of days, false to disable
|
*/
'password_policy' => [
'allow_reset' => true,
'min_length' => 4,
'require_uppercase' => false,
'require_lowercase' => false,
'require_number' => false,
'require_nonalpha' => false,
'expire_days' => false,
],
/*
|--------------------------------------------------------------------------
| Default Avatar
|--------------------------------------------------------------------------
|
| The default avatar used for backend accounts that have no avatar defined.
|
| local - Use a local default image of a user
| gravatar - Use the Gravatar service to generate a unique image
| <url> - Specify a custom URL to a default avatar
|
*/
'default_avatar' => 'gravatar',
/*
|--------------------------------------------------------------------------
| Backend Locale
|--------------------------------------------------------------------------
|
| This acts as the default setting for a backend user's locale. This can
| be changed by the user at any time using the backend preferences.
|
*/
'locale' => env('APP_LOCALE', 'en'),
/*
|--------------------------------------------------------------------------
| Backend Timezone
|--------------------------------------------------------------------------
|
| This acts as the default setting for a backend user's timezone. This can
| be changed by the user at any time using the backend preferences. All
| dates displayed in the backend will be converted to this timezone.
|
*/
'timezone' => 'UTC',
/*
|--------------------------------------------------------------------------
| Middleware Group
|--------------------------------------------------------------------------
|
| The name of the middleware group to apply to all backend application routes.
| You may use this to apply your own middleware definition.
|
*/
'middleware_group' => 'web',
];

53
config/broadcasting.php Normal file
View File

@ -0,0 +1,53 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Broadcaster
|--------------------------------------------------------------------------
|
| This option controls the default broadcaster that will be used by the
| framework when an event needs to be broadcast. You may set this to
| any of the connections defined in the "connections" array below.
|
*/
'default' => env('BROADCASTING_DEFAULT', 'pusher'),
/*
|--------------------------------------------------------------------------
| 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_KEY'),
'secret' => env('PUSHER_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'cluster' => 'eu',
'encrypted' => true,
],
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
],
'log' => [
'driver' => 'log',
],
],
];

99
config/cache.php Normal file
View File

@ -0,0 +1,99 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Cache Store
|--------------------------------------------------------------------------
|
| This option controls the default cache connection that gets used while
| using this caching library. This connection is used when another is
| not explicitly specified when executing a given caching function.
|
*/
'default' => 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',
'serialize' => false,
],
'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', 'october'), '_').'_cache_'),
];

253
config/cms.php Normal file
View File

@ -0,0 +1,253 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Specifies the default CMS theme.
|--------------------------------------------------------------------------
|
| This parameter value can be overridden by the CMS back-end settings.
|
*/
'active_theme' => env('ACTIVE_THEME', 'demo'),
/*
|--------------------------------------------------------------------------
| Database Themes
|--------------------------------------------------------------------------
|
| Globally forces all themes to store template changes in the database,
| instead of the file system. If this feature is enabled, changes will
| not be stored in the file system.
|
| false - All theme templates are sourced from the filesystem.
| true - Source theme templates from the database with fallback to the filesystem.
|
*/
'database_templates' => env('CMS_DB_TEMPLATES', false),
/*
|--------------------------------------------------------------------------
| Template Strictness
|--------------------------------------------------------------------------
|
| When enabled, an error is thrown when a component, variable, or attribute
| used does not exist. When disabled, a null value is returned instead.
|
*/
'strict_variables' => env('CMS_STRICT_VARIABLES', false),
'strict_components' => env('CMS_STRICT_COMPONENTS', false),
/*
|--------------------------------------------------------------------------
| Frontend Timezone
|--------------------------------------------------------------------------
|
| This acts as the default setting for a frontend user's timezone used when
| converting dates from the system setting, typically set to UTC.
|
*/
'timezone' => 'UTC',
/*
|--------------------------------------------------------------------------
| Template Caching
|--------------------------------------------------------------------------
|
| Specifies the number of minutes the CMS object cache lives. After the interval
| is expired item are re-cached. Note that items are re-cached automatically when
| the corresponding template file is modified.
|
*/
'template_cache_ttl' => 1440,
/*
|--------------------------------------------------------------------------
| Twig Cache
|--------------------------------------------------------------------------
|
| Store a temporary cache of parsed Twig templates in the local filesystem.
|
*/
'enable_twig_cache' => env('CMS_TWIG_CACHE', true),
/*
|--------------------------------------------------------------------------
| Determines if the routing caching is enabled.
|--------------------------------------------------------------------------
|
| If the caching is enabled, the page URL map is saved in the cache. If a page
| URL was changed on the disk, the old URL value could be still saved in the cache.
| To update the cache the clear:cache command should be used. It is recommended
| to disable the caching during the development, and enable it in the production mode.
|
*/
'enable_route_cache' => env('CMS_ROUTE_CACHE', true),
/*
|--------------------------------------------------------------------------
| Page URL Exceptions (Beta)
|--------------------------------------------------------------------------
|
| This configuration can be used to bypass CMS routing logic, such as the
| maintenance mode page and site definition prefix. The key matches a page
| URL match with support for wildcards. The following exception values can
| be configured separated by the pipe character (|).
|
| maintenance - Skip maintenance mode and always allow access to this page
| site - Skip the multisite definition matching engine
|
*/
'url_exceptions' => [
// '/api/*' => 'maintenance',
// '/sitemap.xml' => 'site|maintenance',
],
/*
|--------------------------------------------------------------------------
| Time to live for the URL map.
|--------------------------------------------------------------------------
|
| The URL map used in the CMS page routing process. By default
| the map is updated every time when a page is saved in the backend or when the
| interval, in minutes, specified with the url_cache_ttl parameter expires.
|
*/
'url_cache_ttl' => 60,
/*
|--------------------------------------------------------------------------
| Determines if the asset caching is enabled.
|--------------------------------------------------------------------------
|
| If the caching is enabled, combined assets are cached. If a asset file
| is changed on the disk, the old file contents could be still saved in the cache.
| To update the cache the clear cache command should be used. It is recommended
| to disable the caching during the development, and enable it in the production mode.
|
*/
'enable_asset_cache' => env('CMS_ASSET_CACHE', true),
/*
|--------------------------------------------------------------------------
| Determines if the asset minification is enabled.
|--------------------------------------------------------------------------
|
| If the minification is enabled, combined assets are compressed (minified).
| It is recommended to disable the minification during development, and
| enable it in production mode.
|
*/
'enable_asset_minify' => env('CMS_ASSET_MINIFY', false),
/*
|--------------------------------------------------------------------------
| Check Import Timestamps When Combining Assets
|--------------------------------------------------------------------------
|
| If deep hashing is enabled, the combiner cache will be reset when a change
| is detected on imported files, in addition to those referenced directly.
| This will cause slower page performance. If set to null, deep hashing
| is used when debug mode (app.debug) is enabled.
|
*/
'enable_asset_deep_hashing' => env('CMS_ASSET_DEEP_HASHING', null),
/*
|--------------------------------------------------------------------------
| Site Redirect Policy
|--------------------------------------------------------------------------
|
| Controls the behavior when the root URL is opened without a matched site.
|
| detect - detect the site based on the browser language
| primary - use the primary site
| <site_id> - use a specific site identifier (id)
|
*/
'redirect_policy' => env('CMS_REDIRECT_POLICY', 'detect'),
/*
|--------------------------------------------------------------------------
| Force Bytecode Invalidation
|--------------------------------------------------------------------------
|
| When using Opcache with opcache.validate_timestamps set to 0 or APC
| with apc.stat set to 0 and Twig cache enabled, clearing the template
| cache won't update the cache, set to true to get around this.
|
*/
'force_bytecode_invalidation' => true,
/*
|--------------------------------------------------------------------------
| Safe Mode
|--------------------------------------------------------------------------
|
| If safe mode is enabled, the PHP code section is disabled in the CMS
| for security reasons. If set to null, safe mode is enabled when
| debug mode (app.debug) is disabled.
|
*/
'safe_mode' => env('CMS_SAFE_MODE', null),
/*
|--------------------------------------------------------------------------
| Middleware Group
|--------------------------------------------------------------------------
|
| The name of the middleware group to apply to all CMS application routes.
| You may use this to apply your own middleware definition, or use some
| of the defaults: web, api
|
*/
'middleware_group' => 'web',
/*
|--------------------------------------------------------------------------
| V1 Security Policy
|--------------------------------------------------------------------------
|
| When using safe mode configuration, the Twig sandbox becomes very strict and
| uses an allow-list to protect calling unapproved methods. Instead, you may
| use V1, which is a more relaxed policy that uses a block-list, it blocks
| most of the unsecure methods but is not as secure as an allow-list.
|
*/
'security_policy_v1' => env('CMS_SECURITY_POLICY_V1', false),
/*
|--------------------------------------------------------------------------
| V1 Exception Policy
|--------------------------------------------------------------------------
|
| When debug mode is off, throwing exceptions in AJAX will display a generic
| message, except for specific exception types such as ApplicationException
| and ValidationException (allow-list). Instead, you may use V1, which is
| a more relaxed policy that allows all messages and blocks common exception
| types (block-list) but may still leak information in rare cases.
|
*/
'exception_policy_v1' => env('CMS_EXCEPTION_POLICY_V1', false),
];

158
config/database.php Normal file
View File

@ -0,0 +1,158 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| PDO Fetch Style
|--------------------------------------------------------------------------
|
| By default, database results will be returned as instances of the PHP
| stdClass object; however, you may desire to retrieve records in an
| array format for simplicity. Here you can tweak the fetch style.
|
*/
'fetch' => PDO::FETCH_CLASS,
/*
|--------------------------------------------------------------------------
| Default Database Connection Name
|--------------------------------------------------------------------------
|
| Here you may specify which of the database connections below you wish
| to use as your default connection for all database work. Of course
| you may use many connections at once using the Database library.
|
*/
'default' => 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' => [
'driver' => 'mysql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'database'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => 'InnoDB',
'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', 'database'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'prefix_indexes' => true,
'schema' => 'public',
'sslmode' => env('DB_SSLMODE', 'prefer'),
],
'sqlsrv' => [
'driver' => 'sqlsrv',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '1433'),
'database' => env('DB_DATABASE', 'database'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'prefix_indexes' => true,
],
],
/*
|--------------------------------------------------------------------------
| 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 have not actually be run in the databases.
|
*/
'migrations' => 'migrations',
/*
|--------------------------------------------------------------------------
| Redis Databases
|--------------------------------------------------------------------------
|
| Redis is an open source, fast, and advanced key-value store that also
| provides a richer set of commands than a typical key-value systems
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
*/
'redis' => [
'client' => env('REDIS_CLIENT', 'phpredis'),
'options' => [
'cluster' => env('REDIS_CLUSTER', 'redis'),
'prefix' => env('REDIS_PREFIX', 'october_database_'),
],
'default' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD'),
'port' => env('REDIS_PORT', 6379),
'database' => env('REDIS_DB', '0'),
],
'cache' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD'),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_CACHE_DB', '1'),
],
],
];

61
config/editor.php Normal file
View File

@ -0,0 +1,61 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default HTML Editor Settings
|--------------------------------------------------------------------------
|
| The default editor settings. These values are all optional and remember to
| set the enabled value to true. The `editor_options` provides defaults
| for the `editorOptions` property.
|
| See https://docs.octobercms.com/3.x/element/form/widget-richeditor.html
|
*/
'html_defaults' => [
'enabled' => false,
'stylesheet_path' => '~/app/assets/css/editor_styles.css',
'toolbar_buttons' => 'paragraphFormat, paragraphStyle, quote, bold, italic, align, formatOL, formatUL, insertTable, insertSnippet, insertPageLink, insertImage, insertVideo, insertAudio, insertFile, insertHR, fullscreen, html',
'allow_tags' => 'a, abbr, address, area, article, aside, audio, b, base, bdi, bdo, blockquote, br, button, canvas, caption, cite, code, col, colgroup, datalist, dd, del, details, dfn, dialog, div, dl, dt, em, embed, fieldset, figcaption, figure, footer, form, h1, h2, h3, h4, h5, h6, header, hgroup, hr, i, iframe, img, input, ins, kbd, keygen, label, legend, li, link, main, map, mark, menu, menuitem, meter, nav, noscript, object, ol, optgroup, option, output, p, param, pre, progress, queue, rp, rt, ruby, s, samp, script, style, section, select, small, source, span, strike, strong, sub, summary, sup, table, tbody, td, textarea, tfoot, th, thead, time, title, tr, track, u, ul, var, video, wbr',
'allow_empty_tags' => 'textarea, a, i, iframe, object, video, style, script, .icon, .bi, .fa, .fr-emoticon, .fr-inner, path, line',
'no_wrap_tags' => 'figure, script, style',
'remove_tags' => 'script, style',
'line_breaker_tags' => 'figure, table, hr, iframe, form, dl',
'allow_attrs' => '',
'paragraph_formats' => [
'N' => 'Normal',
'H1' => 'Heading 1',
'H2' => 'Heading 2',
'H3' => 'Heading 3',
'H4' => 'Heading 4',
'PRE' => 'Code',
],
'style_paragraph' => [
'oc-text-bordered' => 'Bordered',
'oc-text-gray' => 'Gray',
'oc-text-spaced' => 'Spaced',
'oc-text-uppercase' => 'Uppercase',
],
'style_link' => [
'oc-link-green' => 'Green',
'oc-link-strong' => 'Strong',
],
'style_table' => [
'oc-dashed-borders' => 'Dashed Borders',
'oc-alternate-rows' => 'Alternate Rows',
],
'style_table_cell' => [
'oc-cell-highlighted' => 'Highlighted',
'oc-cell-thick-border' => 'Thick Border',
],
'style_image' => [
'oc-img-rounded' => 'Rounded',
'oc-img-bordered' => 'Bordered',
],
'editor_options' => [],
],
];

77
config/filesystems.php Normal file
View File

@ -0,0 +1,77 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Filesystem Disk
|--------------------------------------------------------------------------
|
| Here you may specify the default filesystem disk that should be used
| by the framework. A "local" driver, as well as a variety of cloud
| based drivers are available for your choosing. Just store away!
|
*/
'default' => env('FILESYSTEM_DRIVER', 'local'),
/*
|--------------------------------------------------------------------------
| 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"
|
*/
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
'throw' => false,
],
'uploads' => [
'driver' => 'local',
'root' => storage_path('app/uploads'),
'url' => '/storage/app/uploads',
'visibility' => 'public',
'throw' => false,
],
'media' => [
'driver' => 'local',
'root' => storage_path('app/media'),
'url' => '/storage/app/media',
'visibility' => 'public',
'throw' => false,
],
'resources' => [
'driver' => 'local',
'root' => storage_path('app/resources'),
'url' => '/storage/app/resources',
'visibility' => 'public',
'throw' => false,
],
'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'),
'endpoint' => env('AWS_ENDPOINT'),
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
'throw' => false,
],
],
];

52
config/hashing.php Normal file
View File

@ -0,0 +1,52 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Hash Driver
|--------------------------------------------------------------------------
|
| This option controls the default hash driver that will be used to hash
| passwords for your application. By default, the bcrypt algorithm is
| used; however, you remain free to modify this option if you wish.
|
| Supported: "bcrypt", "argon", "argon2id"
|
*/
'driver' => '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,
],
];

93
config/logging.php Normal file
View File

@ -0,0 +1,93 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Log Channel
|--------------------------------------------------------------------------
|
| This option defines the default log channel that gets used when writing
| messages to the logs. The name specified in this option should match
| one of the channels defined in the "channels" configuration array.
|
*/
'default' => 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/system.log'),
'level' => 'debug'
],
'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/system.log'),
'level' => 'debug',
'days' => 14
],
'slack' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => 'October CMS Log',
'emoji' => ':boom:',
'level' => 'critical',
],
'papertrail' => [
'driver' => 'monolog',
'level' => 'debug',
'handler' => Monolog\Handler\SyslogUdpHandler::class,
'handler_with' => [
'host' => env('PAPERTRAIL_URL'),
'port' => env('PAPERTRAIL_PORT'),
],
],
'stderr' => [
'driver' => 'monolog',
'handler' => Monolog\Handler\StreamHandler::class,
'formatter' => env('LOG_STDERR_FORMATTER'),
'with' => [
'stream' => 'php://stderr',
],
],
'syslog' => [
'driver' => 'syslog',
'level' => 'debug',
],
'errorlog' => [
'driver' => 'errorlog',
'level' => 'debug',
],
],
];

99
config/mail.php Normal file
View File

@ -0,0 +1,99 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Mailer
|--------------------------------------------------------------------------
|
| This option controls the default mailer that is used to send any email
| messages sent by your application. Alternative mailers may be setup
| and used as needed; however, this mailer will be used by default.
|
*/
'default' => env('MAIL_MAILER', 'smtp'),
/*
|--------------------------------------------------------------------------
| Mailer Configurations
|--------------------------------------------------------------------------
|
| Here you may configure all of the mailers used by your application plus
| their respective settings. Several examples have been configured for
| you and you are free to add your own as your application requires.
|
| Laravel supports a variety of mail "transport" drivers to be used while
| sending an e-mail. You will specify which one you are using for your
| mailers below. You are free to add additional mailers as required.
|
| Supported: "smtp", "sendmail", "mailgun", "ses",
| "postmark", "log", "array"
|
*/
'mailers' => [
'smtp' => [
'transport' => 'smtp',
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
'port' => env('MAIL_PORT', 587),
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'timeout' => null,
'auth_mode' => null,
],
'ses' => [
'transport' => 'ses',
],
'mailgun' => [
'transport' => 'mailgun',
],
'postmark' => [
'transport' => 'postmark',
],
'sendmail' => [
'transport' => 'sendmail',
'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -t -i'),
],
'log' => [
'transport' => 'log',
'channel' => env('MAIL_LOG_CHANNEL'),
],
'array' => [
'transport' => 'array',
],
'failover' => [
'transport' => 'failover',
'mailers' => [
'smtp',
'log',
],
],
],
/*
|--------------------------------------------------------------------------
| 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', 'noreply@example.tld'),
'name' => env('MAIL_FROM_NAME', 'October CMS'),
],
];

102
config/media.php Normal file
View File

@ -0,0 +1,102 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Time to Live for Assets
|--------------------------------------------------------------------------
|
| Specifies the cache time-to-live, in minutes. The default value is 10.
| The cache invalidates automatically when Library items are added,
| updated or deleted.
|
*/
'item_cache_ttl' => 10,
/*
|--------------------------------------------------------------------------
| Automatically Rename Filenames
|--------------------------------------------------------------------------
|
| When a media file is uploaded, automatically transform its filename to
| something consistent. The "slug" mode will slug the file name for all
| uploads.
|
| Supported: "null", "slug"
|
*/
'auto_rename' => null,
/*
|--------------------------------------------------------------------------
| Clean Vector Files
|--------------------------------------------------------------------------
|
| When a vector file (SVG) file is uploaded, automatically process its
| contents to remove scripts and other potentially dangerous content.
|
*/
'clean_vectors' => true,
/*
|--------------------------------------------------------------------------
| Ignored Files and Patterns
|--------------------------------------------------------------------------
|
| The media manager wil ignore file names and patterns specified here
|
*/
'ignore_files' => ['.svn', '.git', '.DS_Store', '.AppleDouble'],
'ignore_patterns' => ['^\..*'],
/*
|--------------------------------------------------------------------------
| Allowed Extensions
|--------------------------------------------------------------------------
|
| Only allow the following extensions to be uploaded and stored.
|
*/
'default_extensions' => ['jpg', 'jpeg', 'bmp', 'png', 'webp', 'gif', 'svg', 'js', 'map', 'ico', 'css', 'less', 'scss', 'ics', 'odt', 'doc', 'docx', 'ppt', 'pptx', 'pdf', 'swf', 'txt', 'ods', 'xls', 'xlsx', 'eot', 'woff', 'woff2', 'ttf', 'flv', 'wmv', 'mp3', 'ogg', 'wav', 'avi', 'mov', 'mp4', 'mpeg', 'webm', 'mkv', 'rar', 'zip'],
/*
|--------------------------------------------------------------------------
| Image Extensions
|--------------------------------------------------------------------------
|
| File extensions corresponding to the Image document type
|
*/
'image_extensions' => ['jpg', 'jpeg', 'bmp', 'png', 'webp', 'gif', 'svg'],
/*
|--------------------------------------------------------------------------
| Video Extensions
|--------------------------------------------------------------------------
|
| File extensions corresponding to the Video document type
|
*/
'video_extensions' => ['mp4', 'avi', 'mov', 'mpg', 'mpeg', 'mkv', 'webm'],
/*
|--------------------------------------------------------------------------
| Audio Extensions
|--------------------------------------------------------------------------
|
| File extensions corresponding to the Audio document type
|
*/
'audio_extensions' => ['mp3', 'wav', 'wma', 'm4a', 'ogg'],
];

37
config/multisite.php Normal file
View File

@ -0,0 +1,37 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Enable Multisite
|--------------------------------------------------------------------------
|
| Allows the creation of multiple site definitions in the same installation.
| Disabling this will lock any existing site definitions.
|
*/
'enabled' => true,
/*
|--------------------------------------------------------------------------
| Multisite Features
|--------------------------------------------------------------------------
|
| Use multisite for the features defined below. Be sure to clear the application
| cache after modifying these settings.
|
| - cms_maintenance_setting - Maintenance Mode Settings are unique for each site
| - backend_mail_setting - Mail Settings are unique for each site
| - system_asset_combiner - Asset combiner cache keys are unique to the site
|
*/
'features' => [
'cms_maintenance_setting' => false,
'backend_mail_setting' => false,
'system_asset_combiner' => false,
],
];

90
config/queue.php Normal file
View File

@ -0,0 +1,90 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Queue Driver
|--------------------------------------------------------------------------
|
| The Laravel queue API supports a variety of back-ends via an unified
| API, giving you convenient access to each back-end using the same
| syntax for each one. Here you may set the default queue driver.
|
| Supported: "null", "sync", "database", "beanstalkd",
| "sqs", "iron", "redis"
|
*/
'default' => 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.
|
*/
'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'),
'suffix' => env('SQS_SUFFIX'),
'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' => [
'driver' => env('QUEUE_FAILED_DRIVER', 'database'),
'database' => env('DB_CONNECTION', 'mysql'),
'table' => 'failed_jobs',
],
];

34
config/services.php Normal file
View File

@ -0,0 +1,34 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Third Party Services
|--------------------------------------------------------------------------
|
| This file is for storing the credentials for third party services such
| as Stripe, Mailgun, Mandrill, and others. This file provides a sane
| default location for this type of information, allowing packages
| to have a conventional place to find your various credentials.
|
*/
'mailgun' => [
'domain' => env('MAILGUN_DOMAIN'),
'secret' => env('MAILGUN_SECRET'),
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
'scheme' => 'https',
],
'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'),
],
];

200
config/session.php Normal file
View File

@ -0,0 +1,200 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Session Driver
|--------------------------------------------------------------------------
|
| This option controls the default session "driver" that will be used on
| requests. By default, we will use the lightweight native driver but
| you may specify any of the other wonderful drivers provided here.
|
| Supported: "file", "cookie", "database", "apc",
| "memcached", "redis", "array"
|
*/
'driver' => 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 for it is expired. If you want them
| to immediately expire when the browser closes, set it to zero.
|
*/
'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'),
/*
|--------------------------------------------------------------------------
| 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
|--------------------------------------------------------------------------
|
| While using one of the framework's cache driven session backends 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".
|
| Affects: "apc", "dynamodb", "memcached", "redis"
|
*/
'store' => env('SESSION_STORE'),
/*
|--------------------------------------------------------------------------
| 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', 'october_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'),
/*
|--------------------------------------------------------------------------
| 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,
/*
|--------------------------------------------------------------------------
| 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'),
/*
|--------------------------------------------------------------------------
| 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.
|
| In the strict mode, the cookie is not sent with any cross-site usage
| even if the user follows a link to another website. Lax cookies are
| only sent with a top-level get request.
|
| Supported: "lax", "strict"
|
*/
'same_site' => 'lax',
];

181
config/system.php Normal file
View File

@ -0,0 +1,181 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Load Specified Modules
|--------------------------------------------------------------------------
|
| Specify which modules should be registered when using the application.
|
| LOAD_MODULES="System,Backend,Editor,Cms,Media"
|
*/
'load_modules' => env('LOAD_MODULES'),
/*
|--------------------------------------------------------------------------
| Disable Specified Plugins
|--------------------------------------------------------------------------
|
| Specify plugin codes which will always be disabled in the application.
|
| DISABLE_PLUGINS="October.Demo,RainLab.Blog"
|
*/
'disable_plugins' => env('DISABLE_PLUGINS'),
/*
|--------------------------------------------------------------------------
| Link Policy
|--------------------------------------------------------------------------
|
| Controls how URL links are generated throughout the application.
|
| detect - detect hostname and use the current schema
| secure - detect hostname and force HTTPS schema
| insecure - detect hostname and force HTTP schema
| force - force hostname and schema using app.url config value
|
| By default most links use their fully qualified URLs or reference their
| CDN location. In some cases you may prefer relative links where possible
| if so, set the relative_links value to true.
|
*/
'link_policy' => env('LINK_POLICY', 'detect'),
'relative_links' => env('RELATIVE_LINKS', false),
/*
|--------------------------------------------------------------------------
| System Paths
|--------------------------------------------------------------------------
|
| Specify location to core system paths. Local paths are relative if they
| do not have a leading slash. URLs can be relative to the base application
| URL or you can specify a full path URL.
|
| PLUGINS_PATH="plugins"
| PLUGINS_ASSET_URL="/plugins"
|
| THEMES_PATH="/absolute/path/to/themes"
| THEMES_ASSET_URL="http://localhost/themes"
|
*/
'plugins_path' => env('PLUGINS_PATH'),
'plugins_asset_url' => env('PLUGINS_ASSET_URL'),
'themes_path' => env('THEMES_PATH'),
'themes_asset_url' => env('THEMES_ASSET_URL'),
'storage_path' => env('STORAGE_PATH'),
'cache_path' => env('CACHE_PATH'),
/*
|--------------------------------------------------------------------------
| Default Permission Masks
|--------------------------------------------------------------------------
|
| Specifies a default file and folder permission as a string (eg: "755") for
| created files and directories in the system paths. It is recommended
| to use file as "644" and folder as "755".
|
*/
'default_mask' => [
'file' => env('DEFAULT_FILE_MASK'),
'folder' => env('DEFAULT_FOLDER_MASK'),
],
/*
|--------------------------------------------------------------------------
| Cross Site Request Forgery (CSRF) Protection
|--------------------------------------------------------------------------
|
| If the CSRF protection is enabled, all "postback" & AJAX requests are
| checked for a valid security token.
|
*/
'enable_csrf_protection' => env('ENABLE_CSRF', true),
/*
|--------------------------------------------------------------------------
| Convert Line Endings
|--------------------------------------------------------------------------
|
| Determines if October CMS should convert line endings from the Windows
| style \r\n to the Unix style \n.
|
*/
'convert_line_endings' => env('CONVERT_LINE_ENDINGS', false),
/*
|--------------------------------------------------------------------------
| Cookie Encryption
|--------------------------------------------------------------------------
|
| October CMS encrypts/decrypts cookies by default. You can specify cookies
| that should not be encrypted or decrypted here. This is useful, for
| example, when you want to pass data from frontend to server side backend
| via cookies, and vice versa.
|
*/
'unencrypt_cookies' => env('UNENCRYPT_COOKIES', [
// 'my_cookie',
]),
/*
|--------------------------------------------------------------------------
| Automatically Mirror to Public Directory
|--------------------------------------------------------------------------
|
| Performed after a composer update.
|
| true - automatically mirror asset to the public directory
| false - never mirror assets to public directory
| null - only mirror assets when debug mode is OFF (in production)
|
*/
'auto_mirror_public' => env('AUTO_MIRROR_PUBLIC', false),
/*
|--------------------------------------------------------------------------
| Automatically Rollback Plugins
|--------------------------------------------------------------------------
|
| Attempt to automatically reverse database migrations for a plugin when
| they are uninstalled using composer. This is disabled by default
| to prevent data loss.
|
*/
'auto_rollback_plugins' => env('AUTO_ROLLBACK_PLUGINS', false),
/*
|--------------------------------------------------------------------------
| Base Directory Restriction
|--------------------------------------------------------------------------
|
| Restricts loading backend template and config files to within the base
| directory of the application. For example, when using the symlink option
| in composer for local packages.
|
| Warning: This should never be disabled in production for security reasons.
|
*/
'restrict_base_dir' => env('RESTRICT_BASE_DIR', true),
];

36
config/view.php Normal file
View File

@ -0,0 +1,36 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| View Storage Paths
|--------------------------------------------------------------------------
|
| Most templating systems load templates from disk. Here you may specify
| an array of paths that should be checked for your views. Of course
| the usual Laravel view path has already been registered for you.
|
*/
'paths' => [
app_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'))
),
];

25
database/data.txt Normal file
View File

@ -0,0 +1,25 @@
fleet_october.txt
SZA88-XKBPD-4ZCXD-0LCLK
root
86.105.18.208
X1qRs03Iw2Fe2E4Zho
https://www.figma.com/file/esgl1AlY11kk32WpsvTaz6/Untitled?type=design&node-id=0%3A1&mode=dev
auth.json
{
"http-basic": {
"gateway.octobercms.com": {
"username": "laskttt@proton.me",
"password": "1AQNlBQVgH1cOBQu8JRgPHRE8AScQJRE8ZRkQGRfgBTZlBTVmZQWwZGEyAzR1AzHkMJRlAJRmZmt0BQAxAwD"
}
}
}

1913
database/database.sql Normal file

File diff suppressed because one or more lines are too long

48
index.php Normal file
View File

@ -0,0 +1,48 @@
<?php
/**
* October - The PHP platform that gets back to basics.
*
* @package october/october
* @author Alexey Bobkov, Samuel Georges
*/
/*
|--------------------------------------------------------------------------
| Register composer
|--------------------------------------------------------------------------
|
| Composer provides a generated class loader for the application.
|
*/
require __DIR__.'/bootstrap/autoload.php';
/*
|--------------------------------------------------------------------------
| Load framework
|--------------------------------------------------------------------------
|
| This bootstraps the framework and loads up this application.
|
*/
$app = require_once __DIR__.'/bootstrap/app.php';
/*
|--------------------------------------------------------------------------
| Process request
|--------------------------------------------------------------------------
|
| Execute the request and send the response back to the client.
|
*/
$kernel = $app->make(\Illuminate\Contracts\Http\Kernel::class);
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
$response->send();
$kernel->terminate($request, $response);

40
package.json Normal file
View File

@ -0,0 +1,40 @@
{
"name": "octobercms",
"homepage": "https://octobercms.com/",
"description": "October CMS is a self-hosted CMS platform based on the Laravel PHP Framework.",
"scripts": {
"dev": "npm run development",
"development": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"prod": "npm run production",
"production": "mix --production"
},
"devDependencies": {
"babel-plugin-module-resolver": "^4.1.0",
"laravel-mix": "^6.0.39",
"less": "^4.1.2",
"less-loader": "^10.2.0",
"sass": "^1.45.0",
"sass-loader": "^12.1.0"
},
"dependencies": {
"@popperjs/core": "^2.11.7",
"bluebird": "^3.7.2",
"bootstrap": "^5.3.0",
"bootstrap-icons": "^1.10",
"chart.js": "^4.3.2",
"chartjs-adapter-moment": "^1.0.1",
"dropzone": "^6.0.0-beta.2",
"emmet-monaco-es": "^5.3",
"jquery": "^3.6.0",
"js-cookie": "^3.0.1",
"monaco-editor": "^0.46.0",
"monaco-yaml": "^5.1.1",
"popper.js": "^1.16.1",
"sortablejs": "^1.15.0",
"vue": "^2.6.14",
"vue-router": "^3.5.3"
}
}

44
phpcs.xml Normal file
View File

@ -0,0 +1,44 @@
<?xml version="1.0"?>
<ruleset name="October CMS">
<description>The coding standard for October CMS.</description>
<rule ref="PSR2">
<!--
Exceptions to the PSR-2 guidelines as per our Developer Guide:
https://octobercms.com/help/guidelines/developer#psr-exceptions
-->
<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps" />
<exclude name="PSR2.ControlStructures.ControlStructureSpacing.SpacingAfterOpenBrace" />
<exclude name="Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace" />
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.SpaceAfterFunction"/>
<exclude name="Generic.Files.LineLength"/>
</rule>
<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
<!-- Migration files and tests do not need a namespace defined -->
<exclude-pattern>*/database/migrations/*\.php</exclude-pattern>
</rule>
<file>app/</file>
<file>config/</file>
<file>modules/</file>
<file>plugins/october/demo/</file>
<!-- Ignore vendor files -->
<exclude-pattern>*/vendor/*</exclude-pattern>
<!-- Ignore tests -->
<exclude-pattern>*/modules/*/tests/*</exclude-pattern>
<!-- Ignore views -->
<exclude-pattern>*/modules/*/views/*</exclude-pattern>
<!-- Ignore backend UI -->
<exclude-pattern>*/modules/*/elements/*</exclude-pattern>
<!-- Ignore controllers, layouts -->
<exclude-pattern>*/modules/*/layouts/*</exclude-pattern>
<exclude-pattern>*/modules/*/controllers/*/*</exclude-pattern>
<!-- Ignore partial views -->
<exclude-pattern>*/modules/**/_*</exclude-pattern>
</ruleset>

34
phpunit.xml Normal file
View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="modules/system/tests/bootstrap.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
>
<testsuites>
<testsuite name="October CMS Test Suite">
<directory>./modules/*/tests</directory>
</testsuite>
</testsuites>
<php>
<env name="APP_ENV" value="testing" />
<env name="APP_LOCALE" value="en" />
<env name="CACHE_DRIVER" value="array" />
<env name="SESSION_DRIVER" value="array" />
<env name="ACTIVE_THEME" value="test" />
<env name="CONVERT_LINE_ENDINGS" value="true" />
<env name="CMS_SAFE_MODE" value="false" />
<env name="CMS_ROUTE_CACHE" value="true" />
<env name="CMS_TWIG_CACHE" value="false" />
<env name="PLUGINS_PATH" value="modules/system/tests/fixtures/plugins" />
<env name="THEMES_PATH" value="modules/cms/tests/fixtures/themes" />
<env name="ENABLE_CSRF" value="false" />
<env name="DB_CONNECTION" value="sqlite" />
<env name="DB_DATABASE" value=":memory:" />
</php>
</phpunit>

View File

@ -0,0 +1,28 @@
<?php namespace October\Demo;
use System\Classes\PluginBase;
/**
* The plugin.php file (called the plugin initialization script) defines the plugin information class.
*/
class Plugin extends PluginBase
{
public function pluginDetails()
{
return [
'name' => 'October Demo',
'description' => 'Provides features used by the provided demonstration theme.',
'author' => 'Alexey Bobkov, Samuel Georges',
'icon' => 'icon-leaf'
];
}
public function registerComponents()
{
return [
\October\Demo\Components\Todo::class => 'demoTodo',
\October\Demo\Components\BackendLink::class => 'backendLink'
];
}
}

View File

@ -0,0 +1,24 @@
<?php namespace October\Demo\Components;
use System;
use Backend;
use Cms\Classes\ComponentBase;
/**
* BackendLink component
*/
class BackendLink extends ComponentBase
{
public function componentDetails()
{
return [
'name' => 'Backend Link',
'description' => 'Makes the backend area link available.'
];
}
public function onRun()
{
$this->page['backendUrl'] = System::checkDebugMode() ? Backend::url('/') : null;
}
}

View File

@ -0,0 +1,60 @@
<?php namespace October\Demo\Components;
use Cms\Classes\ComponentBase;
use ApplicationException;
/**
* Todo component
*/
class Todo extends ComponentBase
{
public function componentDetails()
{
return [
'name' => 'To Do List',
'description' => 'Implements a simple to-do list.'
];
}
public function defineProperties()
{
return [
'max' => [
'description' => 'The most amount of To Do items allowed',
'title' => 'Max items',
'default' => 10,
'type' => 'string',
'validationPattern' => '^[0-9]+$',
'validationMessage' => 'The Max Items value is required and should be integer.'
],
'addDefault' => [
'description' => 'Determines if default items must be added to the To Do list',
'title' => 'Add default items',
'type' => 'checkbox',
'default' => 0
]
];
}
public function onRun()
{
if ($this->property('addDefault')) {
$this->page['items'] = ['Learn October CMS'];
}
}
public function onAddItem()
{
$items = post('items', []);
if (count($items) >= $this->property('max')) {
throw new ApplicationException(sprintf('Sorry only %s items are allowed.', $this->property('max')));
}
if (($newItem = post('newItem')) != '') {
$items[] = $newItem;
}
$this->page['items'] = $items;
}
}

View File

@ -0,0 +1,23 @@
<form
role="form"
data-request="{{ __SELF__ }}::onAddItem"
data-request-update="'{{ __SELF__ }}::list': '#result'"
data-request-success="$('#input-item').val('')"
data-request-flash>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">To Do List</h3>
</div>
<div class="panel-body">
<div class="input-group">
<input type="text" id="input-item" class="form-control" value="" name="newItem" placeholder="What needs to be done?">
<span class="input-group-btn">
<button type="submit" class="btn btn-primary">Add</button>
</span>
</div>
</div>
<ul class="list-group" id="result">
{% partial __SELF__ ~ '::list' %}
</ul>
</div>
</form>

View File

@ -0,0 +1,12 @@
{% for item in items %}
<li class="list-group-item">
<input type="hidden" name="items[]" value="{{ item }}" />
{{ item }}
<button type="button"
class="close pull-right"
aria-hidden="true"
onclick="$(this).closest('li').remove()">&times;</button>
</li>
{% endfor %}

View File

@ -0,0 +1,22 @@
{
"name": "october/demo-plugin",
"type": "october-plugin",
"description": "Demo OctoberCMS plugin",
"keywords": ["october", "cms", "demo", "plugin"],
"authors": [
{
"name": "Alexey Bobkov",
"email": "aleksey.bobkov@gmail.com",
"role": "Co-founder"
},
{
"name": "Samuel Georges",
"email": "daftspunky@gmail.com",
"role": "Co-founder"
}
],
"require": {
"php": ">=7.2.9",
"composer/installers": "~1.0"
}
}

View File

@ -0,0 +1 @@
1.0.1: First version of Demo

1
storage/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.sqlite

5
storage/app/.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
*
!.gitignore
!media
!uploads
!resources

2
storage/app/media/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

2
storage/app/resources/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

3
storage/app/uploads/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
*
!.gitignore
!public

2
storage/app/uploads/public/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

1
storage/cms/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.php

2
storage/cms/cache/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

2
storage/cms/combiner/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

3
storage/cms/project.json Normal file
View File

@ -0,0 +1,3 @@
{
"project": "1AQNlBQVgH1cOBQu8JRgPHRE8AScQJRE8ZRkQGRfgBTZlBTVmZQWwZGEyAzR1AzHkMJRlAJRmZmt0BQAxAwD"
}

2
storage/cms/twig/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

1
storage/framework/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.php

3
storage/framework/cache/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
*
!data/
!.gitignore

2
storage/framework/sessions/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

2
storage/framework/views/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

2
storage/logs/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

3
storage/temp/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
*
!.gitignore
!public

2
storage/temp/public/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*
!.gitignore

99
tests/README.md Normal file
View File

@ -0,0 +1,99 @@
# Plugin testing
Plugin unit tests can be performed by running `phpunit` in the base plugin directory.
### Creating plugin tests
Plugins can be tested by creating a file called `phpunit.xml` in the base directory with the following content, for example, in a file **/plugins/acme/blog/phpunit.xml**:
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="../../../tests/bootstrap.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
>
<testsuites>
<testsuite name="Plugin Unit Test Suite">
<directory>./tests</directory>
</testsuite>
</testsuites>
<php>
<env name="APP_ENV" value="testing"/>
<env name="CACHE_DRIVER" value="array"/>
<env name="SESSION_DRIVER" value="array"/>
</php>
</phpunit>
Then a **tests/** directory can be created to contain the test classes. The file structure should mimic the base directory with classes having a `Test` suffix. Using a namespace for the class is also recommended.
<?php namespace Acme\Blog\Tests\Models;
use Acme\Blog\Models\Post;
use PluginTestCase;
class PostTest extends PluginTestCase
{
public function testCreateFirstPost()
{
$post = Post::create(['title' => 'Hi!']);
$this->assertEquals(1, $post->id);
}
}
The test class should extend the base class `PluginTestCase` and this is a special class that will set up the October database stored in memory, as part of the `setUp` method. It will also refresh the plugin being tested, along with any of the defined dependencies in the plugin registration file. This is the equivalent of running the following before each test:
php artisan october:up
php artisan plugin:refresh Acme.Blog
[php artisan plugin:refresh <dependency>, ...]
> **Note:** If your plugin uses [configuration files](../plugin/settings#file-configuration), then you will need to run `System\Classes\PluginManager::instance()->registerAll(true);` in the `setUp` method of your tests. Below is an example of a base test case class that should be used if you need to test your plugin working with other plugins instead of in isolation.
use System\Classes\PluginManager;
class BaseTestCase extends PluginTestCase
{
public function setUp(): void
{
parent::setUp();
// Get the plugin manager
$pluginManager = PluginManager::instance();
// Register the plugins to make features like file configuration available
$pluginManager->registerAll(true);
// Boot all the plugins to test with dependencies of this plugin
$pluginManager->bootAll(true);
}
public function tearDown(): void
{
parent::tearDown();
// Get the plugin manager
$pluginManager = PluginManager::instance();
// Ensure that plugins are registered again for the next test
$pluginManager->unregisterAll();
}
}
#### Changing database engine for plugins tests
By default OctoberCMS uses SQLite stored in memory for the plugin testing environment. If you want to override the default behavior set the `useConfigForTesting` config to `true` in your `/config/database.php` file. When the `APP_ENV` is `testing` and the `useConfigForTesting` is `true` database parameters will be taken from `/config/database.php`.
You can override the `/config/database.php` file by creating `/config/testing/database.php`. In this case variables from the latter file will be taken.
## System testing
To perform unit testing on the core October files, you should download a development copy using composer or cloning the git repo. This will ensure you have the `tests/` directory.
### Unit tests
Unit tests can be performed by running `phpunit` in the root directory or inside `/tests/unit`.

3
tests/bootstrap.php Normal file
View File

@ -0,0 +1,3 @@
<?php
require __DIR__ . '/../modules/system/tests/bootstrap.php';

4
themes/demo/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
/node_modules
/vendor
composer.lock
package-lock.json

54
themes/demo/README.md Normal file
View File

@ -0,0 +1,54 @@
Demo Theme
==========
October CMS demo theme that demonstrates the basic core functionality and utilizes the accompanying demo plugin. It is a great theme to copy when building a site from scratch.
The theme acts as a reference implementation for default component markup when distributing plugins.
Have fun!
## Combining CSS and JavaScript
This theme doesn't combine assets for performance reasons. To combine the stylesheets, replace the following lines in the default layout. When combining with this theme, we recommend enabling the config `enableAssetDeepHashing` in the file **config/cms.php**.
Uncombined stylesheets:
```twig
<link href="{{ 'assets/css/vendor.css'|theme }}" rel="stylesheet">
<link href="{{ 'assets/css/theme.css'|theme }}" rel="stylesheet">
```
Combined stylesheets:
```twig
<link href="{{ [
'@framework.extras',
'assets/less/vendor.less',
'assets/less/theme.less'
]|theme }}" rel="stylesheet">
```
> **Note**: October also includes an SCSS compiler, if you prefer.
Uncombined JavaScript:
```twig
<script src="{{ 'assets/vendor/jquery.js'|theme }}"></script>
<script src="{{ 'assets/vendor/bootstrap.js'|theme }}"></script>
<script src="{{ 'assets/javascript/app.js'|theme }}"></script>
{% framework extras turbo %}
```
Combined JavaScript:
```twig
<script src="{{ [
'@jquery',
'@framework',
'@framework.extras',
'assets/vendor/bootstrap.js',
'assets/javascript/app.js'
]|theme }}"></script>
```
> **Important**: Make sure you keep the `{% styles %}` and `{% scripts %}` placeholder tags as these are used by plugins for injecting assets.

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

View File

@ -0,0 +1,3 @@
<svg width="1589" height="45" viewBox="0 0 1589 45" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1588.5 44.5H0L1588.5 0V44.5Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 162 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 KiB

Some files were not shown because too many files have changed in this diff Show More