定制 hacoidev/newscrud 二次开发

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

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

hacoidev/newscrud

最新稳定版本:1.0.0

Composer 安装命令:

composer require hacoidev/newscrud

包简介

An admin panel for news with categories and tags, using Backpack\CRUD on Laravel 5.

README 文档

README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

An admin panel for news articles on Laravel 5-9, using Backpack\CRUD. Write articles, with categories and tags.

Security updates and breaking changes

Please subscribe to the Backpack Newsletter so you can find out about any security updates, breaking changes or major features. We send an email every 1-2 months.

Requirements

This package requires both backpack/crud but also backpack/pro (the paid addon). If you do NOT have access to backpack/pro you can purchase it here. Alternatively, you can use the installation method (A), then:

  • remove all PRO features;
  • replace PRO fields with FREE fields;

Installation

Since NewsCRUD is just a Backpack\CRUD example, you can choose to install it one of two ways.

(A) Download and place files in your application (recommended; remember to also composer require cviebrock/eloquent-sluggable)

or

(B) As a package

The only PRO of installing it as a package is that you may benefit from updates. But the reality is there is very little (if any) bug fixing to do, so you probably won't need to update it, ever.

Installation type (A) - download

  1. Download the latest build.

  2. Paste the 'app' and 'database' folders over your projects (merge them). No file overwrite warnings should come up.

  3. Replace all mentions of 'Backpack\NewsCRUD\app' in the pasted files with your application's namespace ('App' if you haven't changed it):

  • app/Http/Controllers/Admin/ArticleCrudController.php
  • app/Http/Controllers/Admin/CategoryCrudController.php
  • app/Http/Controllers/Admin/TagCrudController.php
  • app/Http/Requests/ArticleRequest.php
  • app/Http/Requests/CategoryRequest.php
  • app/Http/Requests/TagRequest.php
  • app/Models/Article.php
  • app/Models/Category.php
  • app/Models/Tag.php
  1. Run the migration to have the database table we need:
php artisan migrate
  1. Add NewsCRUD to your routes file:
Route::group(['prefix' => config('backpack.base.route_prefix', 'admin'), 'middleware' => ['web', 'auth'], 'namespace' => 'Admin'], function () {
    // Backpack\NewsCRUD
    Route::crud('article', 'ArticleCrudController');
    Route::crud('category', 'CategoryCrudController');
    Route::crud('tag', 'TagCrudController');
});
  1. [optional] Add a menu item for it in resources/views/vendor/backpack/base/inc/sidebar.blade.php or menu.blade.php:
<li class="nav-item nav-dropdown">
    <a class="nav-link nav-dropdown-toggle" href="#"><i class="nav-icon la la-newspaper-o"></i>News</a>
    <ul class="nav-dropdown-items">
      <li class="nav-item"><a class="nav-link" href="{{ backpack_url('article') }}"><i class="nav-icon la la-newspaper-o"></i> Articles</a></li>
      <li class="nav-item"><a class="nav-link" href="{{ backpack_url('category') }}"><i class="nav-icon la la-list"></i> Categories</a></li>
      <li class="nav-item"><a class="nav-link" href="{{ backpack_url('tag') }}"><i class="nav-icon la la-tag"></i> Tags</a></li>
    </ul>
</li>
  1. [optional] If you need the browse field to upload images, please install Laravel-Backpack/FileManager.

Installation type (B) - package

  1. In your terminal, run:
composer require backpack/newscrud
  1. Publish the migration:
php artisan vendor:publish --provider="Backpack\NewsCRUD\NewsCRUDServiceProvider"
  1. Run the migration to have the database table we need:
php artisan migrate
  1. [optional] Add a menu item for it in resources/views/vendor/backpack/base/inc/sidebar.blade.php or menu.blade.php:
<li class="nav-item nav-dropdown">
    <a class="nav-link nav-dropdown-toggle" href="#"><i class="nav-icon la la-newspaper-o"></i>News</a>
    <ul class="nav-dropdown-items">
      <li class="nav-item"><a class="nav-link" href="{{ backpack_url('article') }}"><i class="nav-icon la la-newspaper-o"></i> Articles</a></li>
      <li class="nav-item"><a class="nav-link" href="{{ backpack_url('category') }}"><i class="nav-icon la la-list"></i> Categories</a></li>
      <li class="nav-item"><a class="nav-link" href="{{ backpack_url('tag') }}"><i class="nav-icon la la-tag"></i> Tags</a></li>
    </ul>
</li>
  1. [optional] If you need the browse field to upload images, please install Laravel-Backpack/FileManager.

Change log

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Overwriting functionality

If you need to modify how this works in a project:

  • create a routes/backpack/newscrud.php file; the package will see that, and load your routes file, instead of the one in the package;
  • create controllers/models that extend the ones in the package, and use those in your new routes file;
  • modify anything you'd like in the new controllers/models;

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Security

If you discover any security related issues, please email tabacitu@backpackforlaravel.com instead of using the issue tracker.

Please subscribe to the Backpack Newsletter so you can find out about any security updates, breaking changes or major features. We send an email every 1-2 months.

Credits

License

Backpack is free for non-commercial use and 49 EUR/project for commercial use. Please see License File and backpackforlaravel.com for more information.

Hire us

We've spend more than 10.000 hours creating, polishing and maintaining administration panels on Laravel. We've developed e-Commerce, e-Learning, ERPs, social networks, payment gateways and much more. We've worked on admin panels so much, that we've created one of the most popular software in its niche - just from making public what was repetitive in our projects.

If you are looking for a developer/team to help you build an admin panel on Laravel, look no further. You'll have a difficult time finding someone with more experience & enthusiasm for this. This is what we do. Contact us - let's see if we can work together.

hacoidev/newscrud 适用场景与选型建议

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

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

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: proprietary
  • 更新时间: 2022-08-15