Answers for "Route::resource Verbs([]);"

PHP
1

Route::resource Verbs([]);

/**
* 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:
*/

// app/providers/AppServiceProvider.php
use Route;

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

    // ...
}
Posted by: Guest on May-01-2021

Browse Popular Code Answers by Language