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

    cooz_master

    06/23/2022, 10:13 AM
    form
  • i

    ifox

    06/23/2022, 10:14 AM
    does it work if you remove translated and default options? Did you add the column to your model fillables?
  • i

    ifox

    06/23/2022, 10:15 AM
    remove it from translated attributes
  • d

    dedli

    06/23/2022, 10:15 AM
    But it doesn't work on the external server too
  • i

    ifox

    06/23/2022, 10:15 AM
    all translations? it would use the current locale by default
  • i

    ifox

    06/23/2022, 10:16 AM
    this is a different issue. It seems like you're trying to access SVG with glide even though you shared a screenshot where you disabled that, is that deployed to your server?
  • c

    cooz_master

    06/23/2022, 10:16 AM
    It worked when i removed from translations. But i have a requirement to have checkbox for each translation
  • i

    ifox

    06/23/2022, 10:18 AM
    loop over your languages to create multiple checkbox or use the checkboxes field to have one per language
  • i

    ifox

    06/23/2022, 10:20 AM
    not ideal since you're going to have to manage that when rendering, but since the checkbox field can't be set to translated I'm not sure of another option right now
  • c

    cooz_master

    06/23/2022, 10:21 AM
    i'll try this solution then. Thanks
  • u

    23r01nf1n17y

    06/23/2022, 10:34 AM
    [solved] I've an issue to get "2 connected browser field" to work together.
    i
    d
    r
    • 4
    • 31
  • j

    JeanSilva

    06/23/2022, 12:53 PM
    Hello there! I'm new to twill. I've searched the documentation but I didn't found (although its possible I didn't look for it enough) a way to edit how the fields are presented in the index page for admins. I'm working in a project that used currency as bigint, and now I need to format how the value is showing in the view. Is there a way to do it without creating a view from scratch?
  • i

    ifox

    06/23/2022, 12:57 PM
    Hey @JeanSilva for sure, look for $indexColumns in the controller docs
  • i

    ifox

    06/23/2022, 12:57 PM
    You can use a custom accessor or a presenter approach for custom rendering
  • j

    JeanSilva

    06/23/2022, 12:58 PM
    thanks for the help :). I've tried using for example, inside the model,
    getFieldAttribute($field)
    and it worked, but it also changed how the field is presented in the form.
  • i

    ifox

    06/23/2022, 12:59 PM
    use another name
  • i

    ifox

    06/23/2022, 12:59 PM
    getFieldInListingAttribute or something
  • i

    ifox

    06/23/2022, 12:59 PM
    then use that name in your indexColumns
  • j

    JeanSilva

    06/23/2022, 1:00 PM
    I see, thanks. I'm also new in laravel, so I though it would work only on model attributes names
  • i

    ifox

    06/23/2022, 1:00 PM
    no worries!
  • d

    dedli

    06/23/2022, 1:47 PM
    With external server was problem with symlinks now everything works, thanks. I can't understand with local I add new disk to filesystem.php file:
    Copy code
    'disks' => [
        'custom' => [
            'driver' => 'local',
            'root' => storage_path('app'),
            'throw' => false,
            'url' => env('APP_URL').':8000'.'/storage',    ],
    and add to twill.php:
    Copy code
    'media_library' => [    
    'translated_form_fields' => true, 
     'disk' => 'custom'],
    but still not working
  • i

    ifox

    06/23/2022, 1:50 PM
    'url' => env('APP_URL').':8000'.'/storage',    ],
    doesn't you APP_URL already have the port?
  • d

    dedli

    06/23/2022, 1:59 PM
    variable APP_URL doesn't
    Copy code
    APP_PORT=8000
    APP_URL=localhost
  • u

    user

    06/23/2022, 2:00 PM
    Hello, need a little help here, sorry to interrupt. Need to save two dates that will be available globally. Was thinking of using the settings section but it saves only strings, right? How is the best way to do it?
  • i

    ifox

    06/23/2022, 2:05 PM
    hi @User I'd suggest a singleton module until settings are refactored to support all fields (they were indeed originally built for strings, like UI strings)
  • j

    JeanSilva

    06/23/2022, 2:22 PM
    it worked, thanks
  • u

    user

    06/23/2022, 2:33 PM
    Thanks
  • j

    JeanSilva

    06/23/2022, 2:52 PM
    Sorry to still bother, but there is another problem I'm having. I'm working on a project already on live using twill, and we noticed the translation block where it shows the localization labels, they are not showing correctly. They are showing like in the image. Is there a file or a registry on the database where these labels are being saved? So I can change them, or maybe is there a way for twill to reconfigure them?
  • i

    ifox

    06/23/2022, 4:24 PM
    interesting, and you're not reproducing locally? if you don't, it'd be due to a missing php-intl externsion, possibly
  • j

    JeanSilva

    06/23/2022, 5:46 PM
    yes, I can reproduce it locally, this is very strange, and whenever I change the translatable.php inside /config to some other language, it shows like this, except english. For example, if I change it to fr or pt, it shows like the "spanish".
1...349350351...484Latest