定制 larams/cms 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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 .env file (if file is missing create one from .env.example)

  • Delete docker-compose.yml file (it is used for Laravel Sail)

  • Delete migrations from database/migrations from year 2014

  • php artisan vendor:publish and select [10] ....\LaramsServiceProvider

  • composer dump-autoload

  • Modify docker/httpd/vhosts.conf and change ServerName variables to match your XDEBUG_SERVER_NAME variable 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 public folder, create bower.json with content below and run bower 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::class in config/auth.php

  • Go to /admin link and try logging in with "dev" user and generated password

  • php artisan passport:install

  • Change config/auth.php guards.api.driver to passport

Docker setup on remote server

  • Delete storage/.. and docker/.. folders in .rsync-exclude
  • Run autosync {project_folder}
  • Run xdebug
  • Enter project folder /srv/www/{project_folder}
  • Run docker-compose up -d
  • Restore .rsync-exclude to 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 .env file (if file is missing create one from .env.example)
  • php artisan key:generate
  • 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
  • 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.php for title page
  • Create resources/views/types/text.blade.php for each content type you need
  • You may use app/Providers/LayoutServiceProvider.php for common stuff that is used in layout

Sass

  • webpack.mix.js change postCss to sass
  • npm i sass-loader --save
  • npm 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 我们能提供哪些服务?
定制开发 / 二次开发

基于 larams/cms 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 6.71k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 13
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-05-22