bahamasoul
bahamasoul
FFilament
Created by bahamasoul on 11/13/2024 in #❓┊help
Form builder - Programmatically step with Wizard?
bump
4 replies
FFilament
Created by bahamasoul on 11/13/2024 in #❓┊help
Form builder - Programmatically step with Wizard?
@bahamasoul cookies for any kind soul that can assist!
4 replies
FFilament
Created by Samus_Aran on 3/3/2024 in #❓┊help
Wrapping all Panels by subdomain
@Samus_Aran working on something similar, are you able to share your code and how you got this to work? Currently having an issue with Filament trying to assemble it's URLs
5 replies
FFilament
Created by bahamasoul on 6/15/2023 in #❓┊help
FileUpload with Laravel Sail && Minio
Thanks a lot! Cookies and ice cream for you.
16 replies
FFilament
Created by bahamasoul on 6/15/2023 in #❓┊help
FileUpload with Laravel Sail && Minio
Any idea why that worked? @Leandro Ferreira
16 replies
FFilament
Created by bahamasoul on 6/15/2023 in #❓┊help
FileUpload with Laravel Sail && Minio
@Leandro Ferreira Wow. That actually worked. Insane.
16 replies
FFilament
Created by bahamasoul on 6/15/2023 in #❓┊help
FileUpload with Laravel Sail && Minio
Yes the bucket is public.
AWS_ACCESS_KEY_ID=sail
AWS_SECRET_ACCESS_KEY=password
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=hpc-local
AWS_ENDPOINT=http://localhost:9000
AWS_URL=http://localhost:9000/hpc-local
AWS_USE_PATH_STYLE_ENDPOINT=true
AWS_ACCESS_KEY_ID=sail
AWS_SECRET_ACCESS_KEY=password
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=hpc-local
AWS_ENDPOINT=http://localhost:9000
AWS_URL=http://localhost:9000/hpc-local
AWS_USE_PATH_STYLE_ENDPOINT=true
16 replies
FFilament
Created by bahamasoul on 6/15/2023 in #❓┊help
FileUpload with Laravel Sail && Minio
Hey, yeah I did. Same issue. No validation seems to work. It's almost as if it can't retrieve the file from the temp server on minio even though it is uploaded there successfully in the livewire-tmp folder, however I would assume if it couldn't find the file it would trigger the "required" validation rule instead; so not sure.
16 replies
FFilament
Created by bahamasoul on 6/15/2023 in #❓┊help
FileUpload with Laravel Sail && Minio
@danharrin
<?php

namespace App\Http\Livewire\Components\Administration;

use App\AdminSetting;
use Livewire\Component;
use Illuminate\Contracts\View\View;
use App\View\Components\AdminLayout;
use Filament\Forms\Contracts\HasForms;
use Filament\Forms\Components\FileUpload;
use Filament\Forms\Concerns\InteractsWithForms;

class EditAdminSettings extends Component implements HasForms
{
use InteractsWithForms;

public ?array $data = [];

public AdminSetting $record;

public function mount(): void
{
$this->record = AdminSetting::all()->first();

$this->form->fill($this->record->attributesToArray());
}

protected function getFormSchema(): array
{
return [
FileUpload::make('chairman_signature')
->image()
->enableOpen()
->enableDownload()
->preserveFilenames()
->disk('s3')
->directory('admin_settings/chairman_signature'),
];
}

public function edit(): void
{
$data = $this->form->getState();

$this->record->update($data);
}

protected function getFormModel(): AdminSetting
{
return $this->record;
}

protected function getFormStatePath(): string
{
return 'data';
}

public function render(): View
{
return view('livewire.components.administration.edit-admin-settings')
->layout(AdminLayout::class, [
'title' => 'Administrative settings',
]);
}
}
<?php

namespace App\Http\Livewire\Components\Administration;

use App\AdminSetting;
use Livewire\Component;
use Illuminate\Contracts\View\View;
use App\View\Components\AdminLayout;
use Filament\Forms\Contracts\HasForms;
use Filament\Forms\Components\FileUpload;
use Filament\Forms\Concerns\InteractsWithForms;

class EditAdminSettings extends Component implements HasForms
{
use InteractsWithForms;

public ?array $data = [];

public AdminSetting $record;

public function mount(): void
{
$this->record = AdminSetting::all()->first();

$this->form->fill($this->record->attributesToArray());
}

protected function getFormSchema(): array
{
return [
FileUpload::make('chairman_signature')
->image()
->enableOpen()
->enableDownload()
->preserveFilenames()
->disk('s3')
->directory('admin_settings/chairman_signature'),
];
}

public function edit(): void
{
$data = $this->form->getState();

$this->record->update($data);
}

protected function getFormModel(): AdminSetting
{
return $this->record;
}

protected function getFormStatePath(): string
{
return 'data';
}

public function render(): View
{
return view('livewire.components.administration.edit-admin-settings')
->layout(AdminLayout::class, [
'title' => 'Administrative settings',
]);
}
}
16 replies