user()?->can(Permission::CUTTINGS_CREATE->value) ?? false; } /** * @return array */ public function rules(): array { return [ 'product_name' => ['required', 'string', 'max:255'], 'cutting_result' => ['nullable', 'integer', 'min:1'], 'sample' => ['nullable', 'integer', 'min:0'], 'original_outside_sample' => ['nullable', 'integer', 'min:0'], ]; } }