title: How prevent save same record many times
body: <p>I have controller recieve 12 request from flutter app, the request is like this:</p>
  <pre><code>data.map((e) async {
        Map list = {
          'username': username,
          'club': e.club,
          'price': e.price,
          'surename': e.surname,
          'id': e.id,
          'league': e.leagueName,
        };
        try {
          var newurl = Uri.parse(url + 'create_team');
          var response =
              await http.post(newurl, body: jsonEncode(list), headers: {
            'Content-Type': 'application/json',
            'Authorization': 'Bearer $token',
          });
          var result = jsonDecode(response.body);
          print(result);
        } catch (e) {
          print('error : $e');
        }
      }).toList();
  </code></pre>
  <p>my controller method :</p>
  <pre><code>public function create_team(Request  $request)
      {
         
          $user=User::where('username',$request-&gt;username)-&gt;first();
          
          $week = Week::where('status','active')-&gt;first();
          $week_id = $week-&gt;id;
          
          $club = Club::where('club',$request-&gt;club)-&gt;first();
  
          $created_team=Team::where('user_id',$user-&gt;id)-&gt;get();
          if($created_team-&gt;count()==0){
              $team = Team::create([
              'team_name'=&gt; '',
              'season_id'=&gt; 1,
              'week_id'=&gt; $week_id,
              'user_id'=&gt;$user-&gt;id,
          ]);
          $team_id = Team::where('user_id',$user-&gt;id)-&gt;where('week_id',$week_id)-&gt;first();
          $insert=UserTeam::create([
              'team_id'=&gt; $team_id-&gt;id,
              'club_id'=&gt; $club-&gt;id,  
          ]);
          }else{
              $team_id = Team::where('user_id',$user-&gt;id)-&gt;where('week_id',$week_id)-&gt;first();
              $insert=UserTeam::create([
                  'team_id'=&gt; $team_id-&gt;id,
                  'club_id'=&gt; $club-&gt;id,  
              ]);
          }
          return response()-&gt;json(['message' =&gt; 'Succed']);
      }
  </code></pre>
  <p>in controller I made it to check if team is saved before to saved it once but it dosn't work all time ,many times it is save more than one .
  Now how can i stop this to save more than one time?</p>