storage url o'zgartirildi

This commit is contained in:
2026-04-28 15:02:06 +05:00
parent 3aa4601229
commit bb733d14c1
37 changed files with 282 additions and 407 deletions

View File

@@ -22,7 +22,8 @@ class Update extends FormRequest
return [
'title' => 'array',
'title.*' => 'required',
'published' => 'required',
'published' => 'nullable',
'products' => 'nullable|array',
//'category_id' => 'required',
];
}
@@ -40,14 +41,14 @@ class Update extends FormRequest
*/
public function getPublished(): bool
{
return $this->get('published');
return filter_var($this->get('published', false), FILTER_VALIDATE_BOOLEAN);
}
public function getCategory()
{
if ($this->get('category_id')) {
$this->get('category_id');
if ($this->get('category_id') && $this->get('category_id') != 0) {
return $this->get('category_id');
}
return null;