title: Laravel POST call returns index() function instead of store()
body: <p>I'm writing my first app in laravel, it's really nice environment for new laravel developers. To shorten the story: I've created two eloquent models via php artisan commands and created corresponding controllers the same way. One of those is "Members" model, I've created public functions inside the class of the controller, but when I try to POST to the route that should use store() function that route actually uses index() function.</p>
  
  <p>Controller:</p>
  
  <pre><code>namespace App\Http\Controllers;
  
  use Illuminate\Http\Request;
  
  use App\Http\Requests;
  use App\Member;
  use Response;
  
  class MemberController extends Controller
  {
      /**
       * Display a listing of the resource.
       *
       * @return Response
       */
      public function index()
      {
          $members = Member::all();
          return Response::json([
              'data' =&gt; $this-&gt;transformCollection($members)
          ], 200);
      }
  
      /**
       * Show the form for creating a new resource.
       *
       * @return Response
       */
      public function create()
      {
          //
      }
  
      /**
       * @param Request $request
       * @return mixed
       */
      public function store(Request $request)
      {
          if(! $request-&gt;email){
              return Response::json([
                  'error' =&gt; [
                      'message' =&gt; 'Please Provide email'
                  ]
              ], 422);
          }
          $Member = Member::create($request-&gt;all());
  
          return Response::json([
              'message' =&gt; 'Member Created Succesfully',
              'data' =&gt; $this-&gt;transform($Member)
          ]);
  
      }
  
      /**
       * Display the specified resource.
       *
       * @param  int  $id
       * @return Response
       */
      public function show($id)
      {
          $Member = Member::find($id);
  
          if(!$Member){
              return Response::json([
                  'error' =&gt; [
                      'message' =&gt; 'Member does not exist'
                  ]
              ], 404);
          }
  
          return Response::json([
              'data' =&gt; $this-&gt;transform($Member)
          ], 200);
      }
  
      /**
       * 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(Request $request, $id)
      {
          if(! $request-&gt;user_id){
              return Response::json([
                  'error' =&gt; [
                      'message' =&gt; 'Please Provide user_id'
                  ]
              ], 422);
          }
  
          $Member = Member::find($id);
          if($request-&gt;email){
              $Member-&gt;email = $request-&gt;email;
          }
          if($request-&gt;first_name){
              $Member-&gt;first_name = $request-&gt;first_name;
          }
          if($request-&gt;last_name){
              $Member-&gt;last_name = $request-&gt;last_name;
          }
          if($request-&gt;phone){
              $Member-&gt;phone = $request-&gt;phone;
          }
          if($request-&gt;address_one){
              $Member-&gt;address_one = $request-&gt;address_one;
          }
          if($request-&gt;address_two){
              $Member-&gt;address_two = $request-&gt;address_two;
          }
          if($request-&gt;zip_code){
              $Member-&gt;zip_code = $request-&gt;zip_code;
          }
          if($request-&gt;city){
              $Member-&gt;city = $request-&gt;city;
          }
          if($request-&gt;county){
              $Member-&gt;county = $request-&gt;county;
          }
          if($request-&gt;state_region){
              $Member-&gt;state_region = $request-&gt;state_region;
          }
          if($request-&gt;country){
              $Member-&gt;country = $request-&gt;country;
          }
          if($request-&gt;job_title){
              $Member-&gt;job_title = $request-&gt;job_title;
          }
          if($request-&gt;company){
              $Member-&gt;company = $request-&gt;company;
          }
          if($request-&gt;clearance_level){
              $Member-&gt;clearance_level = $request-&gt;clearance_level;
          }
          $Member-&gt;save();
          return Response::json([
              'message' =&gt; 'Member Updated Succesfully',
              'data' =&gt; $this-&gt;transform($Member)
          ]);
      }
  
      /**
       * Remove the specified resource from storage.
       *
       * @param  int  $id
       * @return Response
       */
      public function destroy($id)
      {
          Member::destroy($id);
      }
  
      /**
       * @Description Data transform
       * @param $contacts
       * @return array
       */
      private function transformCollection($contacts)
      {
          return array_map([$this, 'transform'], $contacts-&gt;toArray());
      }
  
      /**
       * @Description Data transform
       * @param $contact
       * @return array
       */
  
      private function transform($contact)
      {
          return [
              'id' =&gt; $contact['id'],
              'fname' =&gt; $contact['first_name'],
              'lname' =&gt; $contact['last_name'],
              'email' =&gt; $contact['email'],
              'address' =&gt; $contact['address_one']
          ];
      }
  }
  </code></pre>
  
  <p>My model is:</p>
  
  <pre><code>namespace App;
  
  use Illuminate\Database\Eloquent\Model;
  use Illuminate\Http\Request;
  
  class Member extends Model
  {
      /**
       * The database table used by the model.
       *
       * @var string
       */
      protected $table = 'members';
      /**
       * The attributes that are mass assignable.
       *
       * @var array
       */
      protected $fillable = [
          'email',
          'first_name',
          'last_name',
          'phone',
          'address_one',
          'address_two',
          'zip_code',
          'city',
          'county',
          'state_region',
          'country',
          'job_title',
          'company',
          'clearance_level',
      ];
  
      /**
       * The attributes excluded from the model's JSON form.
       *
       * @var array
       */
      protected $hidden = [
  
      ];
  }
  </code></pre>
  
  <p>My php artisan route:list is:</p>
  
  <pre><code>+--------+-----------+-------------------------------+------------------------+--------------------------------------------------------+------------+
  | Domain | Method    | URI                           | Name                   | Action                                                 | Middleware |
  +--------+-----------+-------------------------------+------------------------+--------------------------------------------------------+------------+
  |        | GET|HEAD  | /                             |                        | Closure                                                |            |
  |        | POST      | api/v1/members                | api.v1.members.store   | App\Http\Controllers\MemberController@store            |            |
  |        | GET|HEAD  | api/v1/members                | api.v1.members.index   | App\Http\Controllers\MemberController@index            |            |
  |        | GET|HEAD  | api/v1/members/create         | api.v1.members.create  | App\Http\Controllers\MemberController@create           |            |
  |        | DELETE    | api/v1/members/{members}      | api.v1.members.destroy | App\Http\Controllers\MemberController@destroy          |            |
  |        | GET|HEAD  | api/v1/members/{members}      | api.v1.members.show    | App\Http\Controllers\MemberController@show             |            |
  |        | PUT|PATCH | api/v1/members/{members}      | api.v1.members.update  | App\Http\Controllers\MemberController@update           |            |
  |        | GET|HEAD  | api/v1/members/{members}/edit | api.v1.members.edit    | App\Http\Controllers\MemberController@edit             |            |
  |        | GET|HEAD  | auth/login                    |                        | App\Http\Controllers\Auth\AuthController@getLogin      | web,guest  |
  |        | POST      | auth/login                    |                        | App\Http\Controllers\Auth\AuthController@postLogin     | web,guest  |
  |        | GET|HEAD  | auth/logout                   |                        | App\Http\Controllers\Auth\AuthController@getLogout     | web,guest  |
  |        | POST      | auth/register                 |                        | App\Http\Controllers\Auth\AuthController@postRegister  | web,guest  |
  |        | GET|HEAD  | auth/register                 |                        | App\Http\Controllers\Auth\AuthController@getRegister   | web,guest  |
  |        | POST      | password/email                |                        | App\Http\Controllers\Auth\PasswordController@postEmail | web,guest  |
  |        | GET|HEAD  | password/email                |                        | App\Http\Controllers\Auth\PasswordController@getEmail  | web,guest  |
  |        | POST      | password/reset                |                        | App\Http\Controllers\Auth\PasswordController@postReset | web,guest  |
  |        | GET|HEAD  | password/reset/{token}        |                        | App\Http\Controllers\Auth\PasswordController@getReset  | web,guest  |
  +--------+-----------+-------------------------------+------------------------+--------------------------------------------------------+------------+
  </code></pre>
  
  <p>Route definition:</p>
  
  <pre><code>Route::group(['prefix' =&gt; 'api/v1'], function(){       
      Route::resource('members', 'MemberController');
  });
  </code></pre>
  
  <p>I tried both ‍<code>mysite.us/api/v1/members</code> and <code>mysite.us/api/v1/members/</code> </p>
  
  <p>they both return <code>index()</code> on <code>POST</code>.</p>