title: laravel 4 Redirect to route with 2 parameters
body: <p>I'm currently trying to implement redirects using</p>
  
  <pre><code>public function store($username,$courseId)
  {       
          if (Auth::user()-&gt;username == $username &amp;&amp; Auth::user()-&gt;courses()-&gt;where('id', '=', $courseId)-&gt;first() != null){
          $course = Course::find($courseId);
          $forum = new Forum();
          $forum-&gt;description = Input::get('description');
          $forum-&gt;course_id   = Input::get('course_id');
          $forum-&gt;save();
          return Redirect::to(route('users.courses.forums.index',Auth::user()-&gt;username,$course-&gt;id));
          }
      return Redirect::to('/');
  }
  </code></pre>
  
  <p>The parameters in Redirect aren't working. Store is a POST method in ForumController. The parameters that Store received are OK because I don't have problems with validation 'if'. I've could created a forum and save it, but when I try to redirect I have this error</p>
  
  <pre><code>Trying to get property of non-object
  </code></pre>
  
  <p>And users.courses.forums.index is the name of my URI with Action ForumController@index. This last method needs 2 parameters ($username,$courseid). Like this</p>
  
  <pre><code>public function index($username,$courseId)
  {       
          $course = Course::find($courseId);
          $forum = DB::table('forums')-&gt;where('course_id',$course-&gt;id)-&gt;get();
          return View::make('forums.index',compact('course','forum'));    
  }
  </code></pre>