{"id":32960850,"url":"https://github.com/AlexStack/Laravel-CMS","last_synced_at":"2025-11-16T09:01:37.556Z","repository":{"id":56944833,"uuid":"202504014","full_name":"AlexStack/Laravel-CMS","owner":"AlexStack","description":"Simple Bootstrap Laravel CMS. Support Laravel 8.x Can integrate into any existing Laravel project. Only add few database tables with prefixes, not affect your existing database tables. Support Laravel 7.x \u0026 Laravel 6.x \u0026 Laravel 5.x \u0026 MySql \u0026 PostgreSql - Amila Laravel CMS","archived":false,"fork":false,"pushed_at":"2021-05-24T22:31:09.000Z","size":3279,"stargazers_count":106,"open_issues_count":1,"forks_count":27,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-08-23T06:55:16.020Z","etag":null,"topics":["bootstrap-cms","cms","free-cms","laravel","laravel-6","laravel-application","laravel-cms","laravel-framework","laravel-package","laravel-website","laravel6","laravel8","laravelcms","php-cms","phpcms"],"latest_commit_sha":null,"homepage":"https://www.LaravelCMS.tech/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlexStack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"contributing.md","funding":null,"license":"license.md","code_of_conduct":"code-of-conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-15T08:29:57.000Z","updated_at":"2025-01-06T13:20:29.000Z","dependencies_parsed_at":"2022-08-21T02:40:25.681Z","dependency_job_id":null,"html_url":"https://github.com/AlexStack/Laravel-CMS","commit_stats":null,"previous_names":[],"tags_count":34,"template":false,"template_full_name":null,"purl":"pkg:github/AlexStack/Laravel-CMS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexStack%2FLaravel-CMS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexStack%2FLaravel-CMS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexStack%2FLaravel-CMS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexStack%2FLaravel-CMS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlexStack","download_url":"https://codeload.github.com/AlexStack/Laravel-CMS/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexStack%2FLaravel-CMS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":284684461,"owners_count":27046675,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-16T02:00:05.974Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap-cms","cms","free-cms","laravel","laravel-6","laravel-application","laravel-cms","laravel-framework","laravel-package","laravel-website","laravel6","laravel8","laravelcms","php-cms","phpcms"],"created_at":"2025-11-13T00:00:38.458Z","updated_at":"2025-11-16T09:01:37.550Z","avatar_url":"https://github.com/AlexStack.png","language":"PHP","funding_links":[],"categories":["Resources","开源项目"],"sub_categories":["Applications Built with Laravel"],"readme":"# Amila Laravel CMS\n\n[![image](docs/images/min/travis.svg)](https://github.com/AlexStack/Laravel-CMS/releases)\n[![Laravel CMS](docs/images/min/mit.svg)](https://www.laravelcms.tech/ \"Laravel CMS 2020\")\n[![image](docs/images/min/styleci.svg)](https://github.com/AlexStack/Laravel-CMS/releases)\n[![Latest Stable Version](https://poser.pugx.org/alexstack/laravel-cms/v/stable)](https://github.com/AlexStack/Laravel-CMS/releases)\n\n-   Free, open-source Simple Bootstrap Laravel CMS, support Laravel 8.x or 7.x or old Laravel 6.x \u0026 5.x, support MySql \u0026 MariaDB \u0026 PostgreSQL\n-   Can integrate with any existing Laravel project, install as an individual Laravel package\n-   Only add a few database tables with a prefix, not effect your existing database tables.\n-   You can easily custom the database table names, the page URL path(route) and the template(theme)\n-   Build-in Website is ready after install. Easy to use, simple enough but flexible.\n-   Basic Laravel 8.x/ Laravel 7.x /Laravel 6.x / Laravel 5.x syntax and blade template, no need to learn a \"new language\"\n\n## How to install for an existing Laravel project\n\n-   Support Laravel 8.x \u0026 Laravel 7.x \u0026 Laravel 6.x \u0026 Laravel 5.x\n\n```php\n// Make sure you already have laravel installed and configured the database in the .env\n// Go to your laravel project folder and install it via composer\n// Initialize the CMS (You can set up database table prefix and locale here)\n\ncomposer require alexstack/laravel-cms \u0026\u0026 php artisan laravelcms\n\n\n// Now you can access the cms frontend site: http://yourdomain/cms-home\n\n// Access the backend with the FIRST USER of your site: http://yourdomain/cmsadmin\n\n// Note: The default admin is the first user in your laravel database(user id = 1 )\n\n```\n\n## How to set up a brand new CMS website with the latest Laravel\n\n-   It's good for a local testing, it's support the latest Laravel version\n\n```php\n// Step 1: Install Laravel to folder cms\ncomposer create-project laravel/laravel cms \u0026\u0026 cd cms \u0026\u0026 composer require alexstack/laravel-cms\n\n// Step 2: install CMS in silent mode\nphp artisan laravelcms --locale=en --table_prefix=cms_ --silent=yes\n\n// Note: it will ask for database settings if you did not change the default .env file\n// Note: it will automatically run a web server on port 9321 for your project\n\n// Step 3: Now, you can access your cms backend via http://127.0.0.1:9321/cmsadmin/\n// Default admin username: admin@admin.com  password: admin321\n\n```\n\n## How to uninstall\n\n```php\n// Uninstall the CMS\nphp artisan laravelcms --action=uninstall\n\n```\n\n## Demo \u0026 Documents\n\n-   [Laravel CMS frontend demo \u0026 documents](https://www.laravelcms.tech \"Laravel CMS\") \u0026#x1F4D9;\n\n## Screenshot of the output of install command\n\n![image](docs/images/min/artisan-install-command-min.png)\n\n## Screenshot of the output of uninstalling command\n\n![image](docs/images/min/artisan-uninstall-command-min.png)\n\n## Screenshot of the admin panel\n\n![image](docs/images/min/all-pages-min.png)\n![image](docs/images/min/settings-template-min.png)\n![image](docs/images/min/create-new-page-min.png)\n\n## Set locale language to **cn** instead of **en**\n\n![cn_image](docs/images/min/settings-global-cn-min.png)\n\n## Error \"Route [login] not defined\" while access the backend /cmsadmin/\n\n-   This means you did not install Laravel Auth(User system)\n-   Can be fixed by the below commands:\n\n```php\n// Laravel 6.x \u0026 Laravel \u003e= 7 \u0026 Laravel \u003e= 8\ncomposer require laravel/ui \u0026\u0026 php artisan ui vue --auth\n// Laravel 5.x, run blow command instead\nphp artisan make:auth \u0026\u0026 php artisan migrate\n```\n\n-   After install the Auth package, please register the first user as the admin\n\n## How to log into the backend /cmsadmin/?\n\n-   Amila CMS use your existing Laravel user system\n-   You need to log in with the FIRST USER of your site (user_id = 1)\n-   You can add more admin users by change the admin_ary in config/laravel-cms.php\n-   If you don't have any existing user, then register a new one via http://your-domain/register\n\n## Why the uploaded image can not display (404 error)\n\n-   You can fix it by creating a storage public link\n-   **php artisan storage:link**\n-   eg. The public/storage should link to ../storage/app/public, if the public/storage is a real folder, you should remove/rename it and run \"php artisan storage:link\" to set up the link.\n\n## Custom the cms route in config/laravel-cms.php\n\n-   **homepage_route**: This is the frontend homepage. By default it is /cms-home, you can change it to / then remove the existing / route in the routes/web.php\n\n```php\n# Change homepage_route to /  in config/laravel-cms.php\n'homepage_route'    =\u003e env('LARAVEL_CMS_HOMEPAGE_ROUTE', '/'),\n\n# Remove the existing / route in the routes/web.php\n\n// Route::get('/', function () {\n//     return view('welcome');\n// });\n```\n\n-   **page_route_prefix**: This is the frontend page prefix. By default it is /cms-, it will match path like /cms-\\*. You can change it to a folder like /xxx/ or anything like xxx-, eg. Page- Article-\n\n```php\n'page_route_prefix' =\u003e env('LARAVEL_CMS_PAGE_PREFIX', '/Article-'),\n```\n\n-   **admin_route**: This is the backend admin page route, By default, it is /cmsadmin\n\n```php\n'admin_route'       =\u003e env('LARAVEL_CMS_BACKEND_ROUTE', '/admin2019'),\n```\n\n-   **After changing the route, you will need to run below commands:**\n\n```php\nphp artisan laravelcms --action=clear\n```\n\n## Display an image with different size in the frontend Laravel .blade.php template file\n\n-   .blade.php Code examples:\n\n```php\n@if ( isset($file_data-\u003emain_image) )\n    \u003cimg src=\"{{$helper-\u003eimageUrl($file_data-\u003emain_image, '1000') }}\" class=\"img-fluid\" /\u003e\n\n    \u003cimg src=\"{{$helper-\u003eimageUrl($file_data-\u003emain_image, '500') }}\" class=\"img-fluid\" /\u003e\n\n    \u003cimg src=\"{{$helper-\u003eimageUrl($file_data-\u003emain_image, 'w', '150') }}\" class=\"img-fluid\" /\u003e\n\n    \u003cimg src=\"{{$helper-\u003eimageUrl($file_data-\u003emain_image, '100', '100') }}\" class=\"img-fluid\" /\u003e\n\n    \u003cimg src=\"{{$helper-\u003eimageUrl($file_data-\u003emain_image, 'original', 'original') }}\" class=\"img-fluid\" /\u003e\n\n@endif\n\n```\n\n-   You can get an image with any width and height. or use the original image.\n-   Available image variables: $file_data-\u003emain_image, $file_data-\u003emain_banner, $file_data-\u003eextra_image, $file_data-\u003eextra_image_2\n-   The CMS will resize the image at the first time, then will directly use it afterwards.\n\n## How to change the CSS \u0026 JS assets of the frontend?\n\n-   The asset files located at public/laravel-cms/\u003ctheme_name\u003e, eg. public/laravel-cms/frontend/css\n-   Example code to load css or js:\n\n```php\n\u003clink rel=\"stylesheet\" href=\"{{ $helper-\u003eassetUrl('css/main.css') }}\"\u003e\n...\n\u003cscript src=\"{{ $helper-\u003eassetUrl('js/bottom.js') }}\"\u003e\u003c/script\u003e\n```\n\n-   The default template file will load CSS and js asset with last_modify_time parameter to avoid cache from the browser\n\n## How to set up a different template theme from the default?\n\n-   Copy the default theme folder /resources/views/laravel-cms/**frontend** to /resources/views/laravel-cms/**new_theme**\n-   Change the frontend_dir in the settings page to **new_theme**\n-   Default value in config/laravel-cms.php\n\n```php\n    'template' =\u003e [\n        'frontend_dir'      =\u003e 'frontend',\n        'backend_dir'       =\u003e 'backend',\n        'backend_language'  =\u003e 'en',\n        'frontend_language' =\u003e 'en',\n    ]\n```\n\n-   run **php artisan config:cache** to load new config file\n-   Change template settings for the pages in the backend\n-   The css/js asset files will locate at public/laravel-cms/**new_theme**\n\n## Set default slug format and suffix for page SEO URL in config/laravel-cms.php\n\n-   You can change it in the settings page\n-   'slug_format' can be from_title, id, pinyin\n-   'slug_suffix' can be anything you want, empty means no suffix\n\n```php\n    'slug_format'   =\u003e 'from_title',\n    'slug_suffix'   =\u003e '.html',\n    'slug_separate' =\u003e '-',\n```\n\n## Use your own PHP class / How to integrate your PHP code into the CMS\n\n-   One simple option is to implement a method from your own PHP controller/class by adding it into a cms page. [Tutorial for it.](https://www.laravelcms.tech/Laravel-Advanced-Override-the-page-content-by-your-PHP-Class-method-function.html \"Use your PHP class in a Laravel CMS page\")\n-   Another option is to create a CMS plugin for your own project and use it for all pages. [A tutorial is here.](https://www.laravelcms.tech/Laravel-Create-your-own-plugin.html \"How to create a Laravel CMS Plugin\") You can also publish the plugin if the feature can be used by other websites.\n\n## How to upgrade the CMS?\n\n-   Run below command in your Laravel project folder\n-   It will ask whether you want to copy the new view, asset and language files to your project\n\n```php\ncomposer require alexstack/laravel-cms \u0026\u0026 php artisan laravelcms --action=upgrade\n```\n\n-   Upgrade screenshot\n\n![image](docs/images/min/laravel-cms-upgrade-min.png)\n\n## ReactJS for backend All Pages list\n\n-   Laravel CMS use ReactJS for backend All Pages list, [the ReactJS source code can be found here](https://github.com/AlexStack/Laravel-CMS/tree/alex_dev/src/resources/reactJs)\n-   The compiled js file is here: /public/laravel-cms/backend/js/reactLaravelCmsBackend.js\n-   It can be switch to normal Laravel blade page by change the \"react_js\": true to false in the setting system.all_pages\n\n## What PHP versions do you support?\n\n-   Amila Laravel CMS passed the basic test on PHP 7.1, 7.2, 7.3, 7.4\n\n## Laravel versions support\n\n-   cms version \u003e= 1.4.4, support all laravel version \u003e= 6.0\n-   cms version \u003c= 1.4.3: support Laravel 5.x, 6.x, 7.x, 8.x\n-   Please install version 1.4.3 if the laravel version is 5.x of an existing project\n\n## How to use PostgreSQL instead of MySql or MariaDB?\n\n-   Make sure the .env changed before run the install command line. An example:\n\n```php\nDB_CONNECTION=pgsql\nDB_HOST=topsy.db.elephantsql.com\nDB_PORT=5432\nDB_DATABASE=oktetra\nDB_USERNAME=oktetra\nDB_PASSWORD=the-postgresql-password\n```\n\n## How to store \u0026 access files on AWS s3?\n\n-   On AWS: Create a s3 bucket and enable it as a Static website hosting, allow all public access and set s3:GetObject Bucket policy, Create an IAM user for api use.\n-   Laravel .env file, set below variables:\n\n    ```php\n    AWS_ACCESS_KEY_ID=\n    AWS_SECRET_ACCESS_KEY=\n    AWS_DEFAULT_REGION=\n    AWS_BUCKET=\n    FILESYSTEM_DRIVER=s3\n    AWS_URL=\n    ```\n\n-   composer require league/flysystem-aws-s3-v3 ^1.0\n-   done\n\n## How to install laravel/jetstream or other ui instead of laravel/ui?\n\n```php\n// Step 1: Install Laravel to folder cms\ncomposer create-project laravel/laravel cmsjet \u0026\u0026 cd cmsjet \u0026\u0026 composer require laravel/jetstream\n\n// Step 2: install jetstream\nphp artisan jetstream:install inertia \u0026\u0026 npm install \u0026\u0026 npm run dev\n\n// Step 3: install CMS in silent mode\ncomposer require alexstack/laravel-cms \u0026\u0026 php artisan laravelcms --locale=en --table_prefix=jet_ --silent=yes\n\n// Step 4: Edit routes/web.php\n- Remove or comment Auth::routes();\n- Change Route::get('/' to Route::get('/welcome'\n- Run command: php artisan laravelcms --action=clear\n\n// Step 5: Now, you can access your cms backend via http://127.0.0.1:9321/cmsadmin/\n// Default admin username: admin@admin.com  password: admin321\n\n```\n\n## How to install it on HeroKu?\n\n-   Local: First, install at your localhost and make sure everything works fine\n-   Local: Create a github repository for the laravelcms folder. eg. cd cms \u0026\u0026 git init \u0026\u0026 git remote add origin https://github.com/xxx.git\n-   Local: Enable gd exif for heroku php: composer require ext-exif ext-gd\n-   On HeroKu: create a new app from this github repository, enable automatically deploy\n-   Local: to use Nginx/apache together with PHP, add a file named Procfile on folder cms with content below:\n    ```php\n    web: vendor/bin/heroku-php-apache2 public/\n    ```\n-   HeroKu: add Dyno formation: web vendor/bin/heroku-php-apache2 public/\n-   HeroKu: add .env variables to settings -\u003e Config Vars\n-   Done\n\n## License\n\n-   The Amila Laravel CMS is open-source software licensed under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlexStack%2FLaravel-CMS","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAlexStack%2FLaravel-CMS","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAlexStack%2FLaravel-CMS/lists"}