George Sharvadze
George Sharvadze

Reputation: 570

Laravel - How to define multiple Resource Controllers?

How can I add multiple Resource Controllers to my Routes file? I've tried the following:

Route:resource('customer', 'CustomerController');
Route:resource('loan', 'LoanController');

but it doesn't work. "Label 'Route' already defined" exception appears

Upvotes: 2

Views: 1687

Answers (1)

Laurence
Laurence

Reputation: 60068

You have a typo - you are using one colon : when it should be double ::

Route::resource('customer', 'CustomerController');
Route::resource('loan', 'LoanController');

Upvotes: 5

Related Questions