定制 mahmoud-mhamed/laravel-helpers 二次开发

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

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

mahmoud-mhamed/laravel-helpers

最新稳定版本:0.1.3

Composer 安装命令:

composer require mahmoud-mhamed/laravel-helpers

包简介

This is my package laravel-helpers

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

Support us

We invest a lot of resources into creating best in class open source packages. support us by buying one of our paid products.

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.

Installation

install the package via composer:

composer require mahmoud-mhamed/laravel-helpers

Before Use Any Command

for laravel < 11

must add to config -> app -> providers array
  \Mahmoudmhamed\LaravelHelpers\Providers\PackageServiceProvider::class

for laravel >= 11

must add to config -> app.php
  'providers' => ServiceProvider::defaultProviders()->merge([
        \Mahmoudmhamed\LaravelHelpers\Providers\PackageServiceProvider::class,
    ])->toArray()

to force publish any file add --force to command

publish command create builder:

php artisan vendor:publish --tag="command-create-builder" 

Example

php artisan make:builder ModelName 

publish command create service:

php artisan vendor:publish --tag="command-make-service" 

publish command make New Enum File:

php artisan vendor:publish --tag="command-create-enum" 

Example

php artisan make:enum FileName
php artisan make:enum FileName --model=Product

publish base model File:

php artisan vendor:publish --tag="base-model" 

publish base date text trait:

php artisan vendor:publish --tag="date-text-trait" 

publish paginatable-trait :

php artisan vendor:publish --tag="paginatable-trait" 

publish UseTranslationsTrait : work with spatie laravel translatable to append attribute for translation column

php artisan vendor:publish --tag="model-column-translation-trait" 

publish morph model trigger trait:

php artisan vendor:publish --tag="morph-model-trigger-trait" 

Table columns

$table->nullableMorphs('created_by');
$table->nullableMorphs('updated_by');
$table->nullableMorphs('deleted_by');
$table->softDeletes();

publish trans-lang-file-command:

composer require datlechin/laravel-google-translate
php artisan vendor:publish --tag="trans-lang-file-command" 

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-01-13