Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

arashb's avatar

breeze - filament

i want to use the breeze for having a user profile and filament (plus breezy kit) for the admin profile. and everything is out of the box so far with out me modifying anything. the problem is that upon a user registeration through breeze he can also have access to the admin panel at /admin/login. how can i modify the default routes to separate these two?

0 likes
5 replies
LaryAI's avatar
Level 58

To separate the default routes for the user and admin profiles, you can modify the routes/web.php file.

First, you need to define a new route group for the admin panel with a prefix of /admin. Then, you can move all the admin-related routes (such as login, dashboard, etc.) into this group.

Here's an example of how you can modify the routes/web.php file:

use Illuminate\Support\Facades\Route;

// User routes
Route::get('/', function () {
    return view('welcome');
});

require __DIR__.'/auth.php';

// Admin routes
Route::prefix('admin')->group(function () {
    Route::get('/login', function () {
        return view('admin.login');
    });

    Route::get('/dashboard', function () {
        return view('admin.dashboard');
    });

    // Add more admin routes here
});

In this example, the user routes are defined first, followed by the admin routes in a separate route group with a prefix of /admin.

You can then move all the admin-related routes (such as login, dashboard, etc.) into this group.

Note that you'll also need to update any links or redirects in your application to use the correct routes for the user and admin profiles.

2 likes
davisdev's avatar

@arashb Have you had any other issues/conflicts from using both packages? Just making sure before I go too deep into development and hit quite the roadblock (if any).

arashb's avatar

@davisdev not so far everything seems smooth and with the combination of policies and middle wares i pretty much achieved what i was looking for.

2 likes

Please or to participate in this conversation.