Yaeger
Yaeger
Explore posts from servers
FFilament
Created by Yaeger on 12/9/2023 in #❓┊help
Filament admin is redirecting back to the same page.
Makes sense, thanks 👍
11 replies
FFilament
Created by Yaeger on 12/9/2023 in #❓┊help
Filament admin is redirecting back to the same page.
Well yea if inject_assets is enabled it all works. It seems like Filament relies on that option
11 replies
FFilament
Created by Yaeger on 12/9/2023 in #❓┊help
Filament admin is redirecting back to the same page.
FilamentView::registerRenderHook(
'panels::head.end',
fn (): string => Blade::render('@livewireStyles'),
);
FilamentView::registerRenderHook(
'panels::head.end',
fn (): string => Blade::render('@filamentStyles'),
);

FilamentView::registerRenderHook(
'panels::body.end',
fn (): string => Blade::render('@filamentScripts'),
);
FilamentView::registerRenderHook(
'panels::body.end',
fn (): string => Blade::render('@livewireScripts'),
);
FilamentView::registerRenderHook(
'panels::head.end',
fn (): string => Blade::render('@livewireStyles'),
);
FilamentView::registerRenderHook(
'panels::head.end',
fn (): string => Blade::render('@filamentStyles'),
);

FilamentView::registerRenderHook(
'panels::body.end',
fn (): string => Blade::render('@filamentScripts'),
);
FilamentView::registerRenderHook(
'panels::body.end',
fn (): string => Blade::render('@livewireScripts'),
);
Ok managed to do something with render hooks
11 replies
FFilament
Created by Yaeger on 12/9/2023 in #❓┊help
Filament admin is redirecting back to the same page.
inject_assets === false for me. It works when enabling that option. Is there a way to use Panel builder without that option?
11 replies
FFilament
Created by Yaeger on 12/9/2023 in #❓┊help
Filament admin is redirecting back to the same page.
Hm seems like livewire & alpine isn't loaded on that page
11 replies
FFilament
Created by Yaeger on 12/5/2023 in #❓┊help
Set default value of DateTimePicker
Nvm! Forgot to call $this->form->fill() in mount()
4 replies
FFilament
Created by Yaeger on 11/28/2023 in #❓┊help
How to debug refreshes on submit with file uploads?
Wow! I got it. I'm dumb. Earlier this week I added public/** dir to vite.config.js refresh paths. These uploads go to public/ apparently so Vite is refreshing the page. Nice.
8 replies
FFilament
Created by Yaeger on 11/28/2023 in #❓┊help
How to debug refreshes on submit with file uploads?
Without the file upload this doesn't happen
8 replies
FFilament
Created by Yaeger on 11/28/2023 in #❓┊help
How to debug refreshes on submit with file uploads?
As you can see it shows the sent = true state for a short time, and then refreshes the page
8 replies
FFilament
Created by Yaeger on 11/28/2023 in #❓┊help
How to debug refreshes on submit with file uploads?
So it does do 1 update
8 replies
FFilament
Created by Yaeger on 11/28/2023 in #❓┊help
How to debug refreshes on submit with file uploads?
This is my component:
<form wire:submit="send">
{{ $this->form }}

@if ($sent)
<x-alert-container title="Bericht is verzonden" type="success" class="my-6">
We nemen zo snel mogelijk contact met je op.
</x-alert-container>
@endif

<div class="mt-8 flex justify-end">
<x-primary-button>
Verstuur
</x-primary-button>
</div>
</form>
<form wire:submit="send">
{{ $this->form }}

@if ($sent)
<x-alert-container title="Bericht is verzonden" type="success" class="my-6">
We nemen zo snel mogelijk contact met je op.
</x-alert-container>
@endif

<div class="mt-8 flex justify-end">
<x-primary-button>
Verstuur
</x-primary-button>
</div>
</form>
Form is as simple as it can be:
public function form(Form $form): Form
{
return $form->columns(2)
->schema([
TextInput::make('firstName')->required()->label('Voornaam'),
FileUpload::make('cv')->required()->columnSpanFull()->label('CV'),
])
->statePath('data');
}

public function send()
{
if ($this->sent) {
return;
}

$formData = $this->form->getState();

// send mail

$this->sent = true;
}
public function form(Form $form): Form
{
return $form->columns(2)
->schema([
TextInput::make('firstName')->required()->label('Voornaam'),
FileUpload::make('cv')->required()->columnSpanFull()->label('CV'),
])
->statePath('data');
}

public function send()
{
if ($this->sent) {
return;
}

$formData = $this->form->getState();

// send mail

$this->sent = true;
}
8 replies
FFilament
Created by Yaeger on 10/15/2023 in #❓┊help
Adding `@livewire('notifications')` is not shown in the docs
Cool thanks!
9 replies
FFilament
Created by Yaeger on 10/15/2023 in #❓┊help
Adding `@livewire('notifications')` is not shown in the docs
Ah but not on the installation page. Sounds like an installation step to me. But alright cool 👍🏻
9 replies
FFilament
Created by skyrowl on 10/10/2023 in #❓┊help
Alpine component not loaded
Are you using Octane by any chance?
81 replies
FFilament
Created by Yaeger on 10/10/2023 in #❓┊help
"Alpine component with ID [rich-editor] not found for package [filament/forms]"
I removed Octane and it worked 🥲
5 replies
FFilament
Created by Yaeger on 9/26/2023 in #❓┊help
How do you test repeaters?
Hm this seems like a different issue
23 replies
FFilament
Created by Yaeger on 9/26/2023 in #❓┊help
How do you test repeaters?
Ok, I guess this is just not possible 🥲 https://github.com/filamentphp/filament/discussions/6070
23 replies