Laravel松树通知按钮不起作用

时间:2013-08-15 21:25:58

标签: jquery laravel laravel-4

我成功地将Pines Notify整合到Laravel 4中。

第一个问题:

通知没有删除按钮。

以下是代码示例:

     @if ($message = Session::get('success'))

  $.pnotify({
    title: 'Success!',
    text: '{{ $message }}',
    type: 'info',
    icon: false
  });

@endif

第二个问题:

其次,我已经在Pines Notify网站上查看了一些堆栈。我如何在Laravel中使用它们?我尝试过类似的东西,但它不起作用:

     @if ($message = Session::get('success'))

  $.pnotify({
    function show_stack_bottomleft(type) {
    title: 'Success!',
    text: '{{ $message }}',
    type: 'info',
    icon: false
  }
  });

@endif

1 个答案:

答案 0 :(得分:0)

首先,

@if ($message == Session::get('success'))

  $.pnotify({
    title: 'Success!',
    text: '{{ $message }}',
    type: 'info',
    icon: false
  });

@endif

您错过了if运算符中的“==”。