Closed Malek-fadel closed 1 year ago
UnexpectedValueException
Sluggable "method" for App\Models\ProductCategory:slug is not callable nor null.
at vendor/cviebrock/eloquent-sluggable/src/Services/SlugService.php:171 167▕ $slug = $slugEngine->slugify($source, $separator); 168▕ } elseif (is_callable($method)) { 169▕ $slug = $method($source, $separator); 170▕ } else { ➜ 171▕ throw new \UnexpectedValueException('Sluggable "method" for ' . get_class($this->model) .':' . $attribute . ' is not callable nor null.'); 172▕ } 173▕ 174▕ $len = mb_strlen($slug); 175▕ if (is_string($slug) && $maxLength && $len > $maxLength) {
+15 vendor frames
16 database/seeders/ProductCategorySeeder.php:17 Illuminate\Database\Eloquent\Model::__callStatic()
+7 vendor frames
24 database/seeders/DatabaseSeeder.php:21 Illuminate\Database\Seeder::call()
What does your config look like for that model?
Closing due to no response. Feel free to re-open or comment if you are still having issues.
UnexpectedValueException
Sluggable "method" for App\Models\ProductCategory:slug is not callable nor null.
at vendor/cviebrock/eloquent-sluggable/src/Services/SlugService.php:171 167▕ $slug = $slugEngine->slugify($source, $separator); 168▕ } elseif (is_callable($method)) { 169▕ $slug = $method($source, $separator); 170▕ } else { ➜ 171▕ throw new \UnexpectedValueException('Sluggable "method" for ' . get_class($this->model) .':' . $attribute . ' is not callable nor null.'); 172▕ } 173▕ 174▕ $len = mb_strlen($slug); 175▕ if (is_string($slug) && $maxLength && $len > $maxLength) {
16 database/seeders/ProductCategorySeeder.php:17 Illuminate\Database\Eloquent\Model::__callStatic()
24 database/seeders/DatabaseSeeder.php:21 Illuminate\Database\Seeder::call()