https://twill.io logo
Join Discord
Powered by
# ❓questions
  • g

    Gvido Blue Fox

    05/30/2022, 2:31 PM
    Hi! How can i apply the presenter to the 'title' field? Now I see the game_id ($titleColumnKey), but I need the name of the game, by this id
  • h

    Harings Rob

    05/30/2022, 2:32 PM
    Hey @Gvido Blue Fox you cannot use $titleColumnKey = 'name'?
  • g

    Gvido Blue Fox

    05/30/2022, 2:32 PM
    protected $titleColumnKey = 'game_id';
  • g

    Gvido Blue Fox

    05/30/2022, 2:32 PM
    yes
  • g

    Gvido Blue Fox

    05/30/2022, 2:33 PM
    I get this ID from a relationship
  • h

    Harings Rob

    05/30/2022, 2:33 PM
    oh
  • h

    Harings Rob

    05/30/2022, 2:34 PM
    https://twill.io/docs/crud-modules/controllers.html
  • h

    Harings Rob

    05/30/2022, 2:34 PM
    you can use
    protected $indexColumns = [
    Copy code
    php
            'relationName' => [ // relation column
                // Take a look at the example in the next section fot the implementation of the sort
                'title' => 'Relation name',
                'sort' => true,
                'relationship' => 'relationName',
                'field' => 'relationFieldToDisplay'
            ],
  • g

    Gvido Blue Fox

    05/30/2022, 2:49 PM
    Good. And how to use this column instead of 'title'?
  • g

    Gvido Blue Fox

    05/30/2022, 2:50 PM
    @Harings Rob
  • h

    Harings Rob

    05/30/2022, 2:59 PM
    I think if you setup $indexColumns, you have full control over the table and you do not have to use titleColumnKey
  • g

    Gvido Blue Fox

    05/30/2022, 3:00 PM
    What should I write here?
  • h

    Harings Rob

    05/30/2022, 3:01 PM
    It should not matter. You can leave it to game_id.
  • h

    Harings Rob

    05/30/2022, 3:01 PM
    I can be wrong about this 😄
  • g

    Gvido Blue Fox

    05/30/2022, 3:01 PM
    nice
  • g

    Gvido Blue Fox

    05/30/2022, 3:02 PM
    i have error
  • h

    Harings Rob

    05/30/2022, 3:03 PM
    ok, I have to create a setup to test this, give me a minute (or 5)
  • g

    Gvido Blue Fox

    05/30/2022, 3:04 PM
    ok
  • h

    Harings Rob

    05/30/2022, 3:10 PM
    Game is not a twill module? What type of relation are you using?
  • g

    Gvido Blue Fox

    05/30/2022, 3:22 PM
    Is there an choices?
  • h

    Harings Rob

    05/30/2022, 3:58 PM
    Hey @Gvido Blue Fox, sorry other things came up. I will check further in the morning and let you know.
  • g

    Gvido Blue Fox

    05/30/2022, 4:01 PM
    Okay, I'm waiting
    h
    • 2
    • 60
  • p

    Plexus

    05/31/2022, 2:41 AM
    Could someone please help me with moduleNames if I have controller, model and repository that are camelCased is there anyway to make the admin urls for modules and singletons kebab-cased?
    h
    i
    • 3
    • 5
  • p

    Plexus

    05/31/2022, 2:42 AM
    It irks me seeing camelCased urls
  • d

    dedli

    05/31/2022, 5:52 AM
    Hi guys ) How can I manipulate data to browser inside the block? Not inside block there is getBrowserData method. I need to add near title in browser select window addition data (page category).
    h
    • 2
    • 3
  • h

    Harings Rob

    05/31/2022, 6:15 AM
    Title column for related model
  • h

    Harings Rob

    05/31/2022, 6:16 AM
    Could someone please help me with
  • h

    Harings Rob

    05/31/2022, 6:17 AM
    Hi guys How can I manipulate data to
  • k

    Kormi

    05/31/2022, 12:12 PM
    Hi, What is the easiest way to manage the User model (default laravel) under administrator? The admin will only be able to activate users.
  • i

    ifox

    05/31/2022, 12:12 PM
    https://twill.io/docs/guides/manage_frontend_user_profiles_from_twill.html
1...333334335...484Latest