mercredi 2 mars 2016

Route with non-English characters doesn't work with Laravel Collective

I'm trying to use routes with non-English characters (Russian cyrillic) and these routes work just fine:

Route::resource('франшизы/подкатегории', 'Franch\SubCategoryController');

However when I'm trying to use same route in Form:: construction and sending this form, I get a NotFoundHttpException in RouteCollection.php line 161 exception:

// generates: http://localhost:8000/франшизы/подкатегории/20/edit?
{!! Form::open(array('method' => 'Get', 'route' => array('франшизы.подкатегории.edit', $subCategory->id))) !!}

I've copy-pasted code and added new route and Form:: with English only characters which works just fine:

// generates: http://localhost:8000/franch/sub/20/edit?
{!! Form::open(array('method' => 'Get', 'route' => array('franch.sub.edit', $subCategory->id))) !!}

Route::resource('franch/sub', 'Franch\SubCategoryController');

My questions is how can I make non-English routes work? If it's impossible, what alternatives are there?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire