route()->parameter('approach'); $this->merge([ 'type' => intval($approachModel->type->value), 'button_url' => intval($approachModel->type->value) === ApproachTypeEnum::demarche->value() ? $this->input('button_url') : null, 'published' => $this->boolean('published'), ]); $this->mergePicture('picture'); } /** * Determine if the user is authorized to make this request. */ public function authorize(): bool { return Gate::check('update', $this->route('approach')); } }