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

    Harings Rob

    01/23/2023, 9:52 AM
    @elkex you mean to add addresses?
  • e

    elkex

    01/23/2023, 10:12 AM
    No, just to get Twill users to send a notification to
  • e

    elkex

    01/23/2023, 10:12 AM
    But I want to send them through the model
  • k

    kalle

    01/23/2023, 10:47 AM
    I would like to understand your usage. What you want to send trough model? In which format? You provided insufficent informations.
  • e

    elkex

    01/23/2023, 11:55 AM
    I want to send a notification to the Twill backend users if a user registers in the frontend so that they can accept that user 🙂
  • e

    elkex

    01/23/2023, 11:55 AM
    I can get the frontend users by doing User::all() ; but is there something similar for the Twill backend users?
  • k

    kalle

    01/23/2023, 11:58 AM
    Copy code
    \A17\Twill\Models\User::all()
    ? Its so simple that Im thinking that I get the wrong idea.
  • e

    elkex

    01/23/2023, 12:10 PM
    Aha oké, just as easy as 1 2 3
  • e

    elkex

    01/23/2023, 12:12 PM
    Is there also a backend form function for tracking changes to a form field? I am accepting the users in the Twill backend and once a user has been approved, he will receive an email.. But I don't want that email to send everytime something changes to the user's profile in the backend..
  • k

    kalle

    01/23/2023, 12:17 PM
    Logic is bad per this example you provided. You can make a better logic with some action like dropdown in which you choose to notify user or not via email on activation.
  • e

    elkex

    01/23/2023, 1:42 PM
    That's actually a good idea, thanks
  • a

    Abdullahi

    01/23/2023, 5:22 PM
    Can I hide this in my dashboard?
  • a

    Abdullahi

    01/23/2023, 5:23 PM
    & how can I add data to the all activity tab here
  • c

    crupko93

    01/23/2023, 8:20 PM
    Hello could you please help me to solve N+1 problem in my Twill app Found the following N+1 queries in this request: Model: App\Models\Page => Relation: App\Models\PageMeta - You should add "with('App\Models\PageMeta')" to eager-load this relation. Model: App\Models\Menu => Relation: A17\Twill\Models\RelatedItem - You should add "with('A17\Twill\Models\RelatedItem')" to eager-load this relation. Model: App\Models\Menu => Relation: A17\Twill\Models\RelatedItem - You should add "with('A17\Twill\Models\RelatedItem')" to eager-load this relation. Model: App\Models\Service => Relation: App\Models\Slugs\ServiceSlug - You should add "with('App\Models\Slugs\ServiceSlug')" to eager-load this relation. Model: App\Models\Service => Relation: App\Models\ServiceMeta - You should add "with('App\Models\ServiceMeta')" to eager-load this relation. Model: App\Models\Service => Relation: A17\Twill\Models\Media - You should add "with('A17\Twill\Models\Media')" to eager-load this relation. Model: App\Models\Menu => Relation: A17\Twill\Models\RelatedItem - You should add "with('A17\Twill\Models\RelatedItem')" to eager-load this relation. Model: App\Models\Technology => Relation: App\Models\Slugs\TechnologySlug - You should add "with('App\Models\Slugs\TechnologySlug')" to eager-load this relation. Because I have 50 queries and my corp website works slow....
  • i

    ifox

    01/23/2023, 8:33 PM
    @Abdullahi if you disable create in all your modules configured for the dashboard that dashboard should disappear
  • i

    ifox

    01/23/2023, 8:36 PM
    to add data to the activity tab you need to enable activity on your configured dashboard modules. Make sure to define a morphmap or use the FQCN of your model
  • i

    ifox

    01/23/2023, 8:42 PM
    Hi @crupko93 which request is that? Are you building the query yourself? Did you use the
    with
    feature to load some of them? Regarding related items, they are not the most optimized way to store browser fields for that reason. They will always end up creating n+1 queries because they are stored in a polymorphic table.
  • i

    ifox

    01/23/2023, 8:45 PM
    Now if what you are building is a corp site there's a high chance that you can cache a lot of things, if not the whole response, either using a package like response-cache, and/or a CDN.
  • c

    crupko93

    01/23/2023, 8:59 PM
    @ifox I'm using with in Page Model
    h
    • 2
    • 1
  • b

    beardcoder

    01/25/2023, 8:32 PM
    Hello together. Does twill have the possibility to build forms in the frontend?
  • b

    beardcoder

    01/25/2023, 8:32 PM
    I Need a simple contact form 🙂
  • b

    beardcoder

    01/25/2023, 9:31 PM
    Ok i have build a normal laravel form 🙂
  • b

    beardcoder

    01/25/2023, 9:32 PM
    And pass the options from the twill settings
  • i

    ifox

    01/25/2023, 9:34 PM
    hi @beardcoder there are many ways you can work with forms and twill. For simple use cases, what you did sounds great. You can use a singleton module if you need more capabilities, or even create a form builder for your admins with a block editor field. You can also create a twill module for the submissions if you want to review them in the CMS
  • b

    beardcoder

    01/25/2023, 9:35 PM
    Big thx 🙂
  • k

    Kendrickt

    01/26/2023, 3:04 AM
    Hi guys, thanks for fixing the locale setting problem in this issus https://github.com/area17/twill/issues/2074#issuecomment-1404509377 But the mediable fields still cannot be show properly. I have add some more information about the mediable fields settings. Is there are problem in the settings?
  • h

    Harings Rob

    01/26/2023, 7:59 AM
    right missed that because it was a comment not the issue itself 😄 Will check tomorrow
  • k

    Kendrickt

    01/26/2023, 8:16 AM
    Thank you!👍
  • j

    jefsev

    01/26/2023, 7:33 PM
    Hi 🙂 Is there a way to add two seperate block editors to a module, let's say one set for the header and another set for the page?
  • i

    ifox

    01/26/2023, 7:34 PM
    Hi @jefsev yes, by using a different
    name
    on the block editor field
1...452453454...484Latest