定制 sequelone/songs-crud 二次开发

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

邮箱: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.

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固