cmgmyr / laravel-messenger

Simple user messaging package for Laravel
MIT License
2.45k stars 514 forks source link

Help Needed Please #199

Closed HDVinnie closed 7 years ago

HDVinnie commented 7 years ago

I am trying to incorporate this into my existing laravel application running laravel 4.2

I followed the instructions to a "T" here: https://github.com/cmgmyr/laravel-messenger/tree/v1 No errors where thrown. I have loaded the example Controllers, Views and used the Routes method used in Routes example. Only exceptions was editing the views to use @extends('layout.default') instead of default @extends('layout.master')

My Routes now looks like so


<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/

// General
Route::get('/', ['uses' => 'HomeController@home', 'as' => 'home']);
Route::any('/search', ['uses' => 'HomeController@search', 'as' => 'search']);
Route::any('/contact', ['uses' => 'HomeController@contact', 'as' => 'contact']);

// Bonus System
Route::get('/bonus', ['uses' => 'BonusController@bonus', 'as' => 'bonus']);

// Bug Report
Route::get('/bug', ['uses' => 'BugController@bug', 'as' => 'bug']);

//Poster View
Route::get('/poster', ['uses' => 'PosterController@poster', 'as' => 'poster']);

// Shoutbox
Route::get('/shoutbox', ['uses' => 'ShoutController@index', 'as' => 'shoutbox', 'before' => 'auth']);
Route::post('/shoutbox/add', ['uses' => 'ShoutController@add', 'as' => 'shoutbox_add', 'before' => 'auth']);

// User
Route::any('/login', ['uses' => 'UserController@login', 'as' => 'login']);
Route::any('/signup/{key?}', ['uses' => 'UserController@signup', 'as' => 'signup']);
Route::any('/logout', ['uses' => 'UserController@logout', 'before' => 'auth', 'as' => 'logout']);
Route::get('/members', ['uses' => 'UserController@members', 'as' => 'members']);
Route::get('/members/{username}.{id}', ['uses' => 'UserController@profil', 'as' => 'profil']);
Route::any('/members/{username}.{id}/edit', ['uses' => 'UserController@editProfil', 'as' => 'user_edit_profil', 'before' => 'auth']);
Route::post('/members/{username}.{id}/photo', ['uses' => 'UserController@changePhoto', 'as' => 'user_change_photo', 'before' => 'auth']);
Route::get('/members/{username}.{id}/activate/{token}', ['uses' => 'UserController@activate', 'as' => 'user_activate']);
Route::post('/members/{username}.{id}/about', ['uses' => 'UserController@changeAbout', 'as' => 'user_change_about', 'before' => 'auth']);
Route::post('/members/{username}.{id}/photo', ['uses' => 'UserController@changeTitle', 'as' => 'user_change_title', 'before' => 'auth']);
Route::any('/members/invite', array('uses' => 'UserController@invite', 'as' => 'user_invite', 'before' => 'auth'));

// RemindersController
Route::get('/lost-password', ['uses' => 'RemindersController@getRemind', 'as' => 'reminder_get_remind']);
Route::post('/lost-password', ['uses' => 'RemindersController@postRemind', 'as' => 'reminder_post_remind']);
Route::get('/password/reset/{token}', ['uses' => 'RemindersController@getReset', 'as' => 'reminder_get_passwordReset']);
Route::post('/password/reset', ['uses' => 'RemindersController@postReset', 'as' => 'reminder_post_passwordReset']);

// Page
Route::get('/p/{slug}.{id}', ['uses' => 'PageController@page', 'as' => 'page']);

// Torrent
Route::get('/torrents', array('uses' => 'TorrentController@torrents', 'as' => 'torrents'));
Route::get('/torrents/{slug}.{id}', array('uses' => 'TorrentController@torrent', 'as' => 'torrent'));
Route::any('/upload', ['uses' => 'TorrentController@upload', 'before' => 'auth', 'as' => 'upload']);
Route::any('/announce/{passkey?}', ['uses' => 'TorrentController@announce', 'as' => 'announce']);
Route::get('/download/{slug}.{id}', ['uses' => 'TorrentController@download', 'as' => 'download',]);

// Category
Route::get('/categories', array('uses' => 'CategoryController@categories', 'as' => 'categories'));
Route::get('/categories/{slug}.{id}', ['uses' => 'CategoryController@category', 'as' => 'category']);

// Article
Route::get('/articles', array('uses' => 'ArticleController@articles', 'as' => 'articles'));
Route::get('/articles/{slug}.{id}', array('uses' => 'ArticleController@post', 'as' => 'article'));

// Commentaires
Route::any('/comment/article/{slug}.{id}', array('uses' => 'CommentController@article', 'as' => 'comment_article', 'before' => 'auth'));
Route::any('/comment/torrent/{slug}.{id}', array('uses' => 'CommentController@torrent', 'as' => 'comment_torrent', 'before' => 'auth'));

// Admin
Route::group(array('prefix' => 'admin', 'before' => 'auth|admin', 'namespace' => 'Admin'), function()
{
    Route::any('/', array('uses' => 'HomeController@home', 'as' => 'admin_home'));

    // Articles
    Route::any('/articles', array('uses' => 'ArticleController@index', 'as' => 'admin_article_index'));
    Route::any('/articles/new', array('uses' => 'ArticleController@add', 'as' => 'admin_article_add'));
    Route::any('/articles/edit/{slug}.{id}', array('uses' => 'ArticleController@edit', 'as' => 'admin_article_edit'));
    Route::any('/articles/delete/{slug}.{id}', array('uses' => 'ArticleController@delete', 'as' => 'admin_article_delete'));

    // Bugs
    Route::any('/bug', ['uses' => 'BugController@index', 'as' => 'admin_bug_index']);

    // Settings
    Route::any('/settings', ['uses' => 'SettingsController@index', 'as' => 'admin_settings_index']);

    // Torrent
    Route::any('/torrents', array('uses' => 'TorrentController@index', 'as' => 'admin_torrent_index'));
    Route::any('/torrents/edit/{slug}.{id}', array('uses' => 'TorrentController@edit', 'as' => 'admin_torrent_edit'));
    Route::get('/torrents/delete/{slug}.{id}', ['uses' => 'TorrentController@delete', 'as' => 'admin_torrent_delete']);

    // Users
    Route::any('/members', array('uses' => 'UserController@index', 'as' => 'admin_user_index'));
    Route::any('/members/edit/{username}.{id}', array('uses' => 'UserController@edit', 'as' => 'admin_user_edit'));

    // Categories
    Route::get('/categories', array('uses' => 'CategoryController@index', 'as' => 'admin_category_index'));
    Route::any('/categories/new', array('uses' => 'CategoryController@add', 'as' => 'admin_category_add'));
    Route::any('/categories/edit/{slug}.{id}', array('uses' => 'CategoryController@edit', 'as' => 'admin_category_edit'));
    Route::get('/categories/delete/{slug}.{id}', array('uses' => 'CategoryController@delete', 'as' => 'admin_category_delete'));

    // Forum
    Route::get('/forums', array('uses' => 'ForumController@index', 'as' => 'admin_forum_index'));
    Route::any('/forums/new', array('uses' => 'ForumController@add', 'as' => 'admin_forum_add'));
    Route::any('/forums/edit/{slug}.{id}', array('uses' => 'ForumController@edit', 'as' => 'admin_forum_edit'));
    Route::get('/forums/delete/{slug}.{id}', array('uses' => 'ForumController@delete', 'as' => 'admin_forum_delete'));

    //Pages
    Route::get('/pages', ['uses' => 'PageController@index', 'as' => 'admin_page_index']);
    Route::any('/pages/new', ['uses' => 'PageController@add', 'as' => 'admin_page_add']);
    Route::any('/pages/edit/{slug}.{id}', ['uses' => 'PageController@edit', 'as' => 'admin_page_edit']);
    Route::get('/pages/delete/{slug}.{id}', ['uses' => 'PageController@delete', 'as' => 'admin_page_delete']);
});

// Forum
Route::get('/forums', function() { return Redirect::to('/community'); }); // Old link
Route::group(array('prefix' => 'community'), function()
{
    Route::get('/', array('uses' => 'ForumController@index', 'as' => 'forum_index'));
    // Affiche la categorie
    Route::get('/category/{slug}.{id}', array('uses' => 'ForumController@category', 'as' => 'forum_category'));
    // Affiche le forum et les topics
    Route::get('/forum/{slug}.{id}', array('uses' => 'ForumController@display', 'as' => 'forum_display'));
    // Crée un nouveau topic
    Route::any('/forum/{slug}.{id}/new-topic', array('uses' => 'ForumController@newTopic', 'as' => 'forum_new_topic', 'before' => 'auth'));
    // Affiche le topic
    Route::get('/topic/{slug}.{id}', array('uses' => 'ForumController@topic', 'as' => 'forum_topic'));
    // Ferme le topic
    Route::get('/topic/{slug}.{id}/close', array('uses' => 'ForumController@closeTopic', 'as' => 'forum_close'));
    // Ouvre le topic
    Route::get('/topic/{slug}.{id}/open', array('uses' => 'ForumController@openTopic', 'as' => 'forum_open'));
    // Edit un post
    Route::any('/topic/{slug}.{id}/post-{postId}/edit', array('uses' => 'ForumController@postEdit', 'as' => 'forum_post_edit', 'before' => 'auth'));
    // Ajoute une réponse au topic
    Route::post('/topic/{slug}.{id}/reply', array('uses' => 'ForumController@reply', 'as' => 'forum_reply', 'before' => 'auth'));

    Route::any('/topic/{slug}.{id}/delete', array('uses' => 'ForumController@deleteTopic', 'as' => 'forum_delete_topic', 'before' => 'auth'));
});

// Api
Route::group(['prefix' => 'api', 'namespace' => 'Api'], function(){

    // Affiche l'article
    Route::any('/articles/{id}', 'ArticleController@article');
    // Affiche le torrent
    Route::any('/torrents/{id}', 'TorrentController@torrent');

    // Commentaire sur articles
    Route::get('/comments/article', 'CommentController@getArticleComments');
    Route::post('/comments/article', ['uses' => 'CommentController@addArticleComment', 'before' => 'auth']);

    // Commentaire sur torrents
    Route::get('/comments/torrent', 'CommentController@getTorrentComments');
    Route::post('/comments/torrent', ['uses' => 'CommentController@addTorrentComment', 'before' => 'auth']);

    // Affiches les topics dans le forum Like Display
    Route::get('/forums/display',  ['uses' => 'ForumController@display']);

    // Retourne le contenue BBCode en HTMl
    Route::post('/forums/preview', ['uses' => 'ForumController@getPreview']);

    Route::resource('shout', 'ShoutController');
});

//PM System
Route::group(['prefix' => 'messages'], function () {
    Route::get('/', ['as' => 'messages', 'uses' => 'MessagesController@index']);
    Route::get('create', ['as' => 'messages.create', 'uses' => 'MessagesController@create']);
    Route::post('/', ['as' => 'messages.store', 'uses' => 'MessagesController@store']);
    Route::get('{id}', ['as' => 'messages.show', 'uses' => 'MessagesController@show']);
    Route::put('{id}', ['as' => 'messages.update', 'uses' => 'MessagesController@update']);
});

Now my site url is http://unit3d.hdinnovations.xyz

So i try http://unit3d.hdinnovations.xyz/messages to access the laravel-messenger but keep getting

Undefined variable: pages (View: /home/UNIT3D/app/views/layout/default.blade.php) (View: /home/UNIT3D/app/views/layout/default.blade.php)

default.blade.php looks like so:

<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#">

  <head>
    <meta charset="UTF-8"> @section('title')
    <title>{{{ Config::get('other.subTitle') }}} - {{{ Config::get('other.title') }}}</title>
    @show

    <!-- Meta -->
    @section('meta')
    <meta name="description" content="{{{ Config::get('other.meta_description') }}}">
    <meta name="keywords" content="{{{ 'torrents, films, movies, series, tv, show' }}}">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta property="og:title" content="{{{ Config::get('other.title') }}}">
    <meta property="og:type" content="website">
    <meta property="og:image" content="{{ url('/img/rlm.png') }}">
    <meta property="og:url" content="{{ url('/') }}"> @show
    <!-- /Meta -->

    <!--icons -->
    <link rel="shortcut icon" href="{{ url('/favicon.ico') }}" type="image/x-icon">
    <link rel="icon" href="{{ url('/favicon.ico') }}" type="image/x-icon">
    <!--icons -->

    <!--css -->
    <link rel="stylesheet" href="{{ url('css/app.css') }}">
    <link rel="stylesheet" href="{{ url('css/custom.css') }}">
    <link rel="stylesheet" href="{{ url('css/font-awesome.min.css') }}">
    <link rel="stylesheet" href="{{ url('css/icheck.css') }}">
    <link rel="stylesheet" href="{{ url('css/jasny-bootstrap.css') }}">
    <link rel="stylesheet" href="{{ url('css/ccslider.css') }}">
    <link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/css/toastr.min.css" />
    <!--css -->
    @yield('stylesheets')
  </head>

  <body>
    @if(Auth::check())

    <body class="skin-josh">
      <header class="header">
        <nav class="navbar navbar-static-top" role="navigation">
          <!-- Sidebar toggle button-->
          <div>
            <a href="#" class="navbar-btn sidebar-toggle" data-toggle="offcanvas" role="button">
              <div class="responsive_nav"></div>
            </a>
          </div>
          <a href="{{ route('home') }}" class="logo">
            <img src="{{ url('img/logo.png') }}" alt="logo">
          </a>
          <div class="navbar-right">
            <ul class="nav navbar-nav">
              <li class="dropdown messages-menu">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown"> <i class="livicon" data-name="message-flag" data-loop="true" data-color="#42aaca" data-hovercolor="#42aaca" data-size="28"></i>
                  <span class="label label-danger">4</span>
                </a>
              </li>
              <li class="dropdown user user-menu">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                  <img src="{{ url('img/profil.png') }}" height="35px" alt="{{ url('img/profil.png') }}" width="35px" class="img-circle img-responsive">
                  <div class="riot">
                    <div>
                      {{ Auth::user()->username }}
                      <span>
                                        <i class="caret"></i>
                                    </span>
                    </div>
                  </div>
                </a>
                <ul class="dropdown-menu">
                  <!-- User image -->
                  <li class="user-header bg-light-blue">
                    <img src="{{ url('img/profil.png') }}" width="90px" alt="{{ url('img/profil.png') }}" height="90px" class="img-circle img-responsive">
                    <p class="topprofiletext">{{ Auth::user()->username }}</p>
                  </li>
                  <!-- Menu Body -->
                  <li>
                    <a href="{{ route('profil', array('username' => Auth::user()->username, 'id' => Auth::user()->id)) }}"> <i class="livicon" data-name="user" data-s="18"></i> My Profile </a>
                  </li>
                  <li>
                    <a href="{{ route('logout') }}"> <i class="livicon" data-name="sign-out" data-s="18"></i> Logout </a>
                  </li>
                </ul>
              </li>
            </ul>
          </div>
        </nav>
      </header>
      <div class="wrapper row-offcanvas row-offcanvas-left">
        <!-- Left side column. contains the logo and sidebar -->
        <aside class="left-side sidebar-offcanvas">
          <section class="sidebar ">
            <div class="page-sidebar  sidebar-nav">
              <div class="clearfix"></div>
              <!-- BEGIN SIDEBAR MENU -->
              <ul id="menu" class="page-sidebar-menu">
                <li>
                  <a href="{{ route('home') }}">
                    <i class="livicon" data-name="home" data-size="18" data-c="#418BCA" data-hc="#418BCA" data-loop="true"></i>
                    <span class="title">Home</span>
                  </a>
                </li>
                <li>
                  <a href="{{ route('torrents') }}">
                    <i class="livicon" data-name="medal" data-size="18" data-c="#00bc8c" data-hc="#00bc8c" data-loop="true"></i>
                    <span class="title">Torrents</span>
                  </a>
                </li>
                <li>
                  <a href="{{ route('forum_index') }}"> <i class="livicon" data-name="doc-portrait" data-c="#5bc0de" data-hc="#5bc0de" data-size="18" data-loop="true"></i> <span class="title">Forms</span> </a>
                </li>
                <li>
                  <a href="{{ route('upload') }}"> <i class="livicon" data-name="upload" data-c="#F89A14" data-hc="#F89A14" data-size="18" data-loop="true"></i> <span class="title">Upload</span> </a>
                </li>
                <li>
                  <a href="{{ route('bonus') }}"> <i class="livicon" data-name="star-full" data-c="#BF55EC" data-hc="#BF55EC" data-size="18" data-loop="true"></i> <span class="title">BON Store (Front-End)</span> </a>
                </li>
                <li>
                  <a href="{{ route('bug') }}"> <i class="livicon" data-name="bug" data-c="#E74C3C" data-hc="#E74C3C" data-size="18" data-loop="true"></i> <span class="title">Report A Bug</span> </a>
                </li>
                <!-- END SIDEBAR MENU -->
            </div>
          </section>
        </aside>
        <div class="ratio-bar">
          <div class="container">
            <ul class="list-inline">
              <li><i class="fa fa-user"></i>
                <a href="{{ route('profil', array('username' => Auth::user()->username, 'id' => Auth::user()->id)) }}" class="l-header-user-data-link"><span class="badge-user group-member">{{ Auth::user()->username }}</span></a>
              </li>
              <li><i class="fa fa-group"></i>
                <span class="badge-user group-member"> Variable</span></li>
              <li><i class="fa fa-arrow-up text-success"></i>Up: {{ Auth::user()->getUploaded() }}</li>
              <li><i class="fa fa-arrow-down text-orange"></i>Down: {{ Auth::user()->getDownloaded() }}</li>
              <li><i class="fa fa-signal"></i>Ratio: {{ Auth::user()->getRatio() }}</li>
              <li><i class="fa fa-upload text-success"></i>
                <a href="#" title="My Active Torrents">Seeding:</a> variable
              </li>
              <li><i class="fa fa-download text-orange"></i>
                <a href="#" title="My Active Torrents">Leeching:</a> variable
              </li>
              <li><i class="fa fa-star text-gold"></i>
                <a href="#" title="My Bonus Points">Bonus:</a> N/A
              </li>
            </ul>
          </div>
        </div>
        <aside class="right-side">
          <section class="content-header">
            <ol class="breadcrumb">
              <li>
                <a href="{{ route('home') }}">
                  <i class="livicon" data-name="home" data-size="16" data-color="#000"></i> {{{ trans('common.home') }}}
                </a>
              </li>
              @yield('breadcrumb')
            </ol>
          </section>
          <section class="content">

<!-- Global Site Alert -->
<div class="alert alert-success alert-dismissable" id="alert_system_notice">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<strong>Welome to UNIT3D. Currently In <span class="text-danger">BETA!<span></span></span></strong><br>
<small>Please report any bugs or suggestions to Mr.Robot@stealth.tg or via Forums on this site.</small>
</div>
<!-- /Global Site Alert -->

    @if(Session::has('message'))
        <div class="container">
            <div class="col-md-12 alert alert-info">{{ Session::pull('message') }}</div>
        </div>
    @endif

            <!-- Main Content -->
            <div class="container-fluid">
              @yield('content')
            </div>
            <!-- Message Popup -->

            <!-- Footer -->
            <div id="l-footer">
              <div class="container">
                <div class="col-md-4 l-footer-section">
                  <h3 class="l-footer-section-title">{{{ Config::get('other.title') }}}</h3>
                  <footer>{{{ Config::get('other.meta_description') }}}</footer>
                </div>
                <!-- Compte -->
                <div class="col-md-2 l-footer-section">
                  <h3 class="l-footer-section-title">{{{ trans('common.account') }}}</h3>
                  <ul>
                    @if(Auth::check()) @if(Auth::user()->group->is_admin)
                    <li><a href="{{ route('admin_home') }}">Admin Control Panel</a></li>
                    @endif
                    <li><a href="{{ route('shoutbox') }}">Shoutbox</a></li>
                    <li><a href="{{ route('logout') }}">{{{ trans('common.logout') }}}</a></li>
                    @else
                    <li><a href="{{ route('login') }}">{{ trans('common.login') }}</a></li>
                    <li><a href="{{ route('signup') }}">{{ trans('common.signup') }}</a></li>
                    @endif
                  </ul>
                </div>
                <!-- /Compte -->

                <!-- Communauté -->
                <div class="col-md-2 l-footer-section">
                  <h3 class="l-footer-section-title">{{{ trans('traduction.community') }}}</h3>
                  <ul>
                    <li><a href="{{ route('contact') }}">Contact</a></li>
                    <li><a href="{{ route('forum_index') }}">Forums</a></li>
                    <li><a href="{{ route('members') }}">{{ trans('common.members') }}</a></li>
                    <li><a href="{{ route('articles') }}">News</a></li>
                  </ul>
                </div>
                <!-- /Communauté -->

                @if(count($pages))
                <!-- Pages -->
                <div class="col-md-2 l-footer-section">
                  <h3 class="l-footer-section-title">Pages</h3>
                  <ul>
                    @foreach($pages as $p)
                    <li><a href="{{ route('page', ['slug' => $p->slug, 'id' => $p->id]) }}">{{{ $p->name }}}</a></li>
                    @endforeach
                  </ul>
                </div>
                <!-- /Pages -->
                @endif
                <!-- Other -->
                <div class="col-md-2 l-footer-section">
                  <h3 class="l-footer-section-title">Other</h3>
                  <ul>
                    <button type="button" class="btn btn-primary">
                      <em class="icon fa fa-rss"></em> RSS
                    </button>
                    <br>
                    <a href="{{ route('categories') }}">
                      <button type="button" class="btn btn-primary">
                        <em class="icon fa fa-film"></em> Categories
                      </button>
                    </a>
                  </ul>
                </div>
                <!-- /Other -->
              </div>
            </div>
            <!-- /Footer -->
            <div class="subfooter text-center">
              <div class="container">
                <div class="subfooter-inner">
                  <div class="row">
                    <div class="col-md-12">
                      <span class="">Copyright © 2017 · {{{ Config::get('other.title') }}}</span>
                      <ul class="list-inline">
                        <li><a href="#" title="Rules">Terms</a></li>
                        <li><a href="#" title="Privacy Policy">Privacy Policy</a></li>
                        <li><a href="#" title="DMCA">DMCA</a></li>
                      </ul>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <a id="back-to-top" href="#" class="btn btn-primary btn-lg back-to-top" role="button">
              <i class="livicon" data-name="plane-up" data-size="18" data-loop="true" data-c="#fff" data-hc="white"></i>
            </a>
            @else
            <?php
      die("<div class='container'>
            <div class='col-md-4 col-md-offset-4 alert alert-danger'><strong>Access Denied.</strong> Please Login <a href='{{ route('login') }}''>HERE</a></div>
          </div>");
       ?>
              @endif
          </section>
        </aside>
        <!-- right-side -->
      </div>

      <!-- Scripts -->
      <script type="text/javascript">
        var url = "{{ url('/') }}";
        @if(Auth::check())
        var username = "{{ Auth::user()->username }}";
        @else
        var username = "";
        @endif

      </script>

      <script type="text/javascript" src="{{ url('js/vendor/jquery.min.js') }}"></script>
      <script type="text/javascript" src="{{ url('js/vendor/app.js') }}"></script>
      <script type="text/javascript" src="{{ url('js/vendor/pace.min.js') }}"></script>
      <script type="text/javascript" src="{{ url('js/vendor/icheck.js') }}"></script>
      <script type="text/javascript" src="{{ url('js/vendor/jasny-bootstrap.js') }}"></script>
      <script type="text/javascript" src="{{ url('js/vendor/jquery.ccslider-3.0.2.min.js') }}"></script>
      <script type="text/javascript" src="{{ url('js/vendor/jquery.easing.1.3.min.js') }}"></script>
      <script src="https://cdnjs.cloudflare.com/ajax/libs/toastr.js/2.1.3/toastr.min.js"></script>

      <script type="text/javascript">
        jQuery(function($) {
          $(document).ready(function() {
            $('input').iCheck({
              checkboxClass: 'icheckbox_flat-blue',
              radioClass: 'iradio_flat-blue'
            });
          });
        });

      </script>

      <script type="text/javascript">
        $('.left-side').addClass('collapse-left');
        $('.right-side').addClass('strech');

      </script>

      @yield('javascripts')
      <!-- /Scripts -->

      @if(Config::get('app.debug') == false)
      <!-- INSERT YOUR ANALYTICS CODE HERE -->
      @else
      <!-- INSERT DEBUG CODE HERE -->
      @endif
      </div>
    </body>

</html>

This error only shows via these new route links for laravel messenger. Error is not displayed anywhere else on my site as the pages variable works.

What am I blindly missing and doing wrong?

HDVinnie commented 7 years ago

updated OP

cmgmyr commented 7 years ago

@HDVinnie I don't think that this has anything to do with the package. Is there something in your other controllers, base controller, or view composer that is passing through $pages? I'm assuming whatever is doing that in other parts of your app isn't happening in the new MessageController. You could also do some additional checks for $pages in the view.

I'm going to close this ticket for now, but feel free to ask questions if you need more help.