Vladyslav
Vladyslav
FFilament
Created by Vladyslav on 11/8/2024 in #❓┊help
Multiple definitions
No description
4 replies
FFilament
Created by Vladyslav on 1/30/2024 in #❓┊help
Actions always should be cached?
I want to use my own action for field Forms\Components\Field and realized that calling a method (with action) from a blade template does not work and the action does not react in any way. I explored the code a little and realized that actions should always be cached, right? i suppose that i must use ->registerAction in my case. Could you help go to right way? And how can pass my model to action as DI from blade template? The only way is to use it as $arguments?
2 replies
FFilament
Created by Vladyslav on 12/7/2023 in #❓┊help
ax-load-css does not work
My registration
// Asset Registration
FilamentAsset::register(
[
AlpineComponent::make('menu-builder-alpine', __DIR__ . '/../Resources/dist/menu.js')->loadedOnRequest(),
Css::make('menu-builder-css', __DIR__ . '/../Resources/dist/menu.css')->loadedOnRequest(),
],
'modules/menu-builder'
);
// Asset Registration
FilamentAsset::register(
[
AlpineComponent::make('menu-builder-alpine', __DIR__ . '/../Resources/dist/menu.js')->loadedOnRequest(),
Css::make('menu-builder-css', __DIR__ . '/../Resources/dist/menu.css')->loadedOnRequest(),
],
'modules/menu-builder'
);
How i use it
ax-load
ax-load-src="{{ \Filament\Support\Facades\FilamentAsset::getAlpineComponentSrc('menu-builder-alpine', 'modules/menu-builder') }}"
ax-load-css="{{ \Filament\Support\Facades\FilamentAsset::getStyleHref('menu-builder-css', 'modules/menu-builder') }}"

ax-load
ax-load-src="{{ \Filament\Support\Facades\FilamentAsset::getAlpineComponentSrc('menu-builder-alpine', 'modules/menu-builder') }}"
ax-load-css="{{ \Filament\Support\Facades\FilamentAsset::getStyleHref('menu-builder-css', 'modules/menu-builder') }}"

JS loads successfully, but CSS doesn't want to load. If I just remove loadedOnRequest() from registration, then CSS loads properly. However, I want to use lazy loading. What am I doing wrong? For JS, it loads properly.
4 replies
FFilament
Created by Vladyslav on 10/10/2023 in #❓┊help
Publish filament assets
How can i publish filament assets to public/vendor directory? I want to serve static files via nginx and i don't want load files via routes For now, i must change my nginx config for filament, cuz i get 404 error when i try to add cache to my static files. this is my simple nginx config
server {
listen 80;
listen [::]:80;
server_name _;
root /var/www/html/public;

add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff";

index index.php;

charset utf-8;

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; }

error_page 404 /index.php;

location ~ \.php$ {
fastcgi_pass unix:/var/run/php-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}

# assets, media
location ~* \.(?:css(\.map)?|js(\.map)?|jpe?g|png|gif|ico|cur|heic|webp|tiff?|mp3|m4a|aac|ogg|midi?|wav|mp4|mov|webm|mpe?g|avi|ogv|flv|wmv)$ {
expires 7d;
}

# svg, fonts
location ~* \.(?:svgz?|ttf|ttc|otf|eot|woff2?)$ {
add_header Access-Control-Allow-Origin "*";
expires 7d;
}

# gzip
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_types text/plain text/css text/xml application/json application/javascript application/rss+xml application/atom+xml image/svg+xml;

location ~ /\.(?!well-known).* {
deny all;
}
}
server {
listen 80;
listen [::]:80;
server_name _;
root /var/www/html/public;

add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff";

index index.php;

charset utf-8;

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; }

error_page 404 /index.php;

location ~ \.php$ {
fastcgi_pass unix:/var/run/php-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}

# assets, media
location ~* \.(?:css(\.map)?|js(\.map)?|jpe?g|png|gif|ico|cur|heic|webp|tiff?|mp3|m4a|aac|ogg|midi?|wav|mp4|mov|webm|mpe?g|avi|ogv|flv|wmv)$ {
expires 7d;
}

# svg, fonts
location ~* \.(?:svgz?|ttf|ttc|otf|eot|woff2?)$ {
add_header Access-Control-Allow-Origin "*";
expires 7d;
}

# gzip
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_types text/plain text/css text/xml application/json application/javascript application/rss+xml application/atom+xml image/svg+xml;

location ~ /\.(?!well-known).* {
deny all;
}
}
6 replies
FFilament
Created by Vladyslav on 9/25/2023 in #❓┊help
notification position
No description
4 replies
FFilament
Created by Vladyslav on 3/5/2023 in #❓┊help
Dynamic help text for list records page
7 replies