jeroennoten / Laravel-AdminLTE

Easy AdminLTE integration with Laravel
MIT License
3.78k stars 1.08k forks source link

[QUESTION]: How to access named route in config adminlte.php #1260

Closed Tonmoy-DAPL closed 4 months ago

Tonmoy-DAPL commented 4 months ago

how to access named route in config adminlte.php

I have the following routes

// Reset password
Route::get('reset-password/{token}', [\App\Http\Controllers\Admin\Auth\NewPasswordController::class, 'create'])
    ->name('admin.password.reset');
Route::post('reset-password', [\App\Http\Controllers\Admin\Auth\NewPasswordController::class, 'store'])
    ->name('admin.password.update');

How can i access the above routes in config/adminlte.php

'menu' => [
    // Sidebar items:
    ['header' => 'account_settings'],
    [
        'text' => 'change_password',
        'url' => '??',
        'icon' => 'fas fa-fw fa-lock',
    ],
]
dfsmania commented 4 months ago

You need to use the route property instead of url. See the Wiki Menu Config - Route Attribute.

Tonmoy-DAPL commented 4 months ago

@dfsmania It's working fine Thanks for your reply