Skip to content

Route name not working get ,post and put and delete method but resource route is working #1048

@dibakar1990

Description

@dibakar1990

Multi tenant route issue

my tenant route is:

Route::middleware([
    'web',
    InitializeTenancyByDomain::class,
    
    PreventAccessFromCentralDomains::class,
])->group(function () {   

    Route::get('/', function () {
        return view('tenant.auth.login');
    });
    
    Route::middleware('auth')->group(function () {
        Route::resource('profile',ProfileController::class)->only('index','edit','update');
        Route::get('profile/setting',[ProfileController::class,'setting'])->name('profile.setting');
        Route::get('profile/change/password',[ProfileController::class,'setting'])->name('profile.change.password');
        Route::post('profile/update/password',[ProfileController::class,'setting'])->name('profile.update.password');
        
    });

    require __DIR__ . '/tenant-auth.php';
});

i have used route name {{ route('profile.setting') }}

<a href="{{ route('profile.setting') }}">
  <em class="icon ni ni-lock-alt-fill"></em>
  <span>Security Settings</span>
</a>

Screenshot from 2024-08-23 17-28-48

Route [profile.setting] not defined.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions