framework icon indicating copy to clipboard operation
framework copied to clipboard

Not working properly.

Open shankhadevpadam opened this issue 2 years ago • 3 comments

Installed the application after following these two steps and run the app and get the error below.

https://vanilo.io/docs/3.x/installation

https://vanilo.io/docs/3.x/admin-installation

Route [vanilo.admin.product.index] not defined.

shankhadevpadam avatar Jul 06 '22 10:07 shankhadevpadam

Did you add the Admin module to config/concord.php?

fulopattila122 avatar Jul 25 '22 12:07 fulopattila122

return [
    'modules' => [
        Vanilo\Foundation\Providers\ModuleServiceProvider::class,
        Konekt\AppShell\Providers\ModuleServiceProvider::class => [
            'ui' => [
                'name' => 'Shop Admin', // Your app's name to display on admin
                'url'  => '/admin/dashboard', // Base/Home URL after login (eg. dashboard)
                'routes' => [
                    'prefix' => 'admin',
                ],
            ],
        ],
        Vanilo\Admin\Providers\ModuleServiceProvider::class => [
            'routes' => [
                'prefix' => 'admin',
            ],  
        ],
    ],
    'register_route_models' => true
];

shankhadevpadam avatar Aug 02 '22 05:08 shankhadevpadam

Use this instead:

return [
    'modules' => [
        Vanilo\Foundation\Providers\ModuleServiceProvider::class,
        Konekt\AppShell\Providers\ModuleServiceProvider::class => [
            'ui' => [
                'name' => 'Shop Admin', // Your app's name to display on admin
                'url'  => '/admin/dashboard', // Base/Home URL after login (eg. dashboard)
            ],
        ],
        Vanilo\Admin\Providers\ModuleServiceProvider::class,
    ],
    'register_route_models' => true
];

The reason is that the routes => [prefix => 'admin'] entries in the config are both redundant (the prefix is admin anyway), and erroneous since it doesn't include the route file definitions of appshell and admin.

When using custom route config, those values from the default module config need to be present as well. This is due to how Laravel's Config::set() method works, it overwrites nested config arrays.

fulopattila122 avatar Aug 10 '22 05:08 fulopattila122

People keep making this same mistake because of the documentation here. Please where can we make PR for this.

peterson-umoke avatar Sep 09 '22 18:09 peterson-umoke

https://github.com/vanilophp/docs

fulopattila122 avatar Sep 09 '22 21:09 fulopattila122