Laravel 8 Call to undefined function str_slug()
Install laravel/helpers package
1 | composer require laravel/helpers |
Use the below code in your own controller
1 2 | use Illuminate\Support\Str;$posts->slug = str_slug($request->input('title').' '.$posts->id, '-'); |
Comments
Post a Comment