public function setSlugAttribute($value){
$this->attributes['slug'] = Str::slug($this->title,"-");
}public function store(Request $request)
{
dd($request->all());
}array:5 [▼
"title" => "Second"
"published" => "1"
"slug" => null
"parent_id" => "0"
]Category::create($request->all());