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

    Sami

    06/19/2022, 1:07 PM
    It's not like I don't want to add the port. I'm just used to using only Laravel but with Vue I get confused with all the ports and servers
  • s

    Sami

    06/19/2022, 1:07 PM
    Thanks and have a nice day!
  • d

    dedli

    06/20/2022, 5:23 AM
    Hi guys ) Is it any tool to fill html tables in twill? As I see wysiwyg does not have table editor from the box, I find https://github.com/alphagov/table-editor, but I do not understand how I can implement it. Thanks
  • h

    Harings Rob

    06/20/2022, 6:22 AM
    Hey @dedli, I believe there is table support in Quill. I have to work a little bit on the editor today. I will see if it is feasable to add it while I am on it.
  • d

    dedli

    06/20/2022, 7:00 AM
    Ok ) Thanks a lot! A I will be waiting )
  • h

    Harings Rob

    06/20/2022, 7:30 AM
    Hey @dedli, after checking I unfortunately have to say that tables will not be for now. This is only supported in Quill 2.x which does not have a stable release yet.
  • i

    ifox

    06/20/2022, 7:42 AM
    @dedli @Harings Rob switch your wysiwyg field to
    'type' => 'tiptap'
    , it supports tables
  • i

    ifox

    06/20/2022, 7:50 AM
    then you need to use
    hasImage('image', 'desktop')
    because the default value of the second parameter is "default"
  • m

    mateoD

    06/20/2022, 7:55 AM
    now i working thank you @ifox
  • k

    Kormi

    06/20/2022, 8:46 AM
    Hello, Due to the need of a customer, I need to remove all languages ​​from my site (except English). So I edit routes like this
    Copy code
    $locales = LaravelLocalization::getSupportedLocales();
    $prefix = (count($locales)>1)? LaravelLocalization::setLocale() : '';
    $middleware =  (count($locales)>1)? ['localize', 'localeSessionRedirect', 'localizationRedirect', 'localeViewPath', 'cache.headers'] : ['localeViewPath', 'cache.headers'];
    Route::group([
        'prefix' => $prefix,
        'middleware' => $middleware,
    ], function(){ mondini_main_routes(); });
    This works fine But in the backend the previews of my models still point to / en How can I remove it easily? In the future I will need to add more languages ​​(I would add a redirect via htaccess possibly to fix the seo "/" to "/ en" issues) ...
    h
    • 2
    • 3
  • d

    dedli

    06/20/2022, 9:11 AM
    Thanks a lot! I will chech it after few hours
  • k

    Kormi

    06/20/2022, 9:25 AM
    My backend is very slowly.... how this is possible? 5197 statements were executed, 5184 of which were duplicated, 13 unique
  • k

    Kormi

    06/20/2022, 9:27 AM
    The probelm is settingComposer
    Copy code
    <?php
    
    namespace App\View\Composers;
    
    use App\Models\Setting;
    use Illuminate\View\View;
    
    class SettingsComposer
    {
        protected $settings = [];
    
        public function __construct()
        {
            // return false;
            foreach (Setting::all() as $setting) {
                $this->settings[$setting->key] = $setting->value;
            }
        }
    
        public function compose(View $view)
        {
            $view->with('settings', $this->settings);
        }
    }
    But why?
  • h

    Harings Rob

    06/20/2022, 9:33 AM
    Are you applying that viewcomposer to all views?
  • k

    Kormi

    06/20/2022, 10:45 AM
    yes
  • h

    Harings Rob

    06/20/2022, 10:48 AM
    Then I think you should be a bit more specific to which views you want to apply it.
  • h

    Harings Rob

    06/20/2022, 10:48 AM
    Because now you are querying all settings, every view.
  • k

    kalle

    06/20/2022, 10:57 AM
    Better option would be to create own settings facade and per need you can use it in own views. This approach of yours is really resource waste.
  • k

    Kormi

    06/20/2022, 12:01 PM
    Hi, if I remove from translatable.php a languages (only en)
    Copy code
    'locales' => [
            'en',
            // 'it',
            // 'ru',
        ],
    When I try to save... slugs for EN is always empty! How can i fix this? I do not want that a twill user can edit, for the moment, other languages...
  • h

    Harings Rob

    06/20/2022, 1:20 PM
    that should do it @Kormi , make sure your default language is also english, if changed, try to put your ui language to english as well. but that should not matter.
  • m

    marquin

    06/20/2022, 6:03 PM
    Hello guys. How can i create subcapsules same as the example below?
  • i

    ifox

    06/20/2022, 6:25 PM
    hi @marquin this is done by 2 things: - wrap the module routes registration by a router group - in
    twill-navigation.php
    , nest your modules in the
    primary_navigation
  • i

    ifox

    06/20/2022, 6:28 PM
    Works, Disciplines and Sectors are 3 distinct modules, in the
    admin.php
    routes file, it looks like this:
    Copy code
    php
    Route::group(['prefix' => 'work'], function () {
      Route::module('works');
      Route::module('disciplines');
      Route::module('sectors');
    });
  • i

    ifox

    06/20/2022, 6:30 PM
    and in the navigation config:
    Copy code
    php
    return [
        'work' => [
            'title' => 'Work',
            'route' => 'admin.work.works.index',
            'primary_navigation' => [
                'works' => [
                    'title' => 'Work',
                    'module' => true,
                ],
                'discplines' => [
                    'title' => 'Disciplines',
                    'module' => true,
                ],
                'sectors' => [
                    'title' => 'Sectors',
                    'module' => true,
                ],
            ],
        ],
    ];
  • m

    marquin

    06/20/2022, 6:54 PM
    Thank, Ifox
  • m

    marquin

    06/20/2022, 7:02 PM
    One more question. Is there any way to sort my posts? For example, I have several photo albums, I want them to have a display order.
  • m

    marquin

    06/20/2022, 7:02 PM
    Is there any input that does this?
  • i

    ifox

    06/20/2022, 7:10 PM
    you can use the hasPosition feature on the albums module and the list of albums will be reorderable by drag and drop. Or you can use a browser field within another module/singleton to select and order your albums.
  • g

    Gvido Blue Fox

    06/21/2022, 9:59 AM
    Hi! I want to create chart with Chart.js, but on the custom page twill this not worked. When i create chart on the local index.html file, all worked. My code - https://pastebin.com/vPANrdv5
    k
    • 2
    • 13
  • g

    Gvido Blue Fox

    06/21/2022, 10:00 AM
    Chart.js found canvas, set width and height, but not draw diagram
1...346347348...484Latest