public function boot()
{
Validator::extend('has_related_categories', function ($attribute, $value, $parameters, $validator) {
$postId = $value;
$relatedCategoriesCount = DB::table('category_post')
->where('post_id', $postId)
->count();
return $relatedCategoriesCount > 0;
});
}