php - Redirect to controller action in sub folder - Laravel 4 -
i'm new laravel. might simple unable find example or documentation.
i need redirect user action in controller in sub folder.
folder structure:
**app** ---**controllers** ------**admin** ---------adminhomecontroller.php (extends admincontroller) ------admincontroller.php ------basecontroller.php ---**models** ---**views** ------**admin** ---------dashboard.php ------login.php
routes.php
route::get('/login', function() { return view::make('login'); }); route::group(array('before' => 'auth'), function() { route::resource('admin', 'adminhomecontroller'); }); route::post('/login', function() { auth::attempt( ['email' => input::get('email'), 'password' => input::get('password')] ); **return redirect::action('adminhomecontroller@showadmindashboard');** });
after login i'm wanting redirect action in adminhomecontroller called "showadmindashboard". know load view i'm wanting redirect.
my error - unknown action [adminhomecontroller@showadmindashboard].
when create new classes things controllers you'll need dump composer autoload file again classmap can updated. if open composer.json
should see classmap
key , value array of directories. 1 of listed directories app/controllers
.
laravel doesn't know controller until dump new autoload. terminal run composer dump-autoload
, take no longer couple of seconds.
Comments
Post a Comment