Skip to content
This repository has been archived by the owner on Oct 18, 2020. It is now read-only.

[PROPOSAL] Set the default view in a config file, rather than in application code #10

Closed
tedslittlerobot opened this issue Aug 20, 2013 · 1 comment

Comments

@tedslittlerobot
Copy link
Contributor

Rather than calling Breadcrumbs::setView, to change the view, specify the default view using a Config option - it seems awkward to have to set the view in application code.

suggested implementation:

eg. in your service provider, something like:

public function register()
{
    $this->app['breadcrumbs'] = $this->app->share(function($app)
    {
        $bc = new BreadcrumbsManager($app['view'])

        $bc->setView($app['config']['breadcrumbs::view.name']);

        return $bc;
    });
}

then set the default value in the a package resources config file.

@d13r
Copy link
Owner

d13r commented Aug 20, 2013

Sounds sensible. If you'd like to make a PR with this, sample config files and updates to the README I will include it. If not I will look into it next time I'm working on this package.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants