I have a function:
public static function linkClient(Request $request){
//do things
}
This function is called by 2 different things. 1 is a post request with post data. In that case, this works fine:
public static function linkClient(Request $request){
   $data = $request->all();
    // do things with data
}
The second call to this function passes 2 strings. how can i make it so this function can handle either the Request or the strings?
In laymen's terms I would write:
 public static function linkClient(Request $request or $string1,$string2){
   if ($request){
      $data = $request->all();
      //do things to request
   }
   if($string1 or $string2){
     //do string things
   }
 }
 
     
     
    