Jerome V
Jerome V
FFilament
Created by Jerome V on 10/2/2024 in #❓┊help
Custom JS is not working in custom view page in RelationshipManager
So the case is this 1. We use video js using CDN What I did on my adminPanelProvider I register the CDN
public function boot(): void
{
FilamentAsset::register([
Js::make('video-js', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/video.min.js'),
Js::make('videojs-contrib-eme', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/videojs-contrib-eme.min.js'),
Css::make('video-css', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/video-js.min.css'),
]);

}
public function boot(): void
{
FilamentAsset::register([
Js::make('video-js', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/video.min.js'),
Js::make('videojs-contrib-eme', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/videojs-contrib-eme.min.js'),
Css::make('video-css', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/video-js.min.css'),
]);

}
and on the custom view for (EpisodesRelationManger) infolist, I want to include the custom scripts
public function infolist(Infolist $infolist): Infolist
{
return $infolist
->schema([
View::make('filament.pages.series.episodes.video')
->columnSpanFull()
->viewData(['drmData' => $this->drmData])
]);
}
public function infolist(Infolist $infolist): Infolist
{
return $infolist
->schema([
View::make('filament.pages.series.episodes.video')
->columnSpanFull()
->viewData(['drmData' => $this->drmData])
]);
}
This the custom view video.blade.php (The below scripts is not seen in devtools elements)
@if($getRecord())

<div class="h-screen flex justify-center gap-3 w-full">
<div class="h-screen aspect-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
@if($getRecord())

<div class="h-screen flex justify-center gap-3 w-full">
<div class="h-screen aspect-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
1 replies
FFilament
Created by Jerome V on 10/1/2024 in #❓┊help
How to register CDN in Laravel-Filament?
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/video.min.js"></script> <script src="https://cdn.tailwindcss.com"></script> <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/video-js.min.css" rel="stylesheet" /> <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/videojs-contrib-eme.min.js"></script> I tried to include it in app.blade.php but when I check it in dev tools elements it's not there
8 replies
FFilament
Created by Jerome V on 9/7/2024 in #❓┊help
Is it possible to make custom infolist entry for video?
I have this advertisement management, but in the view only the banner is displayed but in the advertisement videos is not since there is no video in infolist...
6 replies
FFilament
Created by Jerome V on 8/10/2024 in #❓┊help
How to put action on toggleColumn?
Is it possible to do like this? I want to use the toggle to block user the case is the blocked_at = timestamp blocked_by = unsignedBigInt
Tables\Columns\ToggleColumn::make('blocked_at')
->label('Block')
->sortable()
->onColor('success')
->offColor('danger')
->action(function ($record, $state) {

$blocked_at = $state ? now() : null;
$blocked_by = $state ? auth()->id() : null;

$record->update([
'blocked_at' => $blocked_at,
'blocked_by' => $blocked_by,
]);
}),
Tables\Columns\ToggleColumn::make('blocked_at')
->label('Block')
->sortable()
->onColor('success')
->offColor('danger')
->action(function ($record, $state) {

$blocked_at = $state ? now() : null;
$blocked_by = $state ? auth()->id() : null;

$record->update([
'blocked_at' => $blocked_at,
'blocked_by' => $blocked_by,
]);
}),
5 replies
FFilament
Created by Jerome V on 8/8/2024 in #❓┊help
How to handle image preview on edit if the image is from relationship
No description
1 replies
FFilament
Created by Jerome V on 8/7/2024 in #❓┊help
How to add table inside the tab content?
I have a task to create a view page on users. The scope is every tab content is different page/component so that it will not load heavily.. All the tabs are tables content example.. in my UserResource I created infolist for tab
public static function infolist(Infolist $infolist): Infolist
{
return $infolist
->schema([
Tabs::make('Tabs')
->tabs([
Tabs\Tab::make('Users')
->icon('heroicon-m-user-group')
->schema([

]),
Tabs\Tab::make('Subscriptions')
->schema([
// ...
]),
Tabs\Tab::make('Favorites')
->schema([
// ...
]),
])
]);
}
public static function infolist(Infolist $infolist): Infolist
{
return $infolist
->schema([
Tabs::make('Tabs')
->tabs([
Tabs\Tab::make('Users')
->icon('heroicon-m-user-group')
->schema([

]),
Tabs\Tab::make('Subscriptions')
->schema([
// ...
]),
Tabs\Tab::make('Favorites')
->schema([
// ...
]),
])
]);
}
How to attached/make users table in the user tab? I want to test this first and follow other tabs 1. by inserting directy the table? or 2. make a livewire component then render ?
9 replies