I'm using Resourceful controller which there are default functions such as index, create, store, show, edit, update and destroy. My question is that how can I add my own function to that controller? For instance I add a function in that controller like this:
class Account extends \Eloquent {
.
.
.
/**
* Attempt login.
* GET /accounts/login
*
* @return Response
*/
public function login()
{
//
echo "You are in login page";
}
But it seems not work when i enter that url: account/login. This is my route file:
Route::resource('account', 'AccountsController');