My question/refactor is similar to what is found here:Laravel controller for form validation skinnyHowever, I feel that the answer is for 5.0 and not 5.2. This question does not pertain only to one controller but considering that I am making a RESTful API I believe 1 example is sufficient so I can propagate this:class UpdateAppointmentRequest extends Request{    /**     * Determine if the user is authorized to make this request.     *     * @return bool     */    public function authorize()    {        return false;    }    /**     * Get the validation rules that apply to the request.     *     * @return array     */    public function rules()    {        return [            'id' => 'required|integer',            'user_id' => 'required|integer',            'status' => 'integer',            'note' => 'alpha'        ];    }}public function update(UpdateAppointmentRequest $request){    $appointment = $this->appointment->find($request->get('id'));    if ($appointment === null) {        return $this->notFound('Appointment Not Found');    }    if($request->has('user_id') === true) {        $appointment->user_id = $request->get('user_id');    }    if($request->has('status') === true) {        $appointment->status = $request->get('status');    }            if($request->has('note') === true) {        $appointment->note = $request->get('note');    }      try {        return response()->json(['created' => $appointment->save()]);    } catch(\PDOException $e) {        return $this->internalIssues($e->getMessage());    }}My issue is the if statements. Now considering that only 2 items from the validation are required and the rest are not - I have to validate if the present of the variable is there in order to update. It works well, but it will eventually make controllers very bloated (depending on which restful resources might have more parameters).Does anyone know of a better way to refactor this within Laravel 5.2+?
Laravel controller to update appointment requests
php;mvc;controller;laravel;rest