Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin Routes controller reference & csrf Middleware #29

Closed
scangroup opened this issue Feb 8, 2015 · 2 comments
Closed

Admin Routes controller reference & csrf Middleware #29

scangroup opened this issue Feb 8, 2015 · 2 comments

Comments

@scangroup
Copy link

I found that the references to the controllers in admin_routes.php needed to be adjusted.

rather than:
Route::get('video', 'App\Http\Controllers\Admin\VideoController@index');

It just needed to be
Route::get('video', 'Admin\VideoController@index');

This applies to all controller references in admin_routes.php

In addition, I needed to comment/remove the csrf middleware line in AdminController::__construct()

<?php namespace App\Http\Controllers;

class AdminController extends BaseController {

    /**
     * Initializer.
     *
     * @return \AdminController
     */
    public function __construct()
    {
        parent::__construct();
        //$this->middleware('csrf');
        $this->middleware('auth');
        $this->middleware('admin');
    }

}
@mehrdd
Copy link

mehrdd commented Feb 9, 2015

+1

@stojankukrika
Copy link
Collaborator

+1 THANK you very much @scangroup!

@zcosmin20 zcosmin20 mentioned this issue Dec 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants