title: How to get Parameters from postman to save values from Laravel into database
body: <p>I working on an App, and I am creating web services for the App in Laravel. The issue I am facing is that I am not able to get parameters in <code>request</code> in controller to save values in database.</p>
  
  <p>Below is the code I am using to send state id's in the app:-</p>
  
  <pre><code>public function signup(Request $request, $state_id){
  
      $get_cities = DB::table('all_cities')-&gt;where('state_code',$state_id)-&gt;get();
  
          return response()-&gt;json(['data' =&gt; $get_cities]);
  
  
      return view('frontend.pmjkyppa.pmjkyppa_signup',compact('get_cities'));
  }
  </code></pre>
  
  <p>Below is the route I am using to send in the url:-</p>
  
  <pre><code>Route::match(['get','post'],'/pmjkyppa_signup/{state_id}','pmjkyppa\HomeController@signup');
  </code></pre>
  
  <p>From the above url, we are able to get cities according to selected state id in the App.</p>
  
  <p>Now, the main issue arises when from the same url I want to save details in the databse from postman.</p>
  
  <p>For this, the code I am using in controller:-</p>
  
  <pre><code>      public function save_user_details(Request $request){
  
          $data   = $request-&gt;all();
  
          if($request-&gt;isMethod('post')){
  
          $full_name = $data['full_name'];
          $mobile = $data['mob_num'];
          $pwd    = $data['password'];
          $age    = $data['age'];
          $state_id   = $data['state_id'];
          $city_id    = $data['city_id'];
          $post   = $data['post'];
          $created_at = date("Y-m-d H:i:s");
  
          if($data['full_name'] != '' &amp;&amp; $data['mob_num'] != '' &amp;&amp; $data['password'] != ''
              &amp;&amp; $data['age'] != '' &amp;&amp; $data['city'] != ''){
  
              DB::table('pmjkyppa_users')-&gt;insert([
              ['full_name' =&gt; $data['full_name'], 'mob_num' =&gt; $data['mob_num'], 
              'password' =&gt; md5($data['password']), 'age' =&gt; $data['age'], 'state_id' =&gt; 
               $data['state_id'], 
               'city_id' =&gt; $data['city_id'], 'post' =&gt; $data['post'], 'created_at' =&gt; $created_at, 
               'updated_at' =&gt; '']
          ]);
          return response()-&gt;json(['status' =&gt; true, 'message' =&gt; 'Saved!']);
          }else{
  
              return response()-&gt;json(['status' =&gt; false, 'message' =&gt; 'Plese Fill in your details!']);
          }
       }
  </code></pre>
  
  <p>And the route Url for this is:-</p>
  
  <p>Route::match(['post'],'/pmjkyppa_signup/{state_id}','pmjkyppa\HomeController@sav 
     e_user_details');</p>
  
  <p>I am using the same URL, but different functions. How can I save data with the same url from postman?</p>