sequelone/songs-crud 问题修复 & 功能扩展

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

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

sequelone/songs-crud

Composer 安装命令:

composer require sequelone/songs-crud

包简介

An admin panel for music, using Backpack\CRUD on Laravel 5.

README 文档

README

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

This package adds sections to the admin panel for creating a music portal. The scope of application is huge. From small labels to distributors.

Installation

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

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

  1. In your terminal, run:
composer require sequelone/songs-crud
  1. Publish the migration:
php artisan vendor:publish --provider="SequelONE\SongsCRUD\SongsCRUDServiceProvider"
  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:
<!-- Songs -->
<li class="nav-item nav-dropdown">
    <a class="nav-link nav-dropdown-toggle" href="#"><i class="nav-icon la la-diamond"></i>{{ trans('songs-crud::songscrud.music') }}</a>
    <ul class="nav-dropdown-items">
        <li class="nav-item"><a class="nav-link" href="{{ backpack_url('songs/releases') }}"><i class="nav-icon la la-microphone"></i> {{ trans('songs-crud::songscrud.releases') }}</a></li>
        <li class="nav-item"><a class="nav-link" href="{{ backpack_url('songs/labels') }}"><i class="nav-icon la la-star"></i> {{ trans('songs-crud::songscrud.labels') }}</a></li>
        <li class="nav-item"><a class="nav-link" href="{{ backpack_url('songs/artists') }}"><i class="nav-icon la la-users"></i> {{ trans('songs-crud::songscrud.artists') }}</a></li>
        <li class="nav-item"><a class="nav-link" href="{{ backpack_url('songs/types') }}"><i class="nav-icon la la-check-square-o"></i> {{ trans('songs-crud::songscrud.types') }}</a></li>
        <li class="nav-item"><a class="nav-link" href="{{ backpack_url('songs/genres') }}"><i class="nav-icon la la-list-ul"></i> {{ trans('songs-crud::songscrud.genres') }}</a></li>
        <li class="nav-item"><a class="nav-link" href="{{ backpack_url('songs') }}"><i class="nav-icon la la-music"></i> {{ trans('songs-crud::songscrud.tracks') }}</a></li>
    </ul>
</li>
  1. [optional] If you need the browse field to upload images, please install Laravel-Backpack/FileManager.

Extra Field Type

Shortlink

Generates short links by click. You can add a new field type.

$this->crud->addField([
    'name' => 'shortlink',
    'label' => 'Shortlink (URL)',
    'type' => 'shortlink',
    'generate' => 'small_alphanumeric',
    'length' => 4,
    'hint' => 'Will be automatically generated from your name, if left empty.',
]);

The length parameter is responsible for the length of the generated short link.

Example:

'generate' => 'small_alphanumeric',
'length' => 4,

Output:

d2f8

Available options for the generate parameter.

# Variable Type
1 global 0123456789abcdefghijklmnopqrstuvwxyz!@#$%^&*()ABCDEFGHIJKLMNOPQRSTUVWXYZ
2 numeric 0123456789
3 small abcdefghijklmnopqrstuvwxyz
4 small_alphanumeric 0123456789abcdefghijklmnopqrstuvwxyz
5 big ABCDEFGHIJKLMNOPQRSTUVWXYZ
6 big_alphanumeric 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ
7 special !@#$%^&*()

Upload Tracks

$this->crud->addField([
    'name' => 'shortlink',
    'label' => 'Shortlink (URL)',
    'type' => 'shortlink',
    'generate' => 'small_alphanumeric',
    'length' => 4,
    'hint' => 'Will be automatically generated from your name, if left empty.',
]);

Add in /config/filesystems.php

        'uploads' => [
            'driver' => 'local',
            'root'   => storage_path('uploads'), // that's where your backups are stored by default: storage/uploads
        ],

        'tracks' => [
            'driver' => 'local',
            'root'   => storage_path('uploads/tracks'), // that's where your backups are stored by default: storage/uploads
        ],

        'covers' => [
            'driver' => 'local',
            'root'   => storage_path('uploads/tracks/covers'), // that's where your backups are stored by default: storage/uploads
        ],

Console

This command updates the database with the default release formats. You can use this command if you don't want to insert your data into the table.

php artisan songscrud:types

Executing this command loads all genres.

php artisan songscrud:genres

WARNING! ACHTUNG! ВНИМАНИЕ!

Executing this command completely clears the songs_types and songs_genres tables.

php artisan songscrud:clear

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/songscrud.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.

Credits

License

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

sequelone/songs-crud 适用场景与选型建议

sequelone/songs-crud 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3 次下载、GitHub Stars 达 1, 最近一次更新时间为 2022 年 06 月 28 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

围绕 sequelone/songs-crud 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: proprietary
  • 更新时间: 2022-06-28