gp247 / cms
Free CMS source code built with Laravel for your system.
Requires
- php: ^8.3
- gp247/core: ^2.0
- gp247/front: ^2.0
- laravel/framework: ^13.8
- laravel/tinker: ^3.0
Requires (Dev)
- barryvdh/laravel-debugbar: ^4.4
- fakerphp/faker: ^1.23
- laravel/pail: ^1.2.5
- laravel/pao: ^1.0.6
- laravel/pint: ^1.27
- mockery/mockery: ^1.6
- nunomaduro/collision: ^8.6
- phpunit/phpunit: ^12.5.12
README
_____ _____ ___ _ _ _____
/ ____| __ \ |__ \| || | |___ |
| | __| |__) | ) | || |_ / /
| | |_ | ___/ / /|__ _| / /
| |__| | | / /_ | | / /
\_____|_| |____| |_| /_/
π Language: π¬π§ English (current) Β· π»π³ TiαΊΏng Viα»t
Free CMS source code built with Laravel for your system
composer create-project gp247/cms
About GP247 CMS
- GP247 CMS makes it easy for you to build a website for your business.
- GP247 CMS is a complete system, combining
GP247/frontandGP247/core.
What can GP247 do?
- Provides a powerful and flexible role management solution.
- Offers a synchronous authentication API, enhancing API security with additional layers.
- Build and manage Plugins/Templates that work in the system
- Comprehensive access log monitoring system.
- Continuously updates security vulnerabilities.
- Multi-language support, easy to manage.
- GP247 is FREE
And more:
- GP247 builds an open ecosystem (plugin, template), helping users quickly build CMS, PMO, eCommerce, etc., according to your needs.
Core Laravel:
GP247 2.x
Core Laravel framework 13.x
UI built with Tailwind CSS 4
Website structure using GP247
Website-folder/
|
βββ app
β βββ GP247
β βββ Core(+) //Customize controller of Core
β βββ Helpers(+) //Auto load Helpers/*.php
β βββ Plugins(+) //Use `php artisan gp247:make-plugin --name=NameOfPlugin`
β βββ Front(+) //Customize controller of Front
β βββ Templates(+) //Use `php artisan gp247:make-template --name=NameOfTempate`
βββ public
β βββ GP247
β βββ Core(+)
β βββ Plugins(+)
β βββ Templates(+)
βββ resources
β βββ views/vendor
β βββ gp247-admin(+) //Core view overrides
β βββ gp247-front-admin(+) //Front view overrides
βββ vendor
β βββ gp247/core
β βββ gp247/front
βββ...
Quick Installation Guide
-
Step 1:
Run the command:
composer create-project gp247/cms website-folder -
Step 2: Check the configuration in the .env file
Ensure that the database configuration and APP_KEY information in the .env file are complete.
If the APP_KEY is not set, use the following command to generate it:
php artisan key:generate -
Step 3: Configure database
By default, GP247 uses MySQL. The configuration will be saved in the .env file as follows:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=gp247
DB_USERNAME=root
DB_PASSWORD=
If you want to use SQLite for quick testing, please change the connection in the .env file to sqlite, and comment out the DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME, DB_PASSWORD lines.
DB_CONNECTION=sqlite
#DB_HOST=127.0.0.1
#DB_PORT=3306
#DB_DATABASE=gp247
#DB_USERNAME=root
#DB_PASSWORD=
-
Step 4: Install GP247 CMS
Run the command:
php artisan cms:install
Useful information:
View GP247 version
php artisan cms:info
Update GP247
Update the packages using the command:
composer update gp247/core
composer update gp247/front
Then, run the command:
php artisan cms:update
Optional β refresh published assets/views.
composer updateandcms:updateonly refresh the code undervendor/; files already copied topublic/GP247andapp/GP247are not overwritten automatically. If a new release ships updated compiled CSS/JS or default template/views, re-publish with--force(this overwrites local customizations there β back them up first):
php artisan vendor:publish --tag=gp247:core-public --force
php artisan vendor:publish --tag=gp247:front-public --force
php artisan vendor:publish --tag=gp247:front-view --force
Create plugin:
php artisan gp247:make-plugin --name=PluginName
To create a zip file plugin:
php artisan gp247:make-plugin --name=PluginName --download=1
Create template:
php artisan gp247:make-template --name=TemplateName
To create a zip file template:
php artisan gp247:make-template --name=TemplateName --download=1
Customization
Customize admin view
Each package publishes its admin views into its own views/vendor/<namespace> folder β publish only the tag you need:
php artisan vendor:publish --tag=gp247:core-view// -> views/vendor/gp247-admin
php artisan vendor:publish --tag=gp247:front-admin// -> views/vendor/gp247-front-admin
Customize the default template
php artisan vendor:publish --tag=gp247:front-view// -> app/GP247/Templates/GP247Front
php artisan vendor:publish --tag=gp247:front-public// -> public/GP247/Templates/GP247Front
Override gp247_xxx functions
Step 1: Add the list of functions you want to override to the array in
config/gp247_functions_except.php
Step 2: Create a new function in the
app/GP247/Helpersdirectory, for exampleapp/GP247/Helpers/myfunction.php
Override gp247 controller files
You can override any controller (including API controllers) in GP247/Core and GP247/Front using the same mechanism: create the corresponding controller in app/GP247/{Core|Front}, extend the original controller, and prepend App to the original namespace.
Step 1: Create the matching file under
app/GP247/Core/...(keep the same sub-path and filename as in the original package).
Step 2: Make the new controller
extendthe original controller fromvendor/gp247/core/....
Step 3: Change the namespace from
GP247\Core\...toApp\GP247\Core\...(just prependApp, keep the rest as-is).
The same pattern applies to GP247\Front\* (becoming App\GP247\Front\*) and to API controllers (GP247\Core\Api\Controllers becomes App\GP247\Core\Api\Controllers).
Add route
Use prefix and middleware constants GP247_ADMIN_PREFIX, GP247_ADMIN_MIDDLEWARE in route declaration.
Reference: https://github.com/gp247net/core/blob/master/src/routes.php
Environment variables in .env file
Quickly disable GP247 and plugins
GP247_ACTIVE=1// To disable, set value 0
Disable APIs
GP247_API_MODE=1// To disable, set value 0
Data table prefixes
GP247_DB_PREFIX=gp247_//Cannot change after installing gp247
Path prefix to admin
GP247_ADMIN_PREFIX=gp247_admin