jbenavidesv
jbenavidesv
FFilament
Created by fikurimax on 9/4/2023 in #❓┊help
Insert button before notification
@fikurimax @cheesegrits, i solved a similar issue by adding to my livewire component
<style>
.fi-topbar-open-sidebar-btn{
order : -1
}
</style>
<style>
.fi-topbar-open-sidebar-btn{
order : -1
}
</style>
That helped me to mantain the hamburger icon in the leftmost position of the topbar. Hope this helps!
8 replies
FFilament
Created by Florian Langer on 8/1/2023 in #❓┊help
Customizing the tenant menu
No description
11 replies
FFilament
Created by Florian Langer on 8/1/2023 in #❓┊help
Customizing the tenant menu
Finally, hide the default tenant menu item by adding this in AdminPanelProvider or your panel provider:
->tenantMenu(false)
->tenantMenu(false)
11 replies
FFilament
Created by Florian Langer on 8/1/2023 in #❓┊help
Customizing the tenant menu
Then, you have to add in AppServiceProvider.php:
use Filament\Support\Facades\FilamentView;
use Filament\View\PanelsRenderHook;

public function register(): void
{
// ...

FilamentView::registerRenderHook(
PanelsRenderHook::TOPBAR_START, # You can change the placement here, docs: https://filamentphp.com/docs/3.x/support/render-hooks#available-render-hooks
fn(): string => Blade::render('@livewire(\'show-tenants\')'),
);
}
use Filament\Support\Facades\FilamentView;
use Filament\View\PanelsRenderHook;

public function register(): void
{
// ...

FilamentView::registerRenderHook(
PanelsRenderHook::TOPBAR_START, # You can change the placement here, docs: https://filamentphp.com/docs/3.x/support/render-hooks#available-render-hooks
fn(): string => Blade::render('@livewire(\'show-tenants\')'),
);
}
11 replies
FFilament
Created by Florian Langer on 8/1/2023 in #❓┊help
Customizing the tenant menu
You can edit your dropdown following this: https://filamentphp.com/docs/3.x/support/blade-components/dropdown and add any blade elements you need.
11 replies
FFilament
Created by Florian Langer on 8/1/2023 in #❓┊help
Customizing the tenant menu
In the livewire view, add something like this:
@php
$tenant = Filament\Facades\Filament::getTenant();
# Get your tenants, filtered, orderded...
$tenants = App\Models\YourTeantModel::where('visible', true)->orderBy('order_column')->get();
@endphp

<x-filament::dropdown placement="bottom-end">
<x-slot name="trigger">
<x-filament::link>
{{ $tenant->name }}
</x-filament::link>
</x-slot>

<x-filament::dropdown.list>
<x-filament::dropdown.list.item href="/{{ $tenant->id }}yourTenantModel/{{ $tenant->id }}/edit" tag="a" icon="heroicon-o-pencil-square">
Edit
</x-filament::dropdown.list.item>
<x-filament::dropdown.list.item href="/{{ $tenant->id }}/yourTenantModel" tag="a" icon="heroicon-o-cog">
My tenants
</x-filament::dropdown.list.item>
</x-filament::dropdown.list>

<x-filament::dropdown.list>
@foreach($tenants as $t)
<x-filament::dropdown.list.item href="/{{ $t->id }}/" tag="a">
{{ $t-name }}
</x-filament::dropdown.list.item>
@endforeach
</x-filament::dropdown.list>
</x-filament::dropdown>
@php
$tenant = Filament\Facades\Filament::getTenant();
# Get your tenants, filtered, orderded...
$tenants = App\Models\YourTeantModel::where('visible', true)->orderBy('order_column')->get();
@endphp

<x-filament::dropdown placement="bottom-end">
<x-slot name="trigger">
<x-filament::link>
{{ $tenant->name }}
</x-filament::link>
</x-slot>

<x-filament::dropdown.list>
<x-filament::dropdown.list.item href="/{{ $tenant->id }}yourTenantModel/{{ $tenant->id }}/edit" tag="a" icon="heroicon-o-pencil-square">
Edit
</x-filament::dropdown.list.item>
<x-filament::dropdown.list.item href="/{{ $tenant->id }}/yourTenantModel" tag="a" icon="heroicon-o-cog">
My tenants
</x-filament::dropdown.list.item>
</x-filament::dropdown.list>

<x-filament::dropdown.list>
@foreach($tenants as $t)
<x-filament::dropdown.list.item href="/{{ $t->id }}/" tag="a">
{{ $t-name }}
</x-filament::dropdown.list.item>
@endforeach
</x-filament::dropdown.list>
</x-filament::dropdown>
11 replies
FFilament
Created by Florian Langer on 8/1/2023 in #❓┊help
Customizing the tenant menu
Make a livewire component
php artisan make:livewire ShowTenants
php artisan make:livewire ShowTenants
11 replies
FFilament
Created by Florian Langer on 8/1/2023 in #❓┊help
Customizing the tenant menu
Hello, its been a while, but I have a workaround @Florian Langer and @Jeroen Mager:
11 replies
FFilament
Created by Abdur Razzaque on 10/16/2023 in #❓┊help
Conditional Form Input and Table Column
I have a similar scenario but I needed to use Text and Select columns, so I did this that worked as expected. Hope it helps:
TextInput::make('name'),
($condition ? TextColumn::make('whatever') : SelectColumn::make('whocares')),
TextInput::make('desc'),
TextInput::make('name'),
($condition ? TextColumn::make('whatever') : SelectColumn::make('whocares')),
TextInput::make('desc'),
In your case:
# ...
($get('value_type') === 'text') ? TextInput::make('value') : FileUpload::make('value')),
# ...
# ...
($get('value_type') === 'text') ? TextInput::make('value') : FileUpload::make('value')),
# ...
40 replies
FFilament
Created by jbenavidesv on 9/27/2023 in #❓┊help
minimal theme
I have purchased the unlimited products "edition" and I did not received a key. That key will be sent in the stages of the early access release? If the key is generated as an automated response, then I didnt get it. In that case: Is there another way to get it besides the email? Thank you for your time.
5 replies