user()?->tokenCan('press-release-images:write') === true; } /** * Get the validation rules that apply to the request. * * @return array|string> */ public function rules(): array { return [ 'image' => ['required', 'image', 'mimes:jpg,jpeg,png,webp', 'max:8192'], 'title' => ['nullable', 'string', 'max:120'], 'description' => ['nullable', 'string', 'max:500'], 'copyright' => ['nullable', 'string', 'max:255'], 'is_preview' => ['nullable', 'boolean'], ]; } }