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

    onepiece

    09/26/2022, 12:55 PM
    how can i get the value after?
  • h

    Harings Rob

    09/26/2022, 12:56 PM
    See https://discord.com/channels/811936425858695198/811986149064441927/1023937277753311282
  • o

    onepiece

    09/26/2022, 1:02 PM
    $block = $lead->blocks(); $email = $block->input('email'); dd($email);
  • o

    onepiece

    09/26/2022, 1:03 PM
    "Call to undefined method Illuminate\Database\Eloquent\Relations\MorphMany::input()"
  • k

    kalle

    09/26/2022, 1:15 PM
    $block
    is in that case I belive collection. You cant access it like that.
  • o

    onepiece

    09/26/2022, 1:18 PM
    how can i??
  • h

    Harings Rob

    09/26/2022, 1:19 PM
    https://laravel.com/docs/9.x/collections here is the documentation for Laravel collections.
  • h

    Harings Rob

    09/26/2022, 1:21 PM
    There are many answers to your questions that can be found in the documentation. I advice to always try and check that first. Block is a regular Laravel Model.
  • o

    onepiece

    09/26/2022, 1:22 PM
    oki
  • u

    24kappa

    09/26/2022, 2:03 PM
    Hi Guys, im having some problems using Glide with S3, i've followed the instructions but images are not found, files instead works fine (of course because they dont use glide)
    i
    • 2
    • 84
  • u

    24kappa

    09/26/2022, 2:04 PM
    I've read somewhere that for Glide and S3 are need more configurations, does anybody know where i can find them? Im sure images are uploaded to my S3 Bucket but then on the site /img/.......... Glide cant find the image
  • i

    ifox

    09/26/2022, 2:27 PM
    Glide and S3
  • d

    dedli

    09/26/2022, 3:16 PM
    Hi. Is it possible to add parent module title column to $browserColumns?
  • t

    tfilos

    09/26/2022, 3:49 PM
    Hey! I was wondering, is it possible to add more fields from the relation referenced in a browser field for context? Or to modify the name listed? I have situations where an Album is associated with an Artist, for example, and it can be quite hard to find the Album in the browser without having the Artist name also be present
  • i

    ifox

    09/26/2022, 3:52 PM
    Hey @tfilos there are different ways to go about this, I would suggest to implement
    getTitleInBrowserAttribute
    in your album model
  • t

    tfilos

    09/26/2022, 3:52 PM
    It's a simple relationship so I think this could work. Will try!
  • t

    tfilos

    09/26/2022, 3:53 PM
    @ifox that actually helps to solve the display, but the browser search popup remains the same
  • t

    tfilos

    09/26/2022, 3:58 PM
    So I'm getting the getTitleInBrowserAttribute result in list of selected relations, but not in the search
  • t

    tfilos

    09/26/2022, 5:48 PM
    For posterity, this goes in the Module admin controller:
    Copy code
    /*
         * Columns of the browser view for this module when browsed from another module
         * using a browser form field
         */
        protected $browserColumns = [
            'title' => [
                'title' => 'Title',
                'field' => 'title',
            ],
        ];
  • t

    tfilos

    09/26/2022, 5:56 PM
    Unfortunately it doesn't work with a model attribute --- so this looks like it doesn't work on the search front
  • t

    tfilos

    09/26/2022, 6:03 PM
    If I had to guess looking under the hood, it looks like it directly hits the DB while searching, so mutated attributes look to be a no-go
  • h

    Harings Rob

    09/26/2022, 6:08 PM
    @tfilos maybe you need to set protected $searchColumns = []; in your target model controller?
  • t

    tfilos

    09/26/2022, 6:09 PM
    @Harings Rob will it search a mutated attribute though?
  • t

    tfilos

    09/26/2022, 6:10 PM
    It doesn't appear to
  • h

    Harings Rob

    09/26/2022, 6:14 PM
    Ah no, that would never work as you would load all, mutate , then search (for every search).
  • h

    Harings Rob

    09/26/2022, 6:14 PM
    I think you may want to search multiple fields at once?
  • t

    tfilos

    09/26/2022, 6:39 PM
    Yes, but one of the values is a field from a relation of a relation
  • t

    tfilos

    09/26/2022, 6:44 PM
    I think what I am going to do is make my own custom field, to bypass this stuff
  • i

    ifox

    09/26/2022, 11:33 PM
    @tfilos for this you can use the filter method in the browsed module repository class
  • t

    tfilos

    09/26/2022, 11:34 PM
    @ifox thanks! Is there a secondary documentation or API reference for that?
1...406407408...484Latest