n0nsensei
n0nsensei
FFilament
Created by Chris Arter on 12/17/2024 in #❓┊help
Stumped on file handling files with Forms + Spatie Media on Custom Page
$this->form->model($this->post)->saveRelationships();
$this->form->model($this->post)->saveRelationships();
this work for me on create page, but i have been stuck on how to load it in Cusom Edit Page, Edit:
SpatieMediaLibraryFileUpload::make('document')
->label('Upload Receipt Copy')
->collection('document')
->model($this->post)
->previewable(false)
->downloadable(true),
SpatieMediaLibraryFileUpload::make('document')
->label('Upload Receipt Copy')
->collection('document')
->model($this->post)
->previewable(false)
->downloadable(true),
this work for my custom edit page where, might also work for create haven't tried it.
4 replies
FFilament
Created by n0nsensei on 2/13/2024 in #❓┊help
Set other form fields from within a Livewire component as field
not exactly, i want access the form/livewire outside of LiveSearchComponent, not the actual record
4 replies
FFilament
Created by n0nsensei on 10/29/2023 in #❓┊help
create route outside of tenant
This is my page class
4 replies
FFilament
Created by n0nsensei on 10/29/2023 in #❓┊help
create route outside of tenant
class SubscribePage extends SimplePage
{
use InteractsWithFormActions;
use HasRoutes;

protected static ?string $navigationIcon = 'heroicon-o-document-text';

protected static string $view = 'filament.app.pages.subscribe-page';

public static function getSlug(): string
{
return static::$slug ?? 'subscribe-page';
}

public static function routes(Panel $panel): void
{
$slug = static::getSlug();

Route::get("/{$slug}", static::class)
->middleware(static::getRouteMiddleware($panel))
->withoutMiddleware(static::getWithoutRouteMiddleware($panel))
->name('subscribe-page');
}


public static function getRouteMiddleware(Panel $panel): string|array
{
return [
...(static::isEmailVerificationRequired($panel) ? [static::getEmailVerifiedMiddleware($panel)] : []),
...Arr::wrap(static::$routeMiddleware),
];
}

}
class SubscribePage extends SimplePage
{
use InteractsWithFormActions;
use HasRoutes;

protected static ?string $navigationIcon = 'heroicon-o-document-text';

protected static string $view = 'filament.app.pages.subscribe-page';

public static function getSlug(): string
{
return static::$slug ?? 'subscribe-page';
}

public static function routes(Panel $panel): void
{
$slug = static::getSlug();

Route::get("/{$slug}", static::class)
->middleware(static::getRouteMiddleware($panel))
->withoutMiddleware(static::getWithoutRouteMiddleware($panel))
->name('subscribe-page');
}


public static function getRouteMiddleware(Panel $panel): string|array
{
return [
...(static::isEmailVerificationRequired($panel) ? [static::getEmailVerifiedMiddleware($panel)] : []),
...Arr::wrap(static::$routeMiddleware),
];
}

}
4 replies