5.3 (Revert) Resource Route Names No Longer Affected By Prefixes

Submitted by baqirfarooq - 1 year ago

This changed because before when using as and prefix in the same route would append both of them to your route name, so the prefix appending dropped in place of the as.

Route::group([
    'as' => 'admin.', // the trailing dot makes me think this is unintended
   // 'prefix' => 'admin' 
], function () {
    Route::resource('post', 'PostController');
});

Ads cover the costs of maintaining Laravel-tricks

comments powered by Disqus

Ads cover the costs of maintaining Laravel-tricks