如何在Sweet Alert和laravel中添加2个链接?

时间:2019-07-29 13:59:41

标签: laravel laravel-5 laravel-5.8

如何在Sweet Alert和laravel中添加2个链接?

我想在甜蜜警报中添加2个链接。但我看到这张照片。

sweet alert

alert()->warning("You must register now.<br>", 'OK')->html()->persistent("<a href='http://localhost:8000/register' class='btn btn-primary'>register</a><a href='http://localhost:8000/login' class='btn btn-primary'>login</a>");

如何在甜蜜提醒中添加登录和注册按钮。

1 个答案:

答案 0 :(得分:0)

如果您使用

uxweb/sweet-alert

尝试

var myArray = [
    {"ID": 1, "Cost": 200},
    {"ID": 2, "Cost": 1000},
    {"ID": 3, "Cost": 50},
    {"ID": 4, "Cost": 500}
]

const minimumCostItem = _.minBy(myArray, "Cost");

console.log("Minimum cost item: ", minimumCostItem);

// Getting the maximum using a functional iteratee
const maximumCostItem = _.maxBy(myArray, function(entry) {
  return entry["Cost"];
});

console.log("Maximum cost item: ", maximumCostItem);