I am writing an application with the repositories concept in php with laravel framework.
In my controller I have this method:
/**
* Update the specified resource in storage.
* PUT /locais/{id}
*
* @param int $id
* @return Response
*/
public function update($id)
{
$data = Input::all();
$data['str_categories'] = implode(',', $data['categories']);
$this->place->update($id, $data);
return Redirect::route('locais.index');
}
I am concerned about this line in controller:
$data['str_categories'] = implode(',', $data['categories']);
This line can be in controller method? Or this is a responsibility of places repository?