larams/cms
Composer 安装命令:
composer require larams/cms
包简介
Larams - Content Management System for Laravel 5+
README 文档
README
Installation
There are two ways to create new project. If you just create new git repository start with clean installation. If you have cloned from git repo with existing sources continue with the second method.
1. Clean installation
You might need to add COMPOSER_MEMORY_LIMIT=-1 before all composer commands
-
composer create-project --prefer-dist laravel/laravel {{project_folder}} -
composer require larams/cms -
Enter DB logins in
.envfile (if file is missing create one from.env.example) -
Delete
docker-compose.ymlfile (it is used for Laravel Sail) -
Delete migrations from
database/migrationsfrom year 2014 -
php artisan vendor:publishand select[10] ....\LaramsServiceProvider -
composer dump-autoload -
Modify
docker/httpd/vhosts.confand changeServerNamevariables to match yourXDEBUG_SERVER_NAMEvariable in .env file -
If you are using docker on remote server, follow guide below
-
Create empty database with Sequel Pro or any other tool
-
php artisan migrate -
php artisan db:seed --class=StructureTypeSeeder -
php artisan db:seed --class=PermissionsTableSeeder -
php artisan db:seed --class=UsersTableSeeder -
php artisan db:seed --class=StructureItemSeeder -
If you need admin interface: Go to
publicfolder, createbower.jsonwith content below and runbower install -
If you are using standard cms: Add cms middleware classes for "web" in
app/Http/Kernel.php\Larams\Cms\Http\Middleware\LocaleDetection::class, \Larams\Cms\Http\Middleware\LayoutBuilder::class -
Add middlewares to routeMiddleware
'auth.user' => \App\Http\Middleware\Authenticate::class, 'auth.admin' => \App\Http\Middleware\Authenticate::class, 'auth.custom' => \Larams\Cms\Http\Middleware\AuthenticateApi::class, -
Change user model to
\Larams\Cms\Model\User::classinconfig/auth.php -
Go to /admin link and try logging in with "dev" user and generated password
-
php artisan passport:install -
Change
config/auth.phpguards.api.driver topassport
Docker setup on remote server
- Delete
storage/..anddocker/..folders in.rsync-exclude - Run
autosync {project_folder} - Run
xdebug - Enter project folder
/srv/www/{project_folder} - Run
docker-compose up -d - Restore
.rsync-excludeto its previous state - Run
docker exec -it {container_name} bash - Return to previous list where you left off and continue with next commands in docker
2. When cloning git repository
- Clone files
- Enter project folder and run
composer install --no-scripts - Enter DB logins in
.envfile (if file is missing create one from.env.example) php artisan key:generatephp artisan migratephp artisan db:seed --class=StructureTypeSeederphp artisan db:seed --class=PermissionsTableSeederphp artisan db:seed --class=UsersTableSeederphp artisan db:seed --class=StructureItemSeeder- Go to root project folder and run
npm install - Go to sample.domain.com/admin link and try logging in with "dev" user and standard password
Additional .env variables
CONTAINER_NAME_API=server-api
CONTAINER_NAME_DB=server-db
MYSQL_CONTAINER_PORT=3306
MYSQL_ROOT_PASSWORD=
XDEBUG_HOST=docker.for.mac.localhost # Used for mac
XDEBUG_HOST=172.17.0.1 # Used for docker in remote server
XDEBUG_SERVER_NAME=api.dev.domain.lt
Usage
- Create
resources/views/index.blade.phpfor title page - Create
resources/views/types/text.blade.phpfor each content type you need - You may use app/Providers/LayoutServiceProvider.php for common stuff that is used in layout
Sass
webpack.mix.jschangepostCsstosassnpm i sass-loader --savenpm i sass --save
Bower.json
{
"name": "bower_components",
"authors": [
"Tomas Talandis <tomas@talandis.lt>"
],
"description": "",
"main": "",
"moduleType": [],
"license": "MIT",
"homepage": "",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"bootstrap": "~3.3.5",
"bootstrap-datepicker": "~1.5.0",
"ckeditor": "~4.5.4",
"dropzone": "~4.2.0",
"jquery": "~2.1.4",
"jquery-ui": "~1.11.4",
"jstree": "~3.2.1",
"slick-carousel": "^1.8.1",
"chosen": "^1.8.7"
}
}
larams/cms 适用场景与选型建议
larams/cms 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 6.71k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2020 年 05 月 22 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 larams/cms 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 larams/cms 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 6.71k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 13
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-05-22