Fix Slug Status Permohonan
This commit is contained in:
parent
9ecdaa0cdd
commit
b0c8a43304
@ -16,6 +16,7 @@
|
|||||||
$rules = [
|
$rules = [
|
||||||
'description' => 'nullable|max:255',
|
'description' => 'nullable|max:255',
|
||||||
'status' => 'required|boolean',
|
'status' => 'required|boolean',
|
||||||
|
'slug' => 'nullable|max:255',
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($this->method() == 'PUT') {
|
if ($this->method() == 'PUT') {
|
||||||
@ -37,9 +38,9 @@
|
|||||||
|
|
||||||
public function prepareForValidation()
|
public function prepareForValidation()
|
||||||
{
|
{
|
||||||
$this->merge([
|
return $this->merge([
|
||||||
'status' => isset($this->status) ? 1 : 0,
|
'status' => isset($this->status) ? 1 : 0,
|
||||||
'slug'=> Str::slug($this->name)
|
'slug' => Str::slug($this->name),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user