Giter VIP home page Giter VIP logo

laravel-breadcrumbs's People

Contributors

a1tem avatar andreyco avatar arcanedev-maroc avatar baijunyao avatar boris-glumpler avatar christian-thomas avatar d13r avatar dabich avatar danielgelling avatar dwightwatson avatar freddiecoleman avatar jacurtis avatar kerwitz avatar levacic avatar mbabker avatar nyholm avatar omranic avatar tabuna avatar tedslittlerobot avatar yahya-uddin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

bunix joshuadwire

laravel-breadcrumbs's Issues

Breadcrumbs for Eloquent model views

Hi there!

First of all thank you for taking over this project!

I was wondering whether the following would be possible:

In a standard Eloquent Model with Controller, I have the following views:

  • index
  • show
  • edit

It seems obvious that the order of breadcrumbs would be Index / Show / Edit.
The Index-Breadcrumb should show as the actual model name, and then it makes more sense to display the Show-Breadcrumb as the actual id of the model.

Visually that would mean something like

  • Posts for index
  • Posts / 123 for show
  • Posts / 123 / Edit for edit

I was able to implement that. However in terms of UX I'd like to make the structure more concise and put the model id as an independent part of the breadcrumbs for show and edit. Something like the following

  • Posts for index (as before)
  • Posts / 123 / Details for show, where 123 / Details could be the current route (= no hyperlink)
  • Posts / 123 / Edit for edit, where 123 links to show (!)

So, the parent for both show and edit would be index, however...


I basically just came up with a (kind of hacky) solution while writing this (rubber-ducking for the win!).
I will just push a <a href="ROUTE_TO_SHOW">123</a> / Edit for the edit breadcrumb.

If there's a better solution after all, please let me know.

I'll leave this here in case anybody else comes up with the same problem.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.