Organize routes and sub-routes in legal app using Laravel -


i'm working in legal web app using laravel 5, , have 11 classes 'models' , working fine.

in real world there lawyers working in different offices, each office had 1 admin can create or open cases or 'lawsuits' litigants, , lawyers follow , update cases in courts or when offices.

the problem confuse how sort them in route , sub-routes ..

how have sort them starting lawsuits, litigants or lawyers ?

something such: offices/{id}/lawyers/{id}/lawsuits/{id}/

a)

  • offices -> lawyers -> lawsuits -> sessions -> judgments
  • offices -> lawyers -> lawsuits -> litigants
  • offices -> meetings
  • articles
  • courts
  • judges
  • users

b)

  • offices -> lawsuits -> sessions -> judgments
  • offices -> lawsuits -> litigants
  • offices -> lawsuits -> lawyers
  • offices -> meetings
  • articles
  • courts
  • judges
  • users

c)

  • offices -> litigants -> lawsuits -> sessions -> judgments
  • offices -> litigants -> lawsuits -> lawyers
  • offices -> meetings
  • articles
  • courts
  • judges
  • users

or have create them all? or else don't know ? there "right way" sort it?

as per looking @ question , needs of demand, think best 1 provided you. go first one. , yeah, 1 more tip you.

something such: offices/{id}/lawyers/{id}/lawsuits/{id}/

don't sort them that. use this:

{officeid}/{lawyerid}/{lawsuitid}

and yeah. example, if possible, make them more small oid , lid , lsid.

hope helps.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -