'sometimes|nullable|string', 'image' => 'sometimes|nullable|image|mimes:jpeg,png,jpg,gif', 'image_path' => 'string|sometimes', 'type' => 'string|sometimes', 'category' => 'string|sometimes|nullable', 'video_link' => 'string|sometimes|nullable', 'status' => 'required', ]; } public function messages() { return [ 'detail.string' => 'The detail field must be a string.', 'image.image' => 'The image must be an image file.', 'image.mimes' => 'The image must be a file of type: jpeg, png, jpg, gif.', 'image_path.string' => 'The image path field must be a string.', 'type.string' => 'The type field must be a string.', 'category.string' => 'The category field must be a string.', 'video_link.string' => 'The video link field must be a string.', 'status.required' => 'The status field is required.', ]; } /** * Determine if the user is authorized to make this request. */ public function authorize(): bool { return true; } }