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

    ifox

    01/15/2023, 11:19 PM
    See $indexColumns examples here https://twill.io/docs/crud-modules/controllers.html#controllers, or, in Twill 3, using the new table builder documented here: https://twill.io/docs/3.x/crud-modules/tables.html
  • c

    ckmirafss

    01/15/2023, 11:28 PM
    Thanks @ifox , but the column titles are missing?
  • i

    ifox

    01/15/2023, 11:46 PM
    Is this a nested listing?
  • c

    ckmirafss

    01/16/2023, 3:06 AM
    nope @ifox
  • c

    ckmirafss

    01/16/2023, 3:25 AM
    Is this a nested listing
  • a

    aolko

    01/16/2023, 6:35 AM
    The pain of finding a CRUD admin in php
  • a

    aolko

    01/16/2023, 6:35 AM
    branched out, please don't skimp on it
  • a

    Abdullahi

    01/16/2023, 10:44 AM
    Hello, I am trying out twil and I already have a laravel api project. Is there a way i can just create an api that twil will communicate with? Any guide on this?
  • a

    Abdullahi

    01/16/2023, 10:45 AM
    & how can I remove scopePublished, draft, trash, and some other things on a model.
  • h

    Harings Rob

    01/16/2023, 10:52 AM
    Hey @Abdullahi, Twill uses it's own internal api for cms communication. You will have to add the required classes/controllers on top of your existing models to start managing the content.
  • a

    Abdullahi

    01/16/2023, 10:55 AM
    Oh okay. then I am trying to turn off some things like published, trash, media library but I cant seem to understand how to do it.
  • h

    Harings Rob

    01/16/2023, 10:56 AM
    Are you on twill version 2 or 3?
  • a

    Abdullahi

    01/16/2023, 10:56 AM
    I just upgraded to 3 after seeing some messages on the channel.
  • h

    Harings Rob

    01/16/2023, 10:57 AM
    You can disable the media library using this: https://twill.io/docs/getting-started/configuration.html#enabled-features For disabling certain actions check: https://twill.io/docs/3.x/crud-modules/controllers.html#disable-defaults
  • a

    Abdullahi

    01/16/2023, 11:03 AM
    Trying this out.
  • a

    Abdullahi

    01/16/2023, 11:15 AM
    Okkay, I think i saw this, but somehow still cant figure how to disable media-library from the navigation
  • h

    Harings Rob

    01/16/2023, 11:16 AM
    You have to overwrite that configuration from your own config/twill.php file.
  • a

    Abdullahi

    01/16/2023, 11:16 AM
    <?php return [ 'enabled' => [ 'media-library' => false, ], ]; I did this
  • h

    Harings Rob

    01/16/2023, 11:20 AM
    Which is perfect, I need to make a fix for this because I did not keep in mind this variable for the menu in 3.x
  • e

    emil

    01/16/2023, 11:20 AM
    Hi! I try to enable features for a blog module - everything works well except: image links (medialibrary) are broken, tags links are broken:
    Copy code
    Relation::morphMap([
                'articles' => 'App\Models\Article',
            ]);
    when I disable this snippet from AppServiceProvider.php's boot method, images and tags are rendered normal on frontend for all articles .. but I am not able to access the features page in admin: Class "articles" not found .. any idea what I am missing? thank you
    i
    • 2
    • 2
  • a

    Abdullahi

    01/16/2023, 11:21 AM
    Oh okay, what is the variable you used?
  • h

    Harings Rob

    01/16/2023, 11:23 AM
    None at the moment. It should be added still in Twill's source, check https://github.com/area17/twill/issues/2064 (feel free to pr it if you are up for that 🙂
  • h

    Harings Rob

    01/16/2023, 11:24 AM
    otherwise it will be fixed by me later today.
  • a

    Abdullahi

    01/16/2023, 11:41 AM
    Another question I get this when trying to edit "Call to undefined method App\Models\User::blocks()"
  • h

    Harings Rob

    01/16/2023, 11:43 AM
    what are you editing? I do see a typo? 2 r in user?
  • a

    Abdullahi

    01/16/2023, 11:44 AM
    I edited before pasting here. i want to edit a data in a model.
  • h

    Harings Rob

    01/16/2023, 11:47 AM
    I looks like your model is missing "hasBlocks", however that should not be mandatory. Is there a stacktrace?
  • a

    Abdullahi

    01/16/2023, 11:49 AM
    can i disable it too? I dont think I need for this model.
  • h

    Harings Rob

    01/16/2023, 11:49 AM
    That's why I am asking a stack trace, if you are not adding hasBlocks/handleBlocks then it should not take effect
  • a

    Abdullahi

    01/16/2023, 11:51 AM
    this?
1...447448449...484Latest