jaocero
jaocero
FFilament
Created by EMMAN on 8/3/2024 in #❓┊help
How can to disable 'create & create another' button on createOptionForm
protected static bool $canCreateAnother = false;
protected static bool $canCreateAnother = false;
Add this in your create resource
13 replies
FFilament
Created by taqi on 8/2/2024 in #❓┊help
422 (Unprocessable Content)
You need to change the livewire config to change to 120MB since its default to 12MB. Tutorial https://laraveldaily.com/post/laravel-filament-how-to-upload-video-files
5 replies
FFilament
Created by jaocero on 7/19/2024 in #❓┊help
How to show/hide a component using actions in form?
I've got it working thank youu @Andrew Wallo
Forms\Components\Actions\Action::make('show_hide_upload')
->action(fn () => $this->showUpload = !$this->showUpload)
Forms\Components\Actions\Action::make('show_hide_upload')
->action(fn () => $this->showUpload = !$this->showUpload)
7 replies
FFilament
Created by jaocero on 7/19/2024 in #❓┊help
How to show/hide a component using actions in form?
No description
7 replies
FFilament
Created by jaocero on 6/16/2024 in #❓┊help
Is there any way to create a custom page but not under in a tenant? Its like a general page
how do I regiter this page in the sidebar of the panel?
7 replies
FFilament
Created by lazydog on 6/4/2024 in #❓┊help
Filament Tenancy
Once you switch to different tenants it will also updates the current tenant
9 replies
FFilament
Created by lazydog on 6/4/2024 in #❓┊help
Filament Tenancy
It show be done automatically not by setting the tenant
9 replies
FFilament
Created by lazydog on 6/4/2024 in #❓┊help
Filament Tenancy
use Filament::getTenant()
9 replies
FFilament
Created by Jon Mason on 4/16/2024 in #❓┊help
open modal on page load
full livewire blade
@php
use App\Enums\OnboardingStep;
@endphp
<div x-data="{ isDashboardOnboardingComplete: localStorage.getItem('isDashboardOnboardingComplete') === 'true' }">
<x-filament::modal icon="untitledui-youtube" id="dashboard-video-modal" sticky-header sticky-footer :close-by-clicking-away="false"
width="4xl" x-show="!isDashboardOnboardingComplete">
<x-slot name="heading">
Onboarding Checklist - Dashboard
</x-slot>

<x-slot name="description">
{{ OnboardingStep::DASHBOARD->description() }}
</x-slot>

<div class="w-full aspect-w-16 aspect-h-9">
<div
class="shadow-2xl bg-gradient-to-b from-primary-400 to-primary-500 shadow-primary-500/60 dark:shadow-primary-500/20">
// some code
</div>
</div>

<x-slot name="footerActions" class="flex items-center justify-end">
<label class="inline-flex items-center">
<x-filament::input.checkbox
x-on:change="localStorage.setItem('isDashboardOnboardingComplete', $event.target.checked)" />

<span class="ml-2">
Do not show this video again
</span>
</label>
</x-slot>
</x-filament::modal>
<template x-if="!isDashboardOnboardingComplete">
<div wire:init="showDashboardVideoModalEvent"></div>
</template>
</div>
@php
use App\Enums\OnboardingStep;
@endphp
<div x-data="{ isDashboardOnboardingComplete: localStorage.getItem('isDashboardOnboardingComplete') === 'true' }">
<x-filament::modal icon="untitledui-youtube" id="dashboard-video-modal" sticky-header sticky-footer :close-by-clicking-away="false"
width="4xl" x-show="!isDashboardOnboardingComplete">
<x-slot name="heading">
Onboarding Checklist - Dashboard
</x-slot>

<x-slot name="description">
{{ OnboardingStep::DASHBOARD->description() }}
</x-slot>

<div class="w-full aspect-w-16 aspect-h-9">
<div
class="shadow-2xl bg-gradient-to-b from-primary-400 to-primary-500 shadow-primary-500/60 dark:shadow-primary-500/20">
// some code
</div>
</div>

<x-slot name="footerActions" class="flex items-center justify-end">
<label class="inline-flex items-center">
<x-filament::input.checkbox
x-on:change="localStorage.setItem('isDashboardOnboardingComplete', $event.target.checked)" />

<span class="ml-2">
Do not show this video again
</span>
</label>
</x-slot>
</x-filament::modal>
<template x-if="!isDashboardOnboardingComplete">
<div wire:init="showDashboardVideoModalEvent"></div>
</template>
</div>
10 replies
FFilament
Created by Jon Mason on 4/16/2024 in #❓┊help
open modal on page load
This is how I do also in my current project. You can insert a renderhook at the bottom of the content make a livewire component and put it inside the render hook blade:
<?php

namespace App\Livewire\Onboarding;

use Livewire\Component;

class DashboardModal extends Component
{
public function showDashboardVideoModalEvent()
{
$this->dispatch('open-modal', id: 'dashboard-video-modal');
}

public function render()
{
return view('livewire.onboarding.dashboard-modal');
}
}
<?php

namespace App\Livewire\Onboarding;

use Livewire\Component;

class DashboardModal extends Component
{
public function showDashboardVideoModalEvent()
{
$this->dispatch('open-modal', id: 'dashboard-video-modal');
}

public function render()
{
return view('livewire.onboarding.dashboard-modal');
}
}
now then inside your livewire component blade this is what I do:
<div wire:init="showDashboardVideoModalEvent"></div>
<div wire:init="showDashboardVideoModalEvent"></div>
I maybe complicate things so it works for me
10 replies
FFilament
Created by cenglyy on 4/12/2024 in #❓┊help
modal with mutateData
@cenksen I didn't tried it yet but you can go to your list collection you can see the Actions\CreateAction::make() there or go to your create collection resource then you can modify the saving of data using:
protected function handleRecordCreation(array $data): Model
{
// modify here
return static::getModel()::create($data);
}
protected function handleRecordCreation(array $data): Model
{
// modify here
return static::getModel()::create($data);
}
again I din't try it yet
17 replies
FFilament
Created by cenglyy on 4/12/2024 in #❓┊help
modal with mutateData
CreateAction::make()
->mutateFormDataUsing(function (array $data): array {
$data['user_id'] = auth()->id();

return $data;
})
CreateAction::make()
->mutateFormDataUsing(function (array $data): array {
$data['user_id'] = auth()->id();

return $data;
})
17 replies
FFilament
Created by OscarMo on 3/18/2024 in #❓┊help
how change route filament v3
in your AdminPanelProvider or your provider whatever name it is
10 replies
FFilament
Created by OscarMo on 3/18/2024 in #❓┊help
how change route filament v3
you can try I think ->loginRouteSlug('home')
10 replies
FFilament
Created by Lara Zeus on 3/15/2024 in #❓┊help
[phpStan] Illuminate\Database\Eloquent\Model::$id.
I solve the getTenant issue in phpstan by assigning it to a variable like this:
/** @var \App\Models\Team|null $currentTenant */
$currentTenant = Filament::getTenant();
/** @var \App\Models\Team|null $currentTenant */
$currentTenant = Filament::getTenant();
7 replies
FFilament
Created by Wirkhof on 3/15/2024 in #❓┊help
How to find out currently checked Checklist boxes?
you just share this dd($get['cars']) how can anyone to expect to help you if you don't show your full code and analysze what is wrong
46 replies
FFilament
Created by Wirkhof on 3/15/2024 in #❓┊help
How to find out currently checked Checklist boxes?
bruhh
46 replies
FFilament
Created by Wirkhof on 3/15/2024 in #❓┊help
How to find out currently checked Checklist boxes?
if you don't share your code how can any other member here solve your problem and help you
46 replies
FFilament
Created by Wirkhof on 3/15/2024 in #❓┊help
How to find out currently checked Checklist boxes?
can you share your full code?
46 replies
FFilament
Created by Wirkhof on 3/15/2024 in #❓┊help
How to find out currently checked Checklist boxes?
doest matter array $data will get all data from your form
46 replies