user() && $this->user()->hasPermission('edit-media'); } /** * Get the validation rules that apply to the request. * * @return array|string> */ public function rules(): array { return [ 'id' => 'required|exists:media,id', 'focal_x' => 'nullable|numeric|min:0|max:100', 'focal_y' => 'nullable|numeric|min:0|max:100', 'metadata' => 'nullable|array', ]; } }