Laravel - Controllers - Restful Localizing Resource Uris

By default, Route::resource will create resource URIs using English verbs. If you need to localize the create and edit action verbs, you may use the Route::resourceVerbs method. This may be done at the beginning of the boot method within your application's App\Providers\RouteServiceProvider:

    
    /**
     * Define your route model bindings, pattern filters, etc.
     *
     * @return void
     */
    public function boot()
    {
        Route::resourceVerbs([
            'create' => 'crear',
            'edit' => 'editar',
        ]);
    
        // ...
    }
	

Once the verbs have been customized, a resource route registration such as Route::resource('fotos', PhotoController::class) will produce the following URIs:

    
    /fotos/crear
    
    /fotos/{foto}/editar