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 9044863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T11:05:49+00:00 2026-06-16T11:05:49+00:00

I am building an application and my customer wants to implement a basic authentication

  • 0

I am building an application and my customer wants to implement a basic authentication system with group permissions. All good.

The problem I want to tackle is that he wants to be able to set for each user group the default landing url, when they log in. He wants to do that via form, so it can’t be hardcoded.

For example: Administratror’s default url would be

myapp/dashboard

and the Writer’s would be

myapp/write

At first i wanted to create the table for all url and connect them to groupPermissions table, but it look a bit redundant.

My app is build with Laravel PHP Framework.

PROBLEM: What is the best way to approach this problem?

  • 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-16T11:05:50+00:00Added an answer on June 16, 2026 at 11:05 am

    It depends how flexible you want the system to be. If the URI path is going to be changed in the admin panel, then storing the URLs in some sort of config and loading them when logging in would be the way to go.

    For what I believe you want, I would define the URIs in a group as constants:

    <?php
    
    class Group extends Eloquent {
        const ADMIN_URI = 'myapp/dashboard'; // Could also be named routes.
        const WRITER_URI = 'myapp/write';
    }
    

    Then you can login a User and fetch their permission group, then do a check like this in the login controller:

    if(defined($redirectUri = sprintf('Group::%s_URI', strtoupper($groupName))) {
        return Redirect::to(constant($redirectUri));
    }
    

    or something like:

    switch(strtolower($group)) {
        case 'admin':
            return Redirect::to(Group::ADMIN_URI);
            break;
        case 'writer':
            return Redirect::to(Group::WRITER_URI);
            break;
        default:
            return Redirect::to('homepage');
            break;
    }
    

    It’s really a matter of opinion. The only concern you should have is a centralized place for how to store the URI routes and accessing them uniformly.

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

Sidebar

Related Questions

I need to start building a image application and my customer wants to arrange
I'm building an application that automatically installs itself on a customer system, the app
I'm building an application that is used by several different customers. Each customer has
I'm building application on Google AppEngine with Java (GAE/J) and all my data will
I'm building my application using PhoneGap Build and all builds are ok with the
I am building a Rails application accessing a legacy system. The data model contains
I'm currently building an web application for a customer that uses a rich client.
I am building a Cocoa application that will store customer data. I'm currently using
I'm building a little complex prism application. Customer requirements obliges me to utilize ModuleA
I'm building a small application with Nancy I want to have a kind of

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.