title: Laravel Undefined Offset: 1 - cause by routing
body: <p>I get the error when trying to make a post call to <code>/api/subject/search</code></p>
  
  <p>I assume it's a simple syntax error I'm missing</p>
  
  <p>I have my api routes defined below</p>
  
  <pre><code>Route::group(array('prefix' =&gt; 'api'), function()
  {
      Route::post('resource/search', 'ResourceController');
      Route::resource('resource', 'ResourceController');
  
  
      Route::post('subject/search', 'SubjectController');
      Route::resource('subject', 'SubjectController');
  
      Route::resource('user', 'UserController');
  
      Route::controller('/session', 'SessionController');
      Route::post('/login', array('as' =&gt; 'session', 'uses' =&gt; 'SessionController@Store'));
  });
  </code></pre>
  
  <p>And my controller is mostly empty</p>
  
  <pre><code>class SubjectController extends \BaseController 
  {
      public function search()
      {
          $subjects = [];
          if((int)Input::get('grade_id') &lt; 13 &amp;&amp; (int)Input::get('grade_id') &gt; 8)
              $subjects = Subject::where('name', 'like', '%HS%')-&gt;get();
          else
              $subjects = Subject::where('name', 'not like', '%HS%')-&gt;get();
  
          return Response::json([
              'success' =&gt; true,
              'subjects' =&gt; $subjects-&gt;toArray()
          ]);
      }
      /**
       * Display a listing of the resource.
       *
       * @return Response
       */
      public function index()
      {
              //
      }
  
      /**
       * Show the form for creating a new resource.
       *
       * @return Response
       */
      public function create()
      {
              //
      }
  
      /**
       * Store a newly created resource in storage.
       *
       * @return Response
       */
      public function store()
      {
              //
      }
  
      /**
       * Display the specified resource.
       *
       * @param  int  $id
       * @return Response
       */
      public function show($id)
      {
              //
      }
  
      /**
       * Show the form for editing the specified resource.
       *
       * @param  int  $id
       * @return Response
       */
      public function edit($id)
      {
              //
      }
  
      /**
       * Update the specified resource in storage.
       *
       * @param  int  $id
       * @return Response
       */
      public function update($id)
      {
              //
      }
  
      /**
       * Remove the specified resource from storage.
       *
       * @param  int  $id
       * @return Response
       */
      public function destroy($id)
      {
              //
      }
  
  }
  </code></pre>