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

    beardcoder

    01/20/2023, 7:38 AM
    @Harings Rob i have the latest stable version, 2.12.x
  • h

    Harings Rob

    01/20/2023, 7:39 AM
    Check https://twill.io/docs/crud-modules/controllers.html#controllers -> permalinkBase
  • h

    Harings Rob

    01/20/2023, 7:40 AM
    If you are working on a new project. I highly recommend trying out Twill 3 as it has new features and will soon be released stable.
  • h

    Harings Rob

    01/20/2023, 7:40 AM
    In twill 3 you can use the setupController method in your controller and call
    setPermalinkBase('example'): The static permalink base to your module. Defaults to setModuleName when empty.
  • b

    beardcoder

    01/20/2023, 7:43 AM
    how can i upgrade to the v3 version?
  • h

    Harings Rob

    01/20/2023, 7:45 AM
    You can upgrade by changing the version in composer and follow these instruction https://github.com/area17/twill/blob/3.x/UPGRADE.md Before you do this, make sure to make a commit/backup as the script will upgrade your code.
  • b

    beardcoder

    01/20/2023, 7:52 AM
    @Harings Rob Wow 🙂 it works perfectly ❤️
  • h

    Harings Rob

    01/20/2023, 7:52 AM
    it does? 😄 That's good news haha
  • b

    beardcoder

    01/20/2023, 7:54 AM
    Yes. No exeption no issues. all runs perfectly
  • b

    beardcoder

    01/20/2023, 7:56 AM
    Good news to switch from sulu to twill 😄
  • h

    Harings Rob

    01/20/2023, 7:57 AM
    Let us know what your experience is! If you have ideas for improvements, feel free to create an issue on github and we'll look into it.
  • b

    beardcoder

    01/20/2023, 7:57 AM
    Okay big thx
  • b

    beardcoder

    01/20/2023, 7:57 AM
    i have found i bug in the ui ^^
  • b

    beardcoder

    01/20/2023, 7:58 AM
    Ah but it is fixed in v3
  • b

    beardcoder

    01/20/2023, 7:59 AM
    So have a nice day. I must go to work and rebuild old admin interfaces from angular to vue ^^
  • b

    björn

    01/20/2023, 10:57 AM
    Hi. Jumping back onto Twill with the idea of using it in a headless setup. I'm messing around with a test setup to see what works best for an upcoming project. So I have Laravel 9 with Breeze, InertiaJS and React for the Laravel dashboard the project needs and then I got Twill 3rc2 up and running. I notice Twill creates its own login system. Is it possible to have one login for this kind of setup? I want Twill to handle the content for the site, but need to do a bunch of other admin stuff in Laravel in a separate dashboard. Can anyone tell me if it's wise to have this kind of setup? Do I run the risk of running into conflicts?
  • i

    ifox

    01/20/2023, 11:03 AM
    Hi @björn I have no concerns with this approach, quite a few users over the years told us they were combining Twill in their Laravel applications with other data management solutions / custom dashboards. The one thing I'll call out is that to be managed in Twill your models need a few things like being soft deletable and use
    $fillable
    , but that shouldn't really conflict with anything. Regarding a shared login, this is a bit more tricky but achievable.
  • h

    Harings Rob

    01/20/2023, 11:07 AM
    A trick I use to handle authentication is, when logging in I also set the twill-users guard for that user.
  • b

    björn

    01/20/2023, 11:22 AM
    Thanks for the info. Regarding the models, do you mean, if I wanted to use one of the models from the custom dashboard side in Twill? I'm going to have to combine the whole lot on an API (hoping to use graphql in fact), for a Next.js frontend to query.
  • b

    björn

    01/20/2023, 11:23 AM
    I'm not familiar with this? Is there anything about it in the docs?
  • h

    Harings Rob

    01/20/2023, 11:24 AM
    Copy code
    php
    <?php
    
    namespace App\Http\Middleware;
    
    use Illuminate\Auth\Middleware\Authenticate as Middleware;
    use Illuminate\Support\Facades\Auth;
    use Illuminate\Support\Facades\Route;
    
    class Authenticate extends Middleware
    {
        protected function authenticate($request, array $guards)
        {
            parent::authenticate($request, $guards);
    
            /**
             * @twill
             * This logs in the user using the twill_users guard so that the subui will work.
             */
            Auth::guard('twill_users')->login(Auth::user());
        }
    }
    This is how I handle it.
  • b

    björn

    01/20/2023, 11:27 AM
    Ah. Oki, shot! I'll play around with that and let you know how it goes.
  • i

    ifox

    01/20/2023, 11:28 AM
    yes thats what I meant
    b
    • 2
    • 1
  • j

    jinita.kanvic.com

    01/20/2023, 12:18 PM
    Hi
  • j

    jinita.kanvic.com

    01/20/2023, 12:19 PM
    i want to update use tiptap editor and when i used type tiptap in editor nothing happen
  • j

    jinita.kanvic.com

    01/20/2023, 12:19 PM
    @formField('wysiwyg', [ 'name' => 'case_study', 'label' => 'study text', 'type' => 'tiptap', 'maxlength' => 200, 'editSource' => true, 'note' => 'Hint message`', ])
    h
    • 2
    • 1
  • j

    jinita.kanvic.com

    01/20/2023, 12:19 PM
    Can you please suggest how i can change editor type
  • j

    jinita.kanvic.com

    01/20/2023, 12:19 PM
    ?
  • o

    Olivier

    01/20/2023, 5:00 PM
    In Twill 2, how can I configure the browser field to show child in a parent-child relationship (ie: issueArticles example in the doc)?
    h
    • 2
    • 1
  • c

    ckmirafss

    01/20/2023, 11:22 PM
    Hello, how can get the position id of these images on blade?
    h
    • 2
    • 2
1...450451452...484Latest