Jerome V
Jerome V
FFilament
Created by Jerome V on 12/3/2024 in #❓┊help
No data on textarea, input and select on modal when update or view
Ohh.... I solved it by just upgrading the filament version and composer install
6 replies
FFilament
Created by Jerome V on 12/3/2024 in #❓┊help
No data on textarea, input and select on modal when update or view
No relationship here sir.. I just want to show the details of the report based on the data in the database this is the form public static function form(Form $form): Form { return $form ->schema([ Forms\Components\Textarea::make('reason') ->readOnly() ->columnSpanFull(), Forms\Components\Select::make('status') ->required() ->columnSpanFull() ->options(Status::adminActions()), Forms\Components\Textarea::make('remarks') ->columnSpanFull(), ]); } So in my list I want to show (view) the data of that specific id
6 replies
FFilament
Created by Jerome V on 11/27/2024 in #❓┊help
How to make navigation in cluster to topNavigation?
Thank you sir.. it's working now..
7 replies
FFilament
Created by Jerome V on 11/27/2024 in #❓┊help
How to make navigation in cluster to topNavigation?
where to put that? in the main cluster? or on the resources? <?php namespace App\Filament\Clusters; use Filament\Clusters\Cluster; use Filament\Pages\SubNavigationPosition; class Advertisement extends Cluster { protected static ?string $navigationIcon = 'heroicon-o-squares-2x2'; protected static SubNavigationPosition $subNavigationPosition = SubNavigationPosition::Top; } this is on the cluster but not working
7 replies
FFilament
Created by Jerome V on 11/4/2024 in #❓┊help
How to add a button inside a section in form?
I don't know if it is the right approach but the case is on edit the PM wanted to have unset (toggle) on photo and video. The purpose on this is to make the fields banner_file_id and video_file_id if save changes and if not it will just retain the data I don't want to make the fields null directly in case the edit is cancelled
7 replies
FFilament
Created by Jerome V on 11/4/2024 in #❓┊help
How to add a button inside a section in form?
I decided to used toggle instead.. how can I store the record banner_file_id and video_file_id? The case is if the photo and video is unset then It will update banner_file_id and vide_file_id into null else if cancelled then retain the data
Forms\Components\Section::make('Photo')
->schema([
Placeholder::make('photo')
->content(fn ($record) => self::getImageContent($record) )
->visibleOn('edit')
->hidden(fn (?Advertisement $record, Forms\Get $get) =>
($record === null) || (!!$get('new_photo'))
),
Forms\Components\FileUpload::make('new_photo')
->image()
->storeFiles(false)
->moveFiles()
->imageEditor(),
Forms\Components\Toggle::make('unset_photo')
->label('Unset Photo')
->inline()
->default(false),
])
->columns(2)
->collapsible()
->collapsed(),
Forms\Components\Section::make('Photo')
->schema([
Placeholder::make('photo')
->content(fn ($record) => self::getImageContent($record) )
->visibleOn('edit')
->hidden(fn (?Advertisement $record, Forms\Get $get) =>
($record === null) || (!!$get('new_photo'))
),
Forms\Components\FileUpload::make('new_photo')
->image()
->storeFiles(false)
->moveFiles()
->imageEditor(),
Forms\Components\Toggle::make('unset_photo')
->label('Unset Photo')
->inline()
->default(false),
])
->columns(2)
->collapsible()
->collapsed(),
7 replies
FFilament
Created by Jerome V on 10/1/2024 in #❓┊help
How to register CDN in Laravel-Filament?
Can I include script in blade? this is not a filament page but only on a blade for video.. because when I do like this, the scipt I included is not found when I inspect video.blade @if($getRecord()) <div class="h-screen flex justify-center gap-3 w-full"> <div class="h-screen aspect-video "> <video id="video-player" class="h-screen video-js vjs-default-skin vjs-16-9" controls data-setup="{}" controlsList="nodownload" @if($getRecord()->subtitles->count() > 0) crossorigin="anonymous" @endif> <source src="{{ $getRecord()->video?->full_url }}" type="{{ $getRecord()->video?->type ?? 'video/mp4' }}" > Your browser does not support the video tag. @foreach($getRecord()->subtitles as $subtitle) <track src="{{ $subtitle->file?->full_url }}" srclang="{{ $subtitle->language?->iso_639 }}" lang="{{ $subtitle->language?->bcp_47 }}" label="{{ $subtitle->language?->name }}" kind="subtitles" @if(($getRecord()->defaultSubtitle[0]?->id ?? null) === $subtitle->id) default @endif" /> @endforeach </video> <video id="video-player" class="video-js vjs-default-skin vjs-16-9" controls data-setup="{}" /> </div> </div> @push('scripts') <script> var drmData = {!! json_encode($drmData, JSON_HEX_TAG) !!}; </script> <script type="text/javascript" src="{{ asset('js/pallycon-helper.js') }}"></script> <script type="text/javascript" src="{{ asset('js/video-player.js') }}"></script> @endpush @endif
8 replies
FFilament
Created by Jerome V on 10/1/2024 in #❓┊help
How to register CDN in Laravel-Filament?
can I revert the php artisan filament:assets ? since I only need to register it in the appService Provider
8 replies
FFilament
Created by Jerome V on 10/1/2024 in #❓┊help
How to register CDN in Laravel-Filament?
I already run php artisan filament:assets, what to do next? where to locate this? use Filament\Support\Assets\Js; FilamentAsset::register([ Js::make('example-external-script', 'https://example.com/external.js'), Js::make('example-local-script', asset('js/local.js')), ]);
8 replies
FFilament
Created by Jerome V on 9/7/2024 in #❓┊help
Is it possible to make custom infolist entry for video?
Yes sir but is it possible? I don't see sample onile
6 replies
FFilament
Created by Jerome V on 8/10/2024 in #❓┊help
How to put action on toggleColumn?
Yeah, that's what I thinking... but I just created action instead
Tables\Actions\Action::make('block')
->label(fn ($record) => $record->blocked_at ? 'Unblock' : 'Block')
->action(function ($record) {
$record->blocked_at = $record->blocked_at ? null : now();
$record->blocked_by = $record->blocked_at ? auth()->id() : null;
$record->save();
})
->color(fn ($record) => $record->blocked_at ? 'danger' : 'warning')
->requiresConfirmation()
->icon(fn ($record) => $record->blocked_at ? 'heroicon-o-lock-open' : 'heroicon-o-lock-closed'),
Tables\Actions\Action::make('block')
->label(fn ($record) => $record->blocked_at ? 'Unblock' : 'Block')
->action(function ($record) {
$record->blocked_at = $record->blocked_at ? null : now();
$record->blocked_by = $record->blocked_at ? auth()->id() : null;
$record->save();
})
->color(fn ($record) => $record->blocked_at ? 'danger' : 'warning')
->requiresConfirmation()
->icon(fn ($record) => $record->blocked_at ? 'heroicon-o-lock-open' : 'heroicon-o-lock-closed'),
5 replies
FFilament
Created by Jerome V on 8/7/2024 in #❓┊help
How to add table inside the tab content?
Hello sir, Why my sub navigation is hide when I jump into another page?
protected static SubNavigationPosition $subNavigationPosition = SubNavigationPosition::Top;


public static function infolist(Infolist $infolist): Infolist
{
return $infolist
->schema([
\Filament\Infolists\Components\Section::make('Content')
->schema([
\Filament\Infolists\Components\TextEntry::make('content')
->prose()
->markdown()
->hiddenLabel(),
])
->collapsible(),
]);
}

public static function getRecordSubNavigation(Page $page): array
{
return $page->generateNavigationItems([
Pages\ViewUser::class,
Pages\CreateUser::class,
]);
}
protected static SubNavigationPosition $subNavigationPosition = SubNavigationPosition::Top;


public static function infolist(Infolist $infolist): Infolist
{
return $infolist
->schema([
\Filament\Infolists\Components\Section::make('Content')
->schema([
\Filament\Infolists\Components\TextEntry::make('content')
->prose()
->markdown()
->hiddenLabel(),
])
->collapsible(),
]);
}

public static function getRecordSubNavigation(Page $page): array
{
return $page->generateNavigationItems([
Pages\ViewUser::class,
Pages\CreateUser::class,
]);
}
example if I click the create user
9 replies
FFilament
Created by Jerome V on 8/7/2024 in #❓┊help
How to add table inside the tab content?
Thanks sir.. I will clone the repo and check this.. I will feed back you later.. Thank you for the help
9 replies
FFilament
Created by Jerome V on 8/7/2024 in #❓┊help
How to add table inside the tab content?
No sir, I just read right now the docs but I can't find sample on how to implement it..
9 replies
FFilament
Created by Jerome V on 8/7/2024 in #❓┊help
How to add table inside the tab content?
No description
9 replies