redooor/redminportal 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

redooor/redminportal

Composer 安装命令:

composer require redooor/redminportal

包简介

RedminPortal is a backend administrating tool for Content Management and Ecommerce sites.

README 文档

README

alt text

RedminPortal by Redooor

A Laravel 5 package as a backend administrating tool for Content Management and Ecommerce sites. Gives you ability to add, edit and remove category, product, promotions and many more. Provides User Interface for administrating users and groups.

RedminPortal currently supports Laravel 5.8. See Compatibility.

Table of Content

  1. Compatibility
  2. Models and Features
  3. Installation guide for Users
  4. Installation guide for Contributors
  5. Testing
  6. Versioning
  7. Contributing
  8. Creator
  9. License
  10. External Libraries Used
  11. Change log
  12. Upgrade Guide

#Compatibility

Laravel RedminPortal Branch Status
5.8 0.58.x v0.58 Active
5.1 0.3.x v0.3 Inactive
5.0 0.2.x v0.2 Inactive
4.2 0.1.x v0.1 Inactive

The focus of the development will be on branch 0.58, which supports the Laravel version 5.8.

Development for branch v0.1, 0.2, 0.3 and 0.4 has stopped. Please upgrade to later versions.

Important note

Version >=0.3.2 and >=0.2.2 may break your front-end due to the change in UserPricelist. Refer to UPGRADE.md for the upgrading instructions.

Version 0.58 is backward compatible to Version 0.3.

Version 0.3 is backward compatible to Version 0.2.

Version 0.3 and 0.2 are SOMEWHAT backward compatible to Version 0.1. Refer to UPGRADE.md.

Upgrading from v0.1?

We've included a few database migrations to upgrade the database to support v0.2/v0.3/v0.58. However, use this at your own risk. The upgrade scripts were not thoroughly tested and it may not be complete. If you find something missing, please report to us using the issue ticket. We welcome any contribution too.

Refer to UPGRADE.md for the upgrading instructions.

Models and Features

User Management

  • User
  • Group
  • Mailinglist

Content Management

  • Announcement
  • Page
  • Portfolio
  • Post
  • Promotion

Online Store (Physical Products)

  • Bundle
  • Category
  • Coupon
  • Order
  • Product (now supports variations)

Membership Subscription (Digital Products)

  • Bundle
  • Category
  • Coupon
  • Media
  • Membership
  • Module
  • ModuleMediaMembership
  • Order
  • Purchase (deprecated, replaced by Order)
  • Pricelist

Morphs

  • Image
  • Revision (new! Now changes to Orders are tracked)
  • Tag
  • Translation

Traits

  • Permissible
  • Revisionable

Classes

  • File
  • Volume
  • Weight
  • Imagine
  • Redminportal (use as alias in blade template)

Helpers

  • RHelper
  • RImage (replaced by Classes/Imagine, retained for backward compatibility)

Facades

  • Redminportal

Downloadable Reports

  1. Downloadable CSV reports for Purchases and Mailinglist.

Translation options

There is an translation option in Category, Module, Media, Product, Promotion and Portfolio.

You can add more languages in the translation config file at path

vendor\redooor\redminportal\src\config\translation.php

or if you have published it to your root

root\config\packages\redooor\redminportal\translation.php

To use it, get the model's translations and use json_decode to convert content into an object, like this:

foreach ($product->translations as $translation) {
    $lang = $translation->lang;
    $translated = json_decode($translation->content);
    var_dump($translated->name, $translated->short_description, $translated->long_description);
}

Installation guide for Users

You can install Laravel version 5.8 using the command:

composer create-project laravel/laravel myproject 5.8.*
  1. Add Redminportal to composer.json of a new Laravel application, under "require". Like this:

     "require": {
         "laravel/framework": "5.8.*",
         "redooor/redminportal": "0.58.[*|specify a version]"
     },
    

    NOTE:

    It is advisable to specify the minor version (e.g. 0.58.0) so that it's more controlled. Although we try to be as backward compatible as possible, many changes are added into each version, so it may sometimes break your front end code.

  2. Then run php composer update [--prefer-dist] in a terminal.

    Use --prefer-dist to include only essential files (i.e. exclude tests).

  3. Now, edit your [root]\config\app.php providers and alias array like this:

     'providers' => array(
         Illuminate\Foundation\Providers\ArtisanServiceProvider::class,
         ... omitted ...
         
         // Add this line
         Redooor\Redminportal\RedminportalServiceProvider::class,
     ),
    
  4. Then run php composer dump-autoload in a terminal.

  5. Run the following commands in a terminal to perform database migration for Redminportal:

     php artisan vendor:publish --provider="Redooor\Redminportal\RedminportalServiceProvider" --tag="migrations" [--force]
    
     php artisan migrate --path=/database/migrations/vendor/redooor/redminportal
    

    CAUTION: using --force will overwrite existing files

  6. Run the following in a terminal to seed the database with initial admin username and password:

     php artisan db:seed --class="RedminSeeder"
     
     Username/password: admin@admin.com/admin
    
  7. Publish package assets by running this in a terminal:

     php artisan vendor:publish --provider="Redooor\Redminportal\RedminportalServiceProvider" --tag="public" [--force]
    

    CAUTION: using --force will overwrite existing files

  8. Publish package config by running this in a terminal:

     php artisan vendor:publish --provider="Redooor\Redminportal\RedminportalServiceProvider" --tag="config" [--force]
    

    CAUTION: using --force will overwrite existing files

    IMPORTANT:

    The package will append neccesary guards and providers to your auth config. If you've added a guard with the same name as redminguard and provider as redminprovider, they'll be replaced by the package's setting.

    If you're going to use your own auth config but would like to use Redminportal for authentication, you need to add the a guard in your auth config as below:

    'defaults' => [
        'guard' => 'web', // or it could be 'redminguard'
        'passwords' => 'redminpasswords',
    ],
    
    'guards' => [
        'redminguard' => [
            'driver' => 'session',
            'provider' => 'redminprovider',
        ],
        'web' => [
            'driver' => 'session',
            'provider' => 'redminprovider',
        ],
    ],
    
    'providers' => [
        'redminprovider' => [
            'driver' => 'eloquent',
            'model' => Redooor\Redminportal\App\Models\User::class,
        ],
    ],
    
    'passwords' => [
        'redminpasswords' => [
            'provider' => 'redminprovider',
            'email' => 'auth.emails.password',
            'table' => 'password_resets',
            'expire' => 60,
        ],
    ],
    
  9. Optional: Publish package views by running this in a terminal:

    Only do this if you want to modify Redminportal views without editing the source code.

     php artisan vendor:publish --provider="Redooor\Redminportal\RedminportalServiceProvider" --tag="views" [--force]
    

    CAUTION: using --force will overwrite existing files

Installation guide for Contributors

It is recommended that contributors use Laravel Homestead for development because it will provide the same development environment for all of us. Read more about Laravel Homestead here.

For Mac users, you may want to try out Laravel Herd.

  1. Install Laravel 5.8 using this guide. We'll call this the [root].

You can install Laravel version 5.8 using the command:

composer create-project laravel/laravel myproject 5.8.*
  1. Create a folder named "packages" inside the [root] folder.

  2. Clone the Redooor\Redminportal repository into [root]\packages\redooor\redminportal folder.

  3. Open a terminal, cd to [root]\packages\redooor\redminportal folder then run:

    composer update --prefer-dist -vvv --profile

  4. Then add Redooor\Redminportal source to [root]'s composer.json under "autoload" like this:

     "autoload": {
         "classmap": [
             "database"
         ],
         "psr-4": {
             "App\\": "app/",
             "Redooor\\Redminportal\\": "packages/redooor/redminportal/src"
         }
     },
    
  5. Then cd to [root]'s folder and run:

    composer update --prefer-dist -vvv --profile --no-dev

    NOTE: the [root]'s phpunit dependency will clash with the package's phpunit. "--no-dev" ensures that it is not installed on [root]. You can also choose to remove phpunit from require inside the [root]'s composer.json.

  6. Now, edit your [root]\config\app.php providers and alias array like this:

     'providers' => array(
         Illuminate\Foundation\Providers\ArtisanServiceProvider::class,
         ... omitted ...
         
         // Add this line
         Redooor\Redminportal\RedminportalServiceProvider::class,
     ),
    
  7. Run the following commands in a terminal to perform database migration for Redminportal inside the [root] folder:

     php artisan vendor:publish --provider="Redooor\Redminportal\RedminportalServiceProvider" --tag="migrations" [--force]
    
     php artisan migrate --path=/database/migrations/vendor/redooor/redminportal
    

    CAUTION: using --force will overwrite existing files

  8. Run the following in a terminal to seed the database with initial admin username and password:

     php artisan db:seed --class="RedminSeeder"
     
     Username/password: admin@admin.com/admin
    
  9. Publish package assets by running this in a terminal:

    php artisan vendor:publish --provider="Redooor\Redminportal\RedminportalServiceProvider" --tag="public" [--force]
    

    CAUTION: using --force will overwrite existing files

  10. Publish package config by running this in a terminal:

    php artisan vendor:publish --provider="Redooor\Redminportal\RedminportalServiceProvider" --tag="config" [--force]
    

    CAUTION: using --force will overwrite existing files

  11. Optional: Publish package views by running this in a terminal:

    Only do this if you want to modify Redminportal views without editing the source code.

    php artisan vendor:publish --provider="Redooor\Redminportal\RedminportalServiceProvider" --tag="views" [--force]
    

    CAUTION: using --force will overwrite existing files

Install Grunt and Bower dependencies

  1. You need to have nodejs installed
  2. cd to packages/redooor/redminportal
  3. Run npm install
  4. Run bower install
  5. To build all assets, run grunt
  6. To compile just the less css, run grunt less-compile

Testing

  • In packages\redooor\redminportal folder, run

      composer update --prefer-dist -vvv --profile
      
      vendor/bin/phpunit
    

    NOTE: If you run out of memory while running the full tests, try running the tests by sub-folders.

      vendor/bin/phpunit tests/models/
      
      vendor/bin/phpunit tests/controllers/
      
      vendor/bin/phpunit tests/relationships/
    
      ./vendor/bin/phpunit --testsuite "suite1","suite2"
      
      ./vendor/bin/phpunit --testsuite "suite3","suite4"
    

Versioning

For transparency into our release cycle and in striving to maintain backward compatibility, Redooor RedminPortal will adhere to the Semantic Versioning guidelines whenever possible.

Contributing

Thank you for considering contributing to RedminPortal. Before any submission, please spend some time reading through the CONTRIBUTING.md document.

Creator

Andrews Ang

License

RedminPortal is open-sourced software licensed under the MIT license.

External Libraries Used

Change log

Refer to CHANGELOG.md

Upgrade Guide

Refer to UPGRADE.md

redooor/redminportal 适用场景与选型建议

redooor/redminportal 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 597 次下载、GitHub Stars 达 43, 最近一次更新时间为 2014 年 08 月 04 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「package」 「ecommerce」 「backend」 「laravel」 「portal」 「redooor」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 redooor/redminportal 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 redooor/redminportal 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 597
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 43
  • 点击次数: 5
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 43
  • Watchers: 8
  • Forks: 17
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-08-04