ChesterS
ChesterS
FFilament
Created by ChesterS on 4/3/2024 in #❓┊help
Enable Echo.js without breaking Hot Reload
I'll have a look
5 replies
FFilament
Created by Matteo G on 6/6/2024 in #❓┊help
Saving Optional Relationship to db does not persist
Why do you have a book_id on the book_poster table? Can a poster only post one book? Honestly I don't know how this would work with laravel or fillament by default. You essentially have 2 different relations here - A poster had a book and a book has a poster but they can be different. I think you will need to override the default create method if you want to change the book_id on the book_poster table (or use a mutateData... method)
33 replies
FFilament
Created by ChesterS on 4/29/2024 in #❓┊help
Vite manifest not found when registering custom asset and deploying to production
Have you added it to your vite.config.js and ran npm run build ?
34 replies
FFilament
Created by Atena.D on 5/21/2024 in #❓┊help
Error during upload with Filament fileupload
Check you php configuration (php.ini) and your server configuration too.
4 replies
FFilament
Created by hello_world on 5/3/2024 in #❓┊help
I can't formatState of TextColumn having value null
TextColumn::make('last_contacted')
->label('Last Attempt')
->sortable()
->formatStateUsing(function($state){
if($state != null){
info($state->format('M d'));
}
else{
info('hello');
}
}),
TextColumn::make('last_contacted')
->label('Last Attempt')
->sortable()
->formatStateUsing(function($state){
if($state != null){
info($state->format('M d'));
}
else{
info('hello');
}
}),
something like that
20 replies
FFilament
Created by hello_world on 5/3/2024 in #❓┊help
I can't formatState of TextColumn having value null
Try to remove the ->date('M d') part and formatting the date inside your formatStateUsing section
20 replies
FFilament
Created by hello_world on 5/3/2024 in #❓┊help
I can't formatState of TextColumn having value null
Cool. What's the problem?
20 replies
FFilament
Created by ChesterS on 4/29/2024 in #❓┊help
Vite manifest not found when registering custom asset and deploying to production
FWIW, this is what I did
FilamentView::registerRenderHook(
PanelsRenderHook::SCRIPTS_AFTER,
fn (): string => Blade::render("@vite('resources/js/foobar.js')"),
);
FilamentView::registerRenderHook(
PanelsRenderHook::SCRIPTS_AFTER,
fn (): string => Blade::render("@vite('resources/js/foobar.js')"),
);
34 replies
FFilament
Created by ChesterS on 4/29/2024 in #❓┊help
Vite manifest not found when registering custom asset and deploying to production
This seems to have worke, thank you very much 🙇‍♂️
34 replies
FFilament
Created by ChesterS on 4/29/2024 in #❓┊help
Vite manifest not found when registering custom asset and deploying to production
Hmm didn't think about that. I'll look into it . Are there any drawbacks to it? (eg if I use the PanelsRenderHook::SCRIPTS_AFTER hook)
34 replies
FFilament
Created by ChesterS on 4/29/2024 in #❓┊help
Vite manifest not found when registering custom asset and deploying to production
yeah I guess that's the only solution. It'll make local development a bit more annoying since we'll have to remember all those steps when installing/upgrading locally but what can you do...¯\_(ツ)_/¯
34 replies
FFilament
Created by ChesterS on 4/29/2024 in #❓┊help
Vite manifest not found when registering custom asset and deploying to production
I need both the code in app.js and the ability to load fillament assets, but I can't have both
34 replies
FFilament
Created by ChesterS on 4/29/2024 in #❓┊help
Vite manifest not found when registering custom asset and deploying to production
not sure if it makes sense? It's a cyclic dependency of sorts
34 replies
FFilament
Created by ChesterS on 4/29/2024 in #❓┊help
Vite manifest not found when registering custom asset and deploying to production
are executed after composer install. But I have code in my app.js that needs some files from the vendor folder to work
34 replies
FFilament
Created by ChesterS on 4/29/2024 in #❓┊help
Vite manifest not found when registering custom asset and deploying to production
Yeah sorry about that. The issue started when I loaded a custom asset using FilamentAsset::register which needs the (AFAIK) the vite manifest to exist so it can find the asset. However, during deployment, NPM (install + build)
34 replies
FFilament
Created by ChesterS on 4/29/2024 in #❓┊help
Vite manifest not found when registering custom asset and deploying to production
(most of it is vanilla stuff from the livewire docs)
34 replies
FFilament
Created by ChesterS on 4/29/2024 in #❓┊help
Vite manifest not found when registering custom asset and deploying to production
Sorry, what do you mean? This is loaded into the custom layout file like this
@livewireScriptConfig
@filamentScripts
@livewire('notifications')
@vite('resources/js/app.js')
@livewireScriptConfig
@filamentScripts
@livewire('notifications')
@vite('resources/js/app.js')
Is there another/better way?
34 replies
FFilament
Created by ChesterS on 4/29/2024 in #❓┊help
Vite manifest not found when registering custom asset and deploying to production
and we might need other plugins anyway
34 replies
FFilament
Created by ChesterS on 4/29/2024 in #❓┊help
Vite manifest not found when registering custom asset and deploying to production
Yeah but I think we need it in other non-filament pages
34 replies
FFilament
Created by ChesterS on 4/29/2024 in #❓┊help
Vite manifest not found when registering custom asset and deploying to production
So I need to find an alternative way to load an Alpine plugin so I can replace this in my app.js
import { Livewire, Alpine } from '../../vendor/livewire/livewire/dist/livewire.esm';
import AlpineFloatingUI from '@awcodes/alpine-floating-ui'

Alpine.plugin(AlpineFloatingUI)

Livewire.start()
import { Livewire, Alpine } from '../../vendor/livewire/livewire/dist/livewire.esm';
import AlpineFloatingUI from '@awcodes/alpine-floating-ui'

Alpine.plugin(AlpineFloatingUI)

Livewire.start()
34 replies