hyperion-mx
hyperion-mx
FFilament
Created by Arjan on 11/2/2024 in #❓┊help
Change profile route slug?
Hope that helps
8 replies
FFilament
Created by Arjan on 11/2/2024 in #❓┊help
Change profile route slug?
public function panel(Panel $panel): Panel {
return $panel
->default()
->id('admin')
->path('admin')
->login()
->colors([
'primary' => Color::Amber,
])
->profile(CustomProfile::class)
..........
public function panel(Panel $panel): Panel {
return $panel
->default()
->id('admin')
->path('admin')
->login()
->colors([
'primary' => Color::Amber,
])
->profile(CustomProfile::class)
..........
8 replies
FFilament
Created by Arjan on 11/2/2024 in #❓┊help
Change profile route slug?
and use it on the panel
8 replies
FFilament
Created by Arjan on 11/2/2024 in #❓┊help
Change profile route slug?
<?php

namespace App\Classes;

use Filament\Pages\Auth\EditProfile;

class CustomProfile extends EditProfile {
protected static ?string $slug = 'custom-profile';
}
<?php

namespace App\Classes;

use Filament\Pages\Auth\EditProfile;

class CustomProfile extends EditProfile {
protected static ?string $slug = 'custom-profile';
}
8 replies
FFilament
Created by Arjan on 11/2/2024 in #❓┊help
Change profile route slug?
here is an example
8 replies
FFilament
Created by Arjan on 11/2/2024 in #❓┊help
Change profile route slug?
on the panel there is a profile method which can pass a custom profile class, if you want to use the Filament EditProfile class you can extend it and override the $slug
8 replies
FFilament
Created by Reza Daulay on 11/1/2024 in #❓┊help
Livewire custom component blank after Popup Called
use Filament\Forms\Components\Livewire;
use App\Livewire\Foo;

Livewire::make(Foo::class, ['bar' => 'baz'])
use Filament\Forms\Components\Livewire;
use App\Livewire\Foo;

Livewire::make(Foo::class, ['bar' => 'baz'])
6 replies
FFilament
Created by Reza Daulay on 11/1/2024 in #❓┊help
Livewire custom component blank after Popup Called
6 replies
FFilament
Created by Reza Daulay on 11/1/2024 in #❓┊help
Livewire custom component blank after Popup Called
You can pass parameter to the livewire make refer to this
6 replies
FFilament
Created by Dima on 11/1/2024 in #❓┊help
How to make filament to trim form input?
and same applies to the rest of the fields like TextArea etc hope that helps
7 replies
FFilament
Created by Dima on 11/1/2024 in #❓┊help
How to make filament to trim form input?
Which you use in your AppServiceProvider boot method
7 replies
FFilament
Created by Dima on 11/1/2024 in #❓┊help
How to make filament to trim form input?
TextInput::configureUsing(function (TextInput $input) {
$input->mutateDehydratedStateUsing(function ($state) {
return Str::trim($state);
});
});
TextInput::configureUsing(function (TextInput $input) {
$input->mutateDehydratedStateUsing(function ($state) {
return Str::trim($state);
});
});
7 replies
FFilament
Created by Dima on 11/1/2024 in #❓┊help
How to make filament to trim form input?
You will have to handle it outside Filament/Livewire, for example you can use the method configureUsing on the field for example
7 replies
FFilament
Created by Dima on 11/1/2024 in #❓┊help
How to make filament to trim form input?
// its by design from Livewire to skip TrimStrings
// in the source code here
vendor/livewire/livewire/src/Mechanisms/HandleRequests/HandleRequests.php
// in the boot method they have
$this->skipRequestPayloadTamperingMiddleware();

// which does exactly this
function skipRequestPayloadTamperingMiddleware()
{
.....
// as you can see it skip it
\Illuminate\Foundation\Http\Middleware\TrimStrings::skipWhen(function () {
return $this->isLivewireRequest();
});
}
// its by design from Livewire to skip TrimStrings
// in the source code here
vendor/livewire/livewire/src/Mechanisms/HandleRequests/HandleRequests.php
// in the boot method they have
$this->skipRequestPayloadTamperingMiddleware();

// which does exactly this
function skipRequestPayloadTamperingMiddleware()
{
.....
// as you can see it skip it
\Illuminate\Foundation\Http\Middleware\TrimStrings::skipWhen(function () {
return $this->isLivewireRequest();
});
}
7 replies
FFilament
Created by Keika on 10/31/2024 in #❓┊help
How to dispatch an event from an Action
I dont think its an issue with Filament, Action can call any function, can you confirm your env file QUEUE_CONNECTION and can you confirm your queue is working please
6 replies
FFilament
Created by TegarJK on 11/1/2024 in #❓┊help
How to get rid of clear all in notifications sidebar
@props([
'notifications',
'unreadNotificationsCount',
])

<div {{ $attributes->class('mt-2 flex gap-x-3') }}>
@if ($unreadNotificationsCount)
<x-filament::link
color="primary"
tabindex="-1"
tag="button"
wire:click="markAllNotificationsAsRead"
>
{{ __('filament-notifications::database.modal.actions.mark_all_as_read.label') }}
</x-filament::link>
@endif

{{-- <x-filament::link--}}
{{-- color="danger"--}}
{{-- tabindex="-1"--}}
{{-- tag="button"--}}
{{-- wire:click="clearNotifications"--}}
{{-- x-on:click="close()"--}}
{{-- >--}}
{{-- {{ __('filament-notifications::database.modal.actions.clear.label') }}--}}
{{-- </x-filament::link>--}}
</div>
@props([
'notifications',
'unreadNotificationsCount',
])

<div {{ $attributes->class('mt-2 flex gap-x-3') }}>
@if ($unreadNotificationsCount)
<x-filament::link
color="primary"
tabindex="-1"
tag="button"
wire:click="markAllNotificationsAsRead"
>
{{ __('filament-notifications::database.modal.actions.mark_all_as_read.label') }}
</x-filament::link>
@endif

{{-- <x-filament::link--}}
{{-- color="danger"--}}
{{-- tabindex="-1"--}}
{{-- tag="button"--}}
{{-- wire:click="clearNotifications"--}}
{{-- x-on:click="close()"--}}
{{-- >--}}
{{-- {{ __('filament-notifications::database.modal.actions.clear.label') }}--}}
{{-- </x-filament::link>--}}
</div>
22 replies
FFilament
Created by TegarJK on 11/1/2024 in #❓┊help
How to get rid of clear all in notifications sidebar
so final file should look
22 replies
FFilament
Created by TegarJK on 11/1/2024 in #❓┊help
How to get rid of clear all in notifications sidebar
this is the original file content you can remove or comment the clearNotifications
@props([
'notifications',
'unreadNotificationsCount',
])

<div {{ $attributes->class('mt-2 flex gap-x-3') }}>
@if ($unreadNotificationsCount)
<x-filament::link
color="primary"
tabindex="-1"
tag="button"
wire:click="markAllNotificationsAsRead"
>
{{ __('filament-notifications::database.modal.actions.mark_all_as_read.label') }}
</x-filament::link>
@endif

<x-filament::link
color="danger"
tabindex="-1"
tag="button"
wire:click="clearNotifications"
x-on:click="close()"
>
{{ __('filament-notifications::database.modal.actions.clear.label') }}
</x-filament::link>
</div>
this is the original file content you can remove or comment the clearNotifications
@props([
'notifications',
'unreadNotificationsCount',
])

<div {{ $attributes->class('mt-2 flex gap-x-3') }}>
@if ($unreadNotificationsCount)
<x-filament::link
color="primary"
tabindex="-1"
tag="button"
wire:click="markAllNotificationsAsRead"
>
{{ __('filament-notifications::database.modal.actions.mark_all_as_read.label') }}
</x-filament::link>
@endif

<x-filament::link
color="danger"
tabindex="-1"
tag="button"
wire:click="clearNotifications"
x-on:click="close()"
>
{{ __('filament-notifications::database.modal.actions.clear.label') }}
</x-filament::link>
</div>
22 replies
FFilament
Created by TegarJK on 11/1/2024 in #❓┊help
How to get rid of clear all in notifications sidebar
in your
- resources
- vendor
- filament-notifications
- components
- modal
- actions.blade.php
in your
- resources
- vendor
- filament-notifications
- components
- modal
- actions.blade.php
22 replies
FFilament
Created by TegarJK on 11/1/2024 in #❓┊help
How to get rid of clear all in notifications sidebar
You can override the specific blade file and remove the button/link or comment it etc, just be mindful for future filament releases if any updates done to that blade file it will not auto update and you will have to manually update it, but here is how you do it
22 replies