I've got a pre-existing function in my controller that will run a simple query and return the model\_name and id then return the result as json.

```
public function getModel($id) 
{
    $models = DB::table('model')->where('man_id',$id)->pluck('model_name','id');
    return json_encode($models);
}

```

New requirement is that I include an additional column named model\_num with the query. Plan is to concatenate the model\_name and model\_num columns.

Tried the following, but it doesn't return any values and I get a 404 response for the json:

```
public function getModel($id) 
{
    $models = DB::table("model")->select("id","CONCAT(model_name, '-', model_num) as model")->where("man_id",$id)->pluck('model','id');
    return json_encode($models);
}

```

Am I missing something obvious?