Пример #1
0
 /**
  * Get: Search Taxi by Plate Number or Taxi Name
  *
  * @param string $keyword Keyword used to search
  *
  * @return json List of matched Taxi with detailed information
  */
 public function search($keyword)
 {
     $taxis = Taxi::search($keyword);
     if (count($taxis) > 0) {
         return response()->json(['data' => $taxis, 200]);
     } else {
         return response()->json(['message' => 'Not Found', 404]);
     }
 }