WebbieWorks
1 month ago
170
3
Laravel

Which Route is better?

Posted 1 month ago by WebbieWorks

Hey all, I am learning Laravel and I have seen the routes coded in 2 different ways and was wondering which one is better (easier) for an ecommerce site?

Route::get('/used-equipment.php', '[email protected]')->name('usedequipment.index');

or

Route::get('/used-equipment.php', [
    'uses' => '[email protected]',
    'as' => 'categories.usedequipment',
]);

Please sign in or create an account to participate in this conversation.