diglactic / laravel-breadcrumbs

Laravel Breadcrumbs - A simple Laravel-style way to create breadcrumbs.
https://packagist.org/packages/diglactic/laravel-breadcrumbs
MIT License
868 stars 63 forks source link

withView() before render() call #27

Closed da-sie closed 3 years ago

da-sie commented 3 years ago

I've added withView() method that allows to pass view path in blade files, with following syntax while rendering: {{ Breadcrumbs::withView('partials.custom_breadcrumbs')->render()}} This way you don't have to use globally defined view file and pass it even dynamically depending on environment (site, administration, multi-theme, etc.

shengslogar commented 3 years ago

How is this different than the view method?

https://github.com/diglactic/laravel-breadcrumbs#switching-views-at-runtime

da-sie commented 3 years ago

Damn, I didn't find it in readme "Custom Templates” section, so I committed the solution, thinking I’m saving the world or something... Of course, dump this one. My fault. Thank you for your time.

Regards, Przemek

Wiadomość napisana przez Sheng Slogar @.***> w dniu 23.05.2021, o godz. 14:53:

How is this different than the view method?

https://github.com/diglactic/laravel-breadcrumbs#switching-views-at-runtime https://github.com/diglactic/laravel-breadcrumbs#switching-views-at-runtime — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/diglactic/laravel-breadcrumbs/pull/27#issuecomment-846558805, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADQEAX435KPLP3X7BKG5RTTPD3GDANCNFSM45LVRT4A.

shengslogar commented 3 years ago

Appreciate the PR. Docs could probably use some improvement 👍