i am using laravel and phpmyadmin and i need to add slug field for like 12K entries in my database .
i tried using a route to update the empty 'slug' column with slug data :
Route::get('/slug', function(){
$needSlugs = entreprise::where('slug', '')->get();
foreach($needSlugs as $slug){
$slug->update([
'slug' => Str::slug($slug->RS)
]);
}});
but it takes so much time and it returns an error after slugging about 400 columns and i need to start again and it will take me hours to finish, i searched a lot and didn't find a good solution for my case .
any good way to do it please !!
PS : i am using the sluggable-eloquent package to slug any new saved data in the DB .