定制 tonning/flashable 二次开发

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

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

tonning/flashable

Composer 安装命令:

composer require tonning/flashable

包简介

A simple trait to flash when model events are fired, like `created`, `updated`, and `saved`.

README 文档

README

A simple trait to flash when model events are fired, like created, updated, and saved. Using Jeffrey Way's excellent Flash package to actually display the flash messages.

Installation

Begin by pulling in the package through Composer.

composer require tonning/flashable

Then add the trait to the model you want to automatically flash on crud actions.

use Tonning\Flashable\Flashable;

class Post extends Model
{
    use Flashable;
    
    ...
}

Customization

You can specify the name of the model by adding a getModelName method on you model.

public function getModelName() {
  return 'Blog post';
}

For even more fine grain control you can add a protected property on the model.

protected $flashable = [
  'created' => 'Your blog post have been created. Good job!',
  'updated' => 'I hope nobody saw those mistakes...',
  'deleted' => 'Be gone blog post!'
]

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-09-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固