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

Registering auth routes is intrusive #184

Closed
rwngallego opened this issue Jan 9, 2017 · 1 comment
Closed

Registering auth routes is intrusive #184

rwngallego opened this issue Jan 9, 2017 · 1 comment

Comments

@rwngallego
Copy link

rwngallego commented Jan 9, 2017

The AdminLTE package should not register any route inside the package itself. It's intrusive and makes it really difficult to customize the auth routes:

    Route::auth();
    Route::get('/home', 'HomeController@index');

Detailed description

The following code makes it really difficult to customize the auth routes (disabling, protecting or modifying them):

https://github.com/acacha/adminlte-laravel/blob/24cdb0a338133c7de39c7c902c011c8e03a9b447/src/Http/routes.php#L9-L11

Some users had problems trying to customizing them:
#69

#151

Also, from my own when trying to disable the provider I get this error:

Whoops, looks like something went wrong.
2/2
ErrorException in FileViewFinder.php line 112:
No hint path defined for [adminlte]. (View: /home/vagrant/Code/project/resources/views/admin/home/index.blade.php)

Possible implementation

It's better to tell the package users that they should add the following code to their routes/web.php file in the AdminLTE-laravel installation steps:

    Route::auth();
    Route::get('/home', 'HomeController@index');

Your environment

    "require": {
        "php": ">=5.6.4",
        "laravel/framework": "5.3.*",
        "acacha/admin-lte-template-laravel": "^3.1"
    },
@acacha
Copy link
Collaborator

acacha commented Jan 13, 2017

@rwngallego For me is ok the actual behaviour (of course it have advantatges and disadvantages). Feel free to propose a PR that use config or any other option to support your needs and my (and probably other ) needs.

Also there are many ways you can make litle changes in code to customize the routes.

@acacha acacha closed this as completed Jan 19, 2017
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