illegal/laravel-utils 问题修复 & 功能扩展

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

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

illegal/laravel-utils

最新稳定版本:v1.2

Composer 安装命令:

composer require illegal/laravel-utils

包简介

Laravel Utils is a collection of useful tools for Laravel.

README 文档

README

This repository contains a collection of useful classes and traits for Laravel.

It is used mainly for illegal studio projects.

HasPrefix

This traits can be used to add a prefix to your model's table name.

class MyModel extends Model
{
    use HasPrefix;
    
    protected $prefix = 'my_prefix_';
}

Alternatively you can use the getPrefix method to set the prefix.

This is useful if you want to set the prefix dynamically.

class MyModel extends Model
{
    use HasPrefix;
    
    public function getPrefix()
    {
        return config('my.prefix');
    }
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-03-28