title: redirect in laravel helper function
body: <p>I have created function in laravel helper class to check Authentication in <code>app/lib/Auth.php</code></p>
  
  <p>
  
  <pre><code>class Auto extends \BaseController {
  
      public static function logged() {
          if(Auth::check()) {
              return true;
          } else {
              $message = array('type'=&gt;'error','message'=&gt;'You must be logged in to view this page!');
  
              return Redirect::to('login')-&gt;with('notification',$message);    
          }
      }
  }
  </code></pre>
  
  <p>In my controller</p>
  
  <pre><code>class DashboardController extends \BaseController {
  
      /**
       * Display a listing of the resource.
       *
       * @return Response
       */
      public function index()
      {
          Auto::logged();
          return View::make('dashboard.index');
      }
  </code></pre>
  
  <p>I expect it redirect to login route if not logged, but it load <code>dashboard.index</code> view with message 'You must be logged in to view this page!'.</p>
  
  <p>How can I redirect to login route with this message?</p>