user()?->can(Permission::SETTINGS_UPDATE->value) ?? false; } /** * @return array */ public function rules(): array { return [ 'hero_image' => ['nullable', 'image', 'max:5120'], 'about_image' => ['nullable', 'image', 'max:5120'], 'gallery_images' => ['nullable', 'array', 'max:10'], 'gallery_images.*' => ['image', 'max:5120'], 'gallery_images_remove' => ['nullable', 'array'], 'gallery_images_remove.*' => ['integer'], ]; } /** * @return array */ public function attributes(): array { return [ 'hero_image' => 'Foto Hero', 'about_image' => 'Foto Tentang Kami', 'gallery_images' => 'Foto Lookbook', 'gallery_images.*' => 'Foto Lookbook', ]; } }