Skip to main content

Black Friday 2025! Only until December 1st: coupon FRIDAY25 for 40% off Yearly/Lifetime membership!

Read more here

Loydtafireyi/ZimCart-Laravel-Ecommerce

213 stars
1 code files
View Loydtafireyi/ZimCart-Laravel-Ecommerce on GitHub

app/Http/Requests/SubCategory/CreateSubCategoryRequest.php

Open in GitHub
use Illuminate\Foundation\Http\FormRequest;
 
class CreateSubCategoryRequest extends FormRequest
{
public function authorize()
{
return true;
}
 
public function rules()
{
$id = $this->route('id');
 
return [
'name' => 'required:sub_categories,name,' .$id,
'category_id' => 'required',
'slug' => 'unique:sub_categories,slug,'.$id,
];
}
}

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.