Jerome V
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
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
7 replies
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
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