承接 ankurk91/laravel-alert 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

ankurk91/laravel-alert

最新稳定版本:2.10.0

Composer 安装命令:

composer require ankurk91/laravel-alert

包简介

A Bootstrap alert helper for Laravel php framework

README 文档

README

GitHub tag Packagist Downloads License tests codecov

A Bootstrap CSS alert helper for Laravel

Installation

You can install the package via composer:

composer require "ankurk91/laravel-alert"

Include the alert view within your view blade templates.

@include('alert::bootstrap')

Usage examples

You can use facade.

<?php
use Ankurk91\LaravelAlert\Facades\Alert;

Alert::error('Something went wrong.');
Alert::danger('I am same as error.');
Alert::success('Contact saved.');
Alert::warning('You are running late.');
Alert::info('Order dispatched.');

There is also a global helper function if you prefer.

<?php

alert()->info('Use anywhere without facade.');

alert('You can use the <b>html</b> tags like this too.', 'danger');

BootstrapVue support

The package include the template to support bootstrap vue alert component.

Import the required javascript components.

// resources/js/bootstrap.js
import {AlertPlugin} from 'bootstrap-vue'

Vue.use(AlertPlugin)

Update your blade template like:

@include('alert::bootstrapVue')

Alpine.js support

Add alpine.js script to your blade template

# use a CDN or install via npm
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.8/dist/cdn.min.js"></script>

Update your blade template like:

@include('alert::bootstrapAlpine')

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

composer test

Security

If you discover any security issues, please email pro.ankurk1[at]gmail[dot]com instead of using the issue tracker.

Attribution

Original code taken from vinkla/laravel-alert

License

The MIT License.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-09-03