I want to create an URL string for non English stories from the story title
Ex: if the title is Laravel में आपका स्वागत है URL will be /Laravel-में-आपका-स्वागत-है-ag16826
Laravel has a facade Slug. But it won't work for non English.
How i can do this?? any help or suggestion!!! or any links where i can get help.
This method might help you URL SLUG , i tried this but spelling mistakes are there
Try this first,
Route::get('/test',function(){
return preg_replace('/\s+/', '-', trim('Laravel में आपका स्वागत है'));
});
Output
Laravel-में-आपका-स्वागत-है
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다