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

    ifox

    10/13/2022, 6:59 PM
    Imgix serves a static file, they don't load a PHP app to find the file and return it. if you want that we glide urls, you need to setup something outside of your laravel application
  • i

    ifox

    10/13/2022, 6:59 PM
    eg. this is a Glide url https://www.cannondesign.com/img/d858b81d-b770-4df6-9d8f-0fa1a2596c21/004997_00_N14_cdwebsite.jpg?fm=jpg&q=80&fit=max&crop=3000%2C2003%2C0%2C373&w=1000
  • i

    ifox

    10/13/2022, 6:59 PM
    but there's a cloudfront distribution on top of the whole domain which gives us <30ms response time and x-cache: Hit from cloudfront header
  • a

    asolopovas

    10/13/2022, 6:59 PM
    docker?
  • a

    asolopovas

    10/13/2022, 7:00 PM
    any containers that can already do something like that?
  • i

    ifox

    10/13/2022, 7:02 PM
    I mean there's no container that will give you a CDN unless you deploy many instances around the world yourself
  • i

    ifox

    10/13/2022, 7:03 PM
    but there are solution to build you own caching solution
  • a

    asolopovas

    10/13/2022, 7:03 PM
    https://docs.nginx.com/nginx/admin-guide/content-cache/content-caching/
  • i

    ifox

    10/13/2022, 7:03 PM
    like Varnish
  • a

    asolopovas

    10/13/2022, 7:03 PM
    I am thinking of this
  • i

    ifox

    10/13/2022, 7:03 PM
    you can also do some stuff with nginx yes
  • a

    asolopovas

    10/13/2022, 7:05 PM
    now I just need to figure out how to cache these urls that are dynamic
  • i

    ifox

    10/13/2022, 7:07 PM
    https://github.com/thephpleague/glide/issues/83
  • i

    ifox

    10/13/2022, 7:09 PM
    https://github.com/thephpleague/glide/issues/170#issuecomment-782852957
  • i

    ifox

    10/13/2022, 7:11 PM
    https://github.com/thephpleague/glide/issues/170#issuecomment-272943966
  • i

    ifox

    10/13/2022, 7:13 PM
    plenty of discussions about this
  • i

    ifox

    10/13/2022, 7:14 PM
    Glide is not ideal without an external CDN on top, that's why we also support Imgix and similar solutions directly
  • a

    asolopovas

    10/13/2022, 8:12 PM
    I managed to do cache on nginx but for strange reason it serves all images with 404 status
  • a

    asolopovas

    10/13/2022, 8:18 PM
    Copy code
    fastcgi_cache_path /tmp/nginx/cache levels=1:2 keys_zone=BACKEND:100m inactive=60m;
    fastcgi_cache_key "$scheme$request_method$host$request_uri";
    
    server {
        listen 443 ssl http2;
        server_name ${URL};
        root /var/www/backend/public;
        index index.php;
    
        ssl_certificate ${SSL_CERTIFICATE};
        ssl_certificate_key ${SSL_CERTIFICATE_KEY};
        location / {
            try_files           $uri $uri/ /index.php?$query_string;
        }
    
        location /favicon.ico { access_log off; log_not_found off; }
        location /robots.txt  { access_log off; log_not_found off; }
    
        location ~ \.php$ {
            fastcgi_pass ${CONTAINER}:9000;
            try_files                     $fastcgi_script_name =404;
            fastcgi_index                 index.php;
            fastcgi_buffers               8 16k;
            fastcgi_buffer_size           32k;
            fastcgi_param DOCUMENT_ROOT   $realpath_root;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_read_timeout          600;
            
            fastcgi_cache                 BACKEND;
            fastcgi_cache_valid           200 1m;
            fastcgi_cache_bypass          $no_cache;
            fastcgi_no_cache              $no_cache;
            fastcgi_cache_use_stale       error updating timeout invalid_header http_500;
            fastcgi_cache_lock            on;
            fastcgi_ignore_headers        Cache-Control Expires Set-Cookie;
            include                       fastcgi_params;
        }
    
        location ~ /\.(?!well-known).* {
            deny all;
        }
        error_page 404 /index.php;
        #Cache everything by default
        set $no_cache 0;
        #Don't cache POST requests
        if ($request_method = POST)
        {
            set $no_cache 1;
        }
    }
  • i

    ifox

    10/13/2022, 9:46 PM
    Login event
  • h

    Hip-Hop

    10/14/2022, 3:29 AM
    Temporary solution so far found this
  • n

    nuffsaid

    10/14/2022, 6:51 AM
    Hello, I have a related browser to an entity whose
    title
    attribute is not unique like this (see screenshot). In this case there are several entitites associated within the browser. Can I override what fields / presenter methods / accessors are displayed here in order to have unique / meaningful browser entries? Thanks a lot for any ideas 🙂
  • i

    ifox

    10/14/2022, 8:26 AM
    Hi @nuffsaid you can implement
    getTitleInBrowserAttribute
    in your model for this
  • n

    nuffsaid

    10/14/2022, 8:27 AM
    thanks a lot for the hint @ifox
  • h

    Hip-Hop

    10/14/2022, 10:15 AM
    Good morning! Do not tell me how to get the label from the select in the preview? At the moment I get the value ($child->input('project_category_block'))
  • h

    Harings Rob

    10/14/2022, 10:19 AM
    Hey @Hip-Hop can you please use the #1029411044516438110 forum for this question. The question itself is not entirely clear, so a bit more detail would be welcome.
  • t

    tud13

    10/14/2022, 10:25 AM
    Thanks dude! You saved my life.
  • i

    ifox

    10/14/2022, 10:38 AM
    Hi @tud13 just saw your comment about this on GitHub, we're open to a PR on this 🙂
  • b

    Bijen

    10/17/2022, 3:08 PM
    Hey, I have created a block named row and added a repeater named column on that block. I wanted to create different columns per row and show different items on different column. Each items have different form fields inside the repeater. I wanted to show the items on the basis of what I have selected. I am now stuck on how I select a specific item from the different items what to show. Is there any way how I can select the item inside my repeater? Or is there any other way to solve this problem? Any help is appreciated.
  • h

    Harings Rob

    10/17/2022, 3:37 PM
    @Bijen what will be the end-goal? Repeaters can only target one type. So this "nested" structure you are building may not work like that. If you want the ability to nest blocks, make sure you try out Twill 3 which has support for that.
1...416417418...484Latest