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

Cannot change admin prefix #8

Closed
tpodg opened this issue Mar 4, 2018 · 3 comments
Closed

Cannot change admin prefix #8

tpodg opened this issue Mar 4, 2018 · 3 comments

Comments

@tpodg
Copy link

tpodg commented Mar 4, 2018

When adding Framework / AppShell configuration for routes -> prefix in concord.php, an exception is raised:
DaveJamesMiller\Breadcrumbs\Exceptions\DuplicateBreadcrumbException : Breadcrumb name "home" has already been registered

@fulopattila122
Copy link
Member

Thanks for the report. I'll look into it either today or on Wednesday.

@fulopattila122
Copy link
Member

fulopattila122 commented Mar 7, 2018

Vanilo doc wasn't specific enough, I've updated it.

In the config file (concord.php) you need to include defaults as well. This is due to the way Laravel package configuration works. Quote from https://laravel.com/docs/5.6/packages#configuration:

This method only merges the first level of the configuration array. If your users partially define a multi-dimensional configuration array, the missing options will not be merged.

So your route definitions in concord.php should look something like this:

return [
    'modules' => [
        Konekt\AppShell\Providers\ModuleServiceProvider::class => [
            'ui' => [
                'name' => 'My App Admin',
                'url' => '/myadmin/product' //or whatever your admin start url should be
            ],
            'routes' => [
                'prefix'     => 'myadmin', 
		'middleware' => ['web', 'auth', 'acl'],
		'files'      => ['web'],
		'as' => 'appshell.'
	    ],
        ],
        Vanilo\Framework\Providers\ModuleServiceProvider::class => [
	    'routes' => [
		'prefix'     => 'myadmin', 
		'middleware' => ['web', 'auth', 'acl'],
		'files'      => ['admin'],
		'as' => 'vanilo.'
	    ],
        ]
    ]
];

@tpodg
Copy link
Author

tpodg commented Mar 8, 2018

Thank you for the clarification. I've tried some variations, but did not include the 'files' option.

@Romik90 Romik90 mentioned this issue Aug 26, 2019
fulopattila122 added a commit that referenced this issue Sep 15, 2021
Prevents problems like issue #8 from silently happening.
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