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

    Nechalon

    03/13/2023, 1:26 PM
    is there a way to print out revision user name?
  • e

    Edex

    03/13/2023, 2:37 PM
    Can you give me some hints, where to look, how can I implement a behavior like that? Thanks.
  • Capsule docker filesystem issues
    a

    AntonyPL

    03/13/2023, 9:53 PM
    Hi, i check my docker conifg of Twill and its fine, but if change in Capsules blade somewthink, they didnt refresh after save . But if i change in blade, fe. default settings section, they refresh expected 🙂 Descr: first two screens became from Twill Capsule blade, last two: default settings blade
    i
    • 2
    • 16
  • i

    ifox

    03/13/2023, 9:55 PM
    Where do you mean? It's already displayed
  • i

    ifox

    03/13/2023, 9:58 PM
    you'd need to add a new prop to the select blade component and make changes to the Vue component behind it
  • n

    Nechalon

    03/14/2023, 9:49 AM
    @ifox, yes, but I have to display it where the table rows are displayed, before you enter the forms page.
    k
    • 2
    • 1
  • h

    Hip-Hop

    03/14/2023, 11:21 AM
    Good afternoon. Tell me how to get a list of blocks from blockEditor?
    k
    i
    • 3
    • 15
  • j

    jefsev

    03/14/2023, 12:47 PM
    In my module i have: $model->order_status Can i get the order_status with some color circle in the list view?
  • j

    jefsev

    03/14/2023, 12:47 PM
    By adding another column maybe?
  • e

    Edex

    03/14/2023, 1:01 PM
    Here should be an v-if="toolbar.table" (line 93-94 in frontend/js/components/WysiwygTiptap.vue) ?
  • e

    Edex

    03/14/2023, 1:03 PM
    If I don't have table in toolbar, there is an unusable table button
  • i

    ifox

    03/14/2023, 1:06 PM
    correct @Edex that needs to be fixed
  • i

    ifox

    03/14/2023, 1:07 PM
    you can render custom html in index columns
  • j

    jefsev

    03/14/2023, 1:08 PM
    Where do i find index columns ?
  • e

    Edex

    03/14/2023, 1:10 PM
    also, when added with formview, default wysiwyg editor is quill, not tip tap (it is tip tap the default when added with form builder)
  • i

    ifox

    03/14/2023, 1:11 PM
    that's if you're not using controller/class based forms
  • i

    ifox

    03/14/2023, 1:12 PM
    it still needs to be updated to be the default from blade forms
  • i

    ifox

    03/14/2023, 1:13 PM
    https://twill.io/docs/3.x/crud-modules/tables.html#columns
  • j

    jefsev

    03/14/2023, 1:22 PM
    thx
  • n

    Nechalon

    03/14/2023, 2:23 PM
    I'm trying to sort the table rows with a scope and the order function in the repository, I believe this simple scope should be good, but it just clears the table rows when clicking on sorting
    Copy code
    public function scopeOrderByCreatedAtFormatted($query, $direction = 'asc')
        {
            return $query
                ->select('blog_post_comments.created_at')
                ->where('blog_post_comments.created_at')
                ->orderBy('blog_post_comments.created_at', $direction);
        }
    What else do I need? I tried setting up 'relationship' key in the indexColumns, but it just breaks everything.
  • n

    Nechalon

    03/14/2023, 2:24 PM
    I want to sort the data according to
    created_at
    column.
  • i

    ifox

    03/14/2023, 2:46 PM
    the select is your query is forcing it to return only that specific column
  • n

    Nechalon

    03/14/2023, 2:55 PM
    Yes, just noticed it a bit later, fixed it
  • j

    jefsev

    03/14/2023, 7:13 PM
    Hi, When doing the following in a multilingual site i only get the title from the main lang if im on the other lang i get nothing for title. Icon does work:
    Copy code
    @php $renderedModule = $renderData->model; @endphp
                @if (null !== $renderedModule->file('icon'))
                    <div class="flex items-center mb-6 gap-2">
                        <img src="{{ $renderedModule->file('icon') }}" class="w-8 h-8 mr-2">
                        <span class="mb-0 text-base font-bold uppercase text-orange">{!! $renderedModule->title !!}</span>
    
                    </div>
                @endif
  • j

    jefsev

    03/14/2023, 7:13 PM
    And here it always shows the title from the main lang and not the correct one if i'm on a different lang: Edit: slug does work correctly so im confused.
    Copy code
    @foreach ($services as $service)
                    <a href="{{ route('dienst', $service->slug) }}">
                        <div
                            class="relative flex flex-row items-center justify-between py-4 pl-6 pr-4 mb-5 bg-white card-shadow hover:shadow-md rounded-xl ">
                            <div class="flex flex-row items-center gap-4">
                                <img src="{{ $service->file('icon') }}" class="w-8 h-8">
                                <h5 class="mb-0">{!! $service->title !!}</h5>
                            </div>
                            <span class="flex items-center justify-center w-12 h-12 bg-orange aspect-square rounded-xl">
                                <svg class="-rotate-90 brightness-0 invert" xmlns="http://www.w3.org/2000/svg" width="14"
                                    height="8" viewBox="0 0 14 8">
                                    <path id="Path_20" data-name="Path 20"
                                        d="M10.719-6.719A1.043,1.043,0,0,1,11-6a1.043,1.043,0,0,1-.281.719l-6,6A1.043,1.043,0,0,1,4,1,1.043,1.043,0,0,1,3.281.719,1.043,1.043,0,0,1,3,0a1.043,1.043,0,0,1,.281-.719L8.594-6,3.281-11.281A1.043,1.043,0,0,1,3-12a1.043,1.043,0,0,1,.281-.719A1.043,1.043,0,0,1,4-13a1.043,1.043,0,0,1,.719.281Z"
                                        transform="translate(1 -3) rotate(90)" fill="#fa9233" />
                                </svg>
                            </span>
    
                        </div>
                    </a>
                @endforeach
    Does anybody have an idea why.
  • j

    jefsev

    03/14/2023, 7:13 PM
    This is the route:
    Copy code
    // Diensten archive
            Route::get(
                LaravelLocalization::transRoute("routes.diensten"),
                function (DienstenArchive $dienstenArchive) {
                    return view("site.diensten.index", [
                        "page" => $dienstenArchive::firstOrFail(),
                        "services" => Diensten::where("published", 1)
                            ->orderBy("created_at", "asc")
                            ->get(),
                    ]);
                }
            )->name("diensten");
    
            // Diensten single
            Route::get(LaravelLocalization::transRoute("routes.dienst"), function (
                Diensten $diensten
            ) {
                return view("site.diensten.show", [
                    "page" => $diensten,
                    "services" => Diensten::where([
                        ["published", "=", 1],
                        ["id", "!=", $diensten->id],
                    ])
                        ->orderBy("created_at", "desc")
                        ->get(),
                ]);
            })->name("dienst");
  • i

    ifox

    03/15/2023, 12:47 AM
    Is the middleware applied to these routes?
  • i

    ifox

    03/15/2023, 12:48 AM
    Also I'd recommend using controllers so you can cache routes
  • i

    ifox

    03/15/2023, 12:48 AM
    Closure in routes files prevent Laravel route caching
  • s

    savchuk.ivan

    03/15/2023, 4:45 AM
    According to the instructions, I created the same component. Added translation addLabel: function() { return this.$trans('fields.slideshow.add-label', 'attach') }, Rebuilt the build. Added translation. Everything is working. Thank you.
1...478479480...484Latest