storage url o'zgartirildi
This commit is contained in:
@@ -22,7 +22,8 @@ class Store extends FormRequest
|
||||
return [
|
||||
'title' => 'array',
|
||||
'title.*' => 'required',
|
||||
'published' => 'required',
|
||||
'published' => 'nullable',
|
||||
'products' => 'nullable|array',
|
||||
//'category_id' => 'required'
|
||||
];
|
||||
}
|
||||
@@ -40,7 +41,7 @@ class Store extends FormRequest
|
||||
*/
|
||||
public function getPublished(): bool
|
||||
{
|
||||
return $this->get('published');
|
||||
return filter_var($this->get('published', false), FILTER_VALIDATE_BOOLEAN);
|
||||
}
|
||||
|
||||
|
||||
@@ -49,8 +50,8 @@ class Store extends FormRequest
|
||||
*/
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user