Last active
October 2, 2016 21:06
-
-
Save PavelPolyakov/7688524 to your computer and use it in GitHub Desktop.
Complete example of the named routes for the Route::controller, Laravel 4.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// for Laravel 4.1.* | |
Route::controller('bank-accounts', 'Dashboard_BankAccountsController', array('getCreate'=>'dashboard.bank-accounts.create', | |
'postCreate'=>'dashboard.bank-accounts.create.post')); | |
Route::get('bank-accounts', array('as' => 'dashboard.bank-accounts', 'uses' => 'Dashboard_BankAccountsController@getIndex')); | |
// for Laravel 4.0.* it was possible to do like this | |
Route::get('bank-accounts', array('as' => 'dashboard.bank-accounts', 'uses' => 'Dashboard_BankAccountsController@getIndex')); | |
Route::controller('bank-accounts', 'Dashboard_BankAccountsController', array('getCreate'=>'dashboard.bank-accounts.create', | |
'postCreate'=>'dashboard.bank-accounts.create.post')); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I recommend to use namespaces for routes like:
Dashboard\BankAccounts