dashboard route

Hello. I have a problem with dashboard config I have a Category and CategoryArticle Models I have a dashboard config in twill.php
'dashboard' => [
'modules' =>
[
'categories' =>
[
'name' => 'categories',
'label' => 'Category',
'create' => true,
'search' => true,
'count' => true,
],
'category' =>
[
'name' => 'categoryArticle',
'label' => 'Article',
'create' => true,
'search' => true,
'count' => true,
]
]
]
'dashboard' => [
'modules' =>
[
'categories' =>
[
'name' => 'categories',
'label' => 'Category',
'create' => true,
'search' => true,
'count' => true,
],
'category' =>
[
'name' => 'categoryArticle',
'label' => 'Article',
'create' => true,
'search' => true,
'count' => true,
]
]
]
With config like that id i go to dashboard I have a error
Route [twill.categoryArticle.index] not defined.
Route [twill.categoryArticle.index] not defined.
my route twill.php file
TwillRoutes::module('categories');
TwillRoutes::module('categories.articles');
TwillRoutes::module('categories');
TwillRoutes::module('categories.articles');
where I make a error.? Thx for answer
B
bohous375d ago
when I change name from categoryArticle to categories.articles I have other error Target class [App\Repositories\Categories.articleRepository] does not exist.
K
kallefrombosnia375d ago
Try to setup it like this
'dashboard' => [
'modules' =>
[
'App\Models\Category' =>
[
'name' => 'categories',
'label' => 'Category',
'create' => true,
'search' => true,
'count' => true,
],
'App\Models\CategoryArticle' =>
[
'name' => 'categoryArticle',
'label' => 'Article',
'create' => true,
'search' => true,
'count' => true,
]
]
]
'dashboard' => [
'modules' =>
[
'App\Models\Category' =>
[
'name' => 'categories',
'label' => 'Category',
'create' => true,
'search' => true,
'count' => true,
],
'App\Models\CategoryArticle' =>
[
'name' => 'categoryArticle',
'label' => 'Article',
'create' => true,
'search' => true,
'count' => true,
]
]
]
Change the name of the Models if needed, this just an example. @bohous
B
bohous375d ago
thnks but to same error. my config now
'modules' =>
[
'\App\Models\Category' =>
[
'name' => 'categories',
'label' => 'Category',
'create' => true,
'search' => true,
'count' => true,
],
'\App\Models\CategoryArticle' =>
[
'name' => 'categoryArticle',
'label' => 'Article',
'create' => true,
'search' => true,
'count' => true,
]
]
'modules' =>
[
'\App\Models\Category' =>
[
'name' => 'categories',
'label' => 'Category',
'create' => true,
'search' => true,
'count' => true,
],
'\App\Models\CategoryArticle' =>
[
'name' => 'categoryArticle',
'label' => 'Article',
'create' => true,
'search' => true,
'count' => true,
]
]
error
Route [twill.categoryArticle.index] not defined.
Route [twill.categoryArticle.index] not defined.
K
kallefrombosnia375d ago
Are you sure that this is related to this setup? That looks like a twill-navigation.php error Something is off in your naming of \App\Models\CategoryArticle. Try to use nested module route there.
B
bohous374d ago
my setup is step to step to same as in documentation for nested modules. what kind of route you mean.?
B
bohous374d ago
but it is look like for parent-child modules the dashboard isnt work . may some code improvement will be help. if will be there a new array key for that purpose. In fashboardController:529 . Anytime isnt way to ovveride that class.?
K
kallefrombosnia373d ago
To be honest, idk really how that should work. Ping @ifox.dev
I
ifox373d ago
in a dashboard.modules entry you can specify a repository key
I
ifox373d ago
GitHub
twill/DashboardController.php at 29db4a8c6ce25263c0c3f86ecdff568b0d...
Twill is an open source CMS toolkit for Laravel that helps developers rapidly create a custom admin console that is intuitive, powerful and flexible. Chat with us on Discord at https://discord.gg/c...
Want results from more Discord servers?
Add your server
More Posts
Twill Role based accessHow would i go about adding a Role based access to CMS Components and its entries. For e.g in an imaTwill assets errorHello to everyone i have an website in production builded in twill but some twill assets in there aWhere to find block repositories?I've seen in the tutorial(https://www.youtube.com/watch?v=kAcJ5G2GhiA) some blocks like "paragraph &[3.0.0] Block class - getBlockTitle()Hi, I was trying to move Blade blocks to Class. When I wanted to move `@twillBlockTitleField` in cla[3.0.0] componentBlock overriding getBlockIcon doesn't seem to work?(Successfully changed the title by overriding it's static function) Checked twill:list:icon for the[3.0.0] Maintaining automated Permalink Generation when using getCreateForm to add fields.As soon as I add any fields, using the Formbuilder on this function, the automated permalink disappemulti select selected optionsI'm using the multi select as documented in https://twill.io/docs/form-fields/multi-select.html#mult[3.0.0-rc4] - How to show current value in a select form fieldCurrently I have my select field defined as: `@formField('select', [ 'name' => 'work_year', [3.0.0-rc4] Images not found on remote server - League\\Glide\\Filesystem\\FileNotFoundExceptionI just went from my local to my remote server and some images are showing up others are getting a 5[Twill2] Do settings section support media and how?As title says, is it possible to inject media here or should I make a custom settings singleton to h[3.x.dev] Call to undefined method ReflectionUnionType::getName()Newbie to Twill here. Fresh install of Laravel 10.4.1 / PHP 8.2.4 / MYSQL 8.0.32 on Ubuntu Budgie 2Add custom icons into twillI add the icons into the path `resource/views/admin/icons` and I run the command, result is ok, but Select an another block in a block?Hi everyone, I have a function to create a new block with name "Columns block". With this block, usMedia Library / Glide only loading JPEGsHey there, So I had a Laravel/Twill app running successfully on a subdomain with no issue. Today IAdding a vue componentGood afternoon Tell me what could be the problem? On the main page of the admin panel there is an aSave title in translationsI'm trying to save my title as a translatable field, normal fied works fine but when i make it transSet translations to activeWhile trying to set translations to active it isn't saved to database? Only english is selectablecan't use Published, Draft, Trash filters on module indexI see the buttons, they show the correct counts in the parenthesis, but when I click on them, I alwamedias XHR request with wrong schemeGreetings... I'm having trouble with accessing media library in the admin area in production. Mixeremove positioning and nesting from the page indexGood morning. Tell me how to remove positioning and nesting from the page index in the admin panel?