定制 rdj/flash-me-php-7-1-3 二次开发

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

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

rdj/flash-me-php-7-1-3

Composer 安装命令:

composer require rdj/flash-me-php-7-1-3

包简介

Simple flash alert for Laravel

README 文档

README

FlashMe Flash Alert for Laravel, Elegant, responsive, flexible and lightweight notification plugin with no dependencies, simple and easy to use

Getting Started

How to use this packages

Installing

composer require ken/flash-me

and

php artisan vendor:publish --tag="flashMe"

Optional Setting

config/flash_me.php

/**
 * Change this /path if you load assets from local
 * example 'css' => asset('/css/app.css'),
 */
return [
	'css' => 'https://cdnjs.cloudflare.com/ajax/libs/izitoast/1.1.5/css/iziToast.min.css',
	'js' => 'https://cdnjs.cloudflare.com/ajax/libs/izitoast/1.1.5/js/iziToast.min.js',
];

resources/lang/en/flash_me.php

return [
	'success' => [
		'type' => 'success',
		'title' => 'Hi...',
		'message' => 'FlashMe is Ready!',
		'options' => [
			'position' => 'topRight', // this is an example option, you can add another option
			'transitionIn' => 'bounceInLeft',
    			'transitionOut' => 'fadeOut',
		],
	],
	'info' => [
		'type' => 'info',
		'title' => 'Hi...',
		'message' => 'FlashMe is Ready!',
		'options' => [
			'position' => 'topRight', // this is an example option, you can add another option
			'transitionIn' => 'bounceInLeft',
    			'transitionOut' => 'fadeOut',
		],
	],
	'warning' => [
		'type' => 'warning',
		'title' => 'Hi...',
		'message' => 'FlashMe is Ready!',
		'options' => [
			'position' => 'topRight', // this is an example option, you can add another option
			'transitionIn' => 'bounceInLeft',
    			'transitionOut' => 'fadeOut',
		],
	],
	'error' => [
		'type' => 'error',
		'title' => 'Hi...',
		'message' => 'FlashMe is Ready!',
		'options' => [
			'position' => 'topRight', // this is an example option, you can add another option
			'transitionIn' => 'bounceInLeft',
    			'transitionOut' => 'fadeOut',
		],
	],
];

other options can use

	id: null, 
	class: '',
	title: '',
	titleColor: '',
	titleSize: '',
	titleLineHeight: '',
	message: '',
	messageColor: '',
	messageSize: '',
	messageLineHeight: '',
	backgroundColor: '',
	theme: 'light', // dark
	color: '', // blue, red, green, yellow
	icon: '',
	iconText: '',
	iconColor: '',
	image: '',
	imageWidth: 50,
	maxWidth: null,
	zindex: null,
	layout: 1,
	balloon: false,
	close: true,
	closeOnEscape: false,
	rtl: false,
	position: 'bottomRight', // bottomRight, bottomLeft, topRight, topLeft, topCenter, bottomCenter, center
	target: '',
	targetFirst: true,
	toastOnce: false,
	timeout: 5000,
	animateInside: true,
	drag: true,
	pauseOnHover: true,
	resetOnHover: false,
	progressBar: true,
	progressBarColor: '',
	progressBarEasing: 'linear',
	overlay: false,
	overlayClose: false,
	overlayColor: 'rgba(0, 0, 0, 0.6)',
	transitionIn: 'fadeInUp',
	transitionOut: 'fadeOut',
	transitionInMobile: 'fadeInUp',
	transitionOutMobile: 'fadeOutDown',

Usage

How to use if you will send flash alert to view? example if this is controller on your project

public function testFlash()
{
	flashMe()->success();
	return view('your_view');
}

Another function

flashMe()->success();
flashMe()->info();
flashMe()->warning();
flashMe()->error();

Display

you can display on your master template or single blade, before end of body tag

@if (flashMe()->ok())
  {!! flashMe_flash() !!}
@endif

Built With

Demo

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-10-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固