Localizing Resource URIs

If you use resource controllers, but want to change URL verbs to non-English, so instead of /create you want Spanish /crear, you can configure it with Route::resourceVerbs() method.

1public function boot()
2{
3 Route::resourceVerbs([
4 'create' => 'crear',
5 'edit' => 'editar',
6 ]);
7 //
8}

Like our articles?

Become a Premium Member for $129/year or $29/month
What else you will get:
  • 22 courses (477 lessons, total 38 h 20 min)
  • 2 long-form tutorials (one new every week)
  • access to project repositories
  • access to private Discord