Forum

Module routing 403

Posted in CategoryDevelopment
  • Andy Lombardi    ( User ) 1 month ago
    I find it hard to understand the documentation. Once I have created a module, installed it I created a menu item (good). It does not go in second position as it should:

    ```
    public function handle(Event $event)
    {
    // Add new menu item
    $event->menu->add([
    'route' => ['black-box.index', []],
    'title' => "Orari",
    'icon' => 'fas fa-stopwatch',
    'order' => 2,
    ]);
    }
    ```

    Then I go in Routes/portal.php and I created this:

    ```
    Route::group([
    'prefix' => 'portal',
    'middleware' => 'portal',
    'namespace' => 'Modules\BlackBox\Http\Controllers',
    ], function () {
    Route::get('black-box', function () {dd('here');})->name('black-box.index');
    });
    ```

    If I visit myapp.test/portal/black-box it shows 403 error
  • Andy Lombardi    ( User ) 1 month ago
    I don't see how to delete this discussion. The routing is handled, the menu order not. :(
    Sorry

Please login or register to leave a response.