ilbronza/crud 问题修复 & 功能扩展

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

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

ilbronza/crud

最新稳定版本:2.1

Composer 安装命令:

composer require ilbronza/crud

包简介

:crud_manager

README 文档

README

Latest Version on Packagist Total Downloads Build Status StyleCI

This is where your description should go. Take a look at contributing.md to see a to do list.

Installation

Before install media library (https://github.com/spatie/laravel-medialibrary)

Before install spatie permissions (https://github.com/spatie/laravel-medialibrary)

Before install activity log (https://spatie.be/docs/laravel-activitylog/v4/introduction) USE php artisan vendor:publish to publish activity-log migrations and config. Installation is bugged

Via Composer

$ composer require ilbronza/crud
$ php artisan notifications:table
$ php artisan migrate

$ php artisan vendor:publish --tag=crud-migrations
$ php artisan migrate

on config/media-library.php

    'media_model' => IlBronza\CRUD\Models\Media::class,
    'path_generator' => IlBronza\CRUD\Helpers\MediaPathGenerator::class,

on app.js and then run npm

	require('./ilBronza.crud.js');

Usage

Relazioni

creare un getter con i possibili valori di relazione in un select

	public function getPossiblePaymenttypesValuesArray() : array
	{
		return Paymenttype::getProjectClassName()::all()->pluck('name', 'id')->toArray();
	}

RelationshipsManager

Gestisce il display delle relazioni in una pagina di dettaglio, tipicamente Show o Edit

Dichiarazione

<?php

class QuotationRelationManager Extends RelationshipsManager
{
	public  function getAllRelationsParameters() : array
	{
		return [
			'show' => [
				'relations' => [
				
				# dichiarazione complessa, dove vengono specificati parametri aggiuntivi oltre al controller
				    'quotationrows' => [
                                        'controller' => config('products.models.quotationrow.controllers.index'),
                                        'elementGetterMethod' => 'getQuotationrowsForShowRelation',

                                        #alternativo a fieldsGroups
                                        'fieldsGroupsParametersFile' => config('products.models.quotationrow.fieldsGroupsFiles.byQuotation'),

                                        #alternativo a fieldsGroupsParametersFile
                                        'fieldsGroups' => [
                                            'base' => [
                                                'translationPrefix' => 'operators::fields',
                                                'fields' =>
                                                    [
                                                        'mySelfPrimary' => 'primary',
                                                        'mySelfEdit' => 'links.edit',
                                                        'contracttype.name' => 'flat',
                            
                                                        'internal_approval_rating' => 'flat',
                                                        'level' => 'flat',
                            
                                                        'cost_company_day' => 'flat',
                                                        'cost_gross_day' => 'flat',
                                                        'cost_neat_day' => 'flat',
                            
                                                        'mySelfDelete' => 'links.delete'
                                                    ]
                                            ]
                                        ]

                                    ],

				# dichiarazione semplice in cui si specifica solo il controller di Show
					'project' => config('products.models.project.controllers.show'),

				# dichiarazione semplice in cui si specifica solo il controller di Index, che si occupa
				# di impostare i fieldsgroup tramite il suo metodo "getRelatedFieldsArray"
					'dossiers' => config('filecabinet.models.dossier.controllers.index'),
				]
			]
		];
	}
}```


## Change log

Please see the [changelog](changelog.md) for more information on what has changed recently.

## Testing

``` bash
$ composer test

Contributing

Please see contributing.md for details and a todolist.

Security

If you discover any security related issues, please email author email instead of using the issue tracker.

Credits

License

license. Please see the license file for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-03-26