Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7986135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:45:48+00:00 2026-06-04T11:45:48+00:00

I have a situation where a company is managed by a user. i.e.: A

  • 0

I have a situation where a company is managed by a user. i.e.: A user can create, read, update and delete their own companies. But I’d also like that same user to access a list of all companies in the system, even when logged out.

e.g.:

user_a manages the following companies: company_a and company_b

user_b manages the following companies: company_c and company_d

user_a should be able to see a list of his own companies (a and b) as well as a list of all companies (a, b, c, and d)

What’s the best way to handle this in the controllers?

Idealy, I’d like to have it setup under 2 separate routes as follows:

/companies
/users/1/companies

Should I have one controller for companies, or multiple? and how would that work?

I’m looking for best practices in this type of scenario.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T11:45:51+00:00Added an answer on June 4, 2026 at 11:45 am

    IMHO if all user can see all companies it’s perfect to have one controller to get this job. Just in template you can check if current user is author of specified company and then add link to edit this company etc. if you want of course.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use symfony 1.4.10 I have next situation: User can create Ads and he
I have situation where a user can manipulate a large set of data (presented
My company has acquired several companies lately. We are a Java shop but have
I have situation in which I read a record from a database. And if
I have situation like this: user submits form with action='/pay' in '/pay' I have
I have a situation in which a managed DLL calls some unmanaged DLL. I
I have a weird situation, client does't want their application to support multitasking so
I have a situation where I have two models, companies and permissions, where companies
I have the following situation: A project can belong to multiple departments, Employees are
Here is the situation. This small company I'm working with wants to have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.