title: My Middleware is working in protecting routes but not working properly after successful login
body: <p>I have a problem with my codes. I'm encountering something my classmates can't fix. Here's the problem:</p>
  
  <p>I have my middleware working properly in protecting routes. After I successfully login it redirects me to my leader.blade.php, in my leader.blade.php, I have a navbar that contains different blades, but after I click one of those navigations, my system redirects me to login again.</p>
  
  <p>I don't know why I was redirected again to my login page while I have a successful login. I think, theres a problem with my remember me func' or cookies or crsf_token, I don't know. Any help would be greatly appreciated.</p>
  
  <pre><code>    &lt;?php
  
  namespace App\Http\Middleware;
  
  use Closure;
  
  class notLeader
  {
      /**
       * Handle an incoming request.
       *
       * @param  \Illuminate\Http\Request  $request
       * @param  \Closure  $next
       * @return mixed
       */
      public function handle($request, Closure $next)
      {
          if(!($request-&gt;user['acclvl'] == 'Leader' || $request-&gt;user['acclvl'] == 'Leader')) {
              return redirect('/login');
          }
  
  
          return $next($request);
      }
  }
  </code></pre>
  
  <p>here's my Middleware</p>
  
  <pre><code>Route::group(['middleware' =&gt; ['web', 'isLeader']], function () {
      Route::resource('announces-admin', 'AnnouncementController@annadmin');
  });
  </code></pre>
  
  <p>here's my routes (for testing only)</p>
  
  <pre><code>&lt;section class="col-lg-12 connectedSortable"&gt;
  
  
            &lt;div class="box"&gt;
  
  
  
  
             &lt;div class="box box-info"&gt;
              &lt;div class="box-header with-border"&gt;
                &lt;i class="fa fa-bell-o"&gt;&lt;/i&gt;
                &lt;h2 class="box-title"&gt;Announcements&lt;/h2&gt;
                &lt;div class="box-tools pull-right"&gt;
                  &lt;button onclick="window.location.href='/announce'" class="btn btn-info btn-sm" data-toggle="tooltip" data-placement="bottom" title="New Announcement"&gt;&lt;i class="fa fa-plus"&gt;&lt;/i&gt;&lt;/button&gt;
                  &lt;button class="btn btn-info btn-sm" data-widget="collapse" data-toggle="tooltip" data-placement="bottom" title="collapse"&gt;&lt;i class="fa fa-minus"&gt;&lt;/i&gt;&lt;/button&gt;
                &lt;!--   &lt;button class="btn btn-info btn-sm" data-widget="remove"&gt;&lt;i class="fa fa-times"&gt;&lt;/i&gt;&lt;/button&gt; --&gt;
                &lt;/div&gt;
              &lt;/div&gt;&lt;!-- /.box-header --&gt;
              &lt;div class="box-body"&gt;
                &lt;div class="table-responsive"&gt;
                  &lt;table class="table no-margin"&gt;
                    &lt;input type="hidden" name="_token" value="{{ csrf_token() }}"&gt;
                    &lt;tbody&gt;  @foreach ($data as $row) 
                    &lt;tr&gt;
  
  
                        &lt;h2 style="color: #00a3cc;"&gt;{{ $row-&gt;subject }}&lt;/h2&gt;
                        &lt;h5&gt;Posted by:   &lt;b style="color:#008CBA;"&gt;{{ $row-&gt;poster }}&lt;/b&gt;, {{ $row-&gt;created_at }}&lt;/h5&gt;
                        &lt;p style="font-size:1.20em;font-weight:450;" class='item test'&gt;{{ $row-&gt;message }}&lt;/p&gt;
                        &lt;span class="more_text"&gt;
                          &lt;a href="{{ url('viewspec', $row-&gt;id )}}" class="read_more"&gt; &lt;br&gt;Continue Reading &gt;&gt;&lt;/a&gt;&lt;br&gt;&lt;hr&gt;
                        &lt;br&gt;
  
                    &lt;/tr&gt;  @endforeach
  
                  &lt;/tbody&gt;
                  &lt;/table&gt;{!! $data-&gt;render() !!}
                &lt;/div&gt;&lt;!-- /.table-responsive --&gt;
              &lt;/div&gt;&lt;!-- /.box-body --&gt;
  
          &lt;/section&gt;&lt;!-- /.Left col --&gt;
  </code></pre>
  
  <p>here's my announces-admin.blade.php (which is in my navbar at leader.blade.php)</p>