StanProg
StanProg
FFilament
Created by StanProg on 7/17/2024 in #❓┊help
FileUpload issue with multiple machines
I found the problem. Step #1: I pick up the file and it gets uploaded to livewire-tmp folder of machine #1 Step #2: I click the "submit" button, and the system makes the request to machine #2, trying to pick the file from the livewire-tmp folder in order to upload it to S3 "tmp" folder. The file is not in machine #2, so it returns null: BaseFileUpload.php
if (! $file->exists()) {
return null;
}
if (! $file->exists()) {
return null;
}
Now the question is how should I handle such a problem. Any ideas?
4 replies
FFilament
Created by StanProg on 7/17/2024 in #❓┊help
FileUpload issue with multiple machines
No description
4 replies
FFilament
Created by StanProg on 9/18/2023 in #❓┊help
Defining notifications polling interval per component?
I saw that, but I need it to be 10 seconds just for specific component. If I change it for all, it will damage the app performance significantly.
6 replies
FFilament
Created by StanProg on 9/15/2023 in #❓┊help
Is there a way to send Database notifications from Job?
In the config I have:
'database' => [
'enabled' => true,
'trigger' => 'notifications.database-notifications-trigger',
'polling_interval' => '60s',
],
'database' => [
'enabled' => true,
'trigger' => 'notifications.database-notifications-trigger',
'polling_interval' => '60s',
],
But I noticed that they appear in like 30-50 minutes, not seconds. Maybe be I've misconfigured something, or did not set something that I should have. The problem is that we don't want to setup a server for Laravel Echo/Pusher.
9 replies
FFilament
Created by StanProg on 9/15/2023 in #❓┊help
Is there a way to send Database notifications from Job?
No, the notification is added to the database, but not displayed, unless I refresh the page. I waited for a way more than the polling time, but so far it appears only if I refresh the page.
9 replies
FFilament
Created by StanProg on 8/21/2023 in #❓┊help
Downgrading issues from v3 to v2
What helped was npm run build. It seems that I had to rebuild.
8 replies
FFilament
Created by StanProg on 8/21/2023 in #❓┊help
Downgrading issues from v3 to v2
That did not helped. After that I also ran php artisan optimize:clear just in case, but this also did not helped.
vagrant$ php artisan filament:upgrade
INFO Configuration cache cleared successfully.
Livewire auto-discovery manifest rebuilt!
INFO Route cache cleared successfully.
INFO Compiled views cleared successfully.
Successfully upgraded!
vagrant$ php artisan filament:upgrade
INFO Configuration cache cleared successfully.
Livewire auto-discovery manifest rebuilt!
INFO Route cache cleared successfully.
INFO Compiled views cleared successfully.
Successfully upgraded!
8 replies
FFilament
Created by StanProg on 8/21/2023 in #❓┊help
Downgrading issues from v3 to v2
When I was on v3 yes. Now, when I'm "downgrading" - no.
8 replies
FFilament
Created by StanProg on 8/15/2023 in #❓┊help
adding user-menu.start element
Thank you. I think that registerHook for the notifications is not even necessary as it's added automatically.
4 replies
FFilament
Created by StanProg on 8/11/2023 in #❓┊help
Migration of v2 layout options to v3
I'm looking for all the options in the Gist code as they are set like that in my app. I found so far only one of them.
5 replies
FFilament
Created by StanProg on 8/11/2023 in #❓┊help
Does php artisan filament:install makes changed to the Database?
I will update it on the dev environment, but I don't have dev database, only production database that is used for both dev, staging & production. This is why I'm concerned. I don't want to break my live app by making DB changes that are irreversible.
5 replies
FFilament
Created by StanProg on 8/10/2023 in #❓┊help
Target class [translator] does not exist.
Translations in Service Provider worked until 3.0.14. I refactored the code to work on 3.0.14+ like that:
->label(function() {
return __('pages/invoices.title');
})
->label(function() {
return __('pages/invoices.title');
})
11 replies
FFilament
Created by StanProg on 8/10/2023 in #❓┊help
Target class [translator] does not exist.
@Dan Harrin Any ideas?
11 replies
FFilament
Created by StanProg on 8/10/2023 in #❓┊help
Target class [translator] does not exist.
The problem was introduced in 3.0.14. I've checked version by version.
11 replies
FFilament
Created by StanProg on 8/10/2023 in #❓┊help
Target class [translator] does not exist.
<?php

declare(strict_types=1);

namespace App\Providers\Filament;

use App\Filament\Pages\Account;
use Filament\Navigation\MenuItem;
use Filament\Panel;
use Filament\PanelProvider;


class AppPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
->userMenuItems($this->getUserMenuItems());
}

/**
* @return array
*/
private function getUserMenuItems(): array
{
$userMenuItems = [];

$userMenuItems[] = MenuItem::make()
->label(__('pages/account.title'))
->url(function() {
return Account::getUrl();
})
->icon('heroicon-s-user');

return $userMenuItems;
}
}
<?php

declare(strict_types=1);

namespace App\Providers\Filament;

use App\Filament\Pages\Account;
use Filament\Navigation\MenuItem;
use Filament\Panel;
use Filament\PanelProvider;


class AppPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
->userMenuItems($this->getUserMenuItems());
}

/**
* @return array
*/
private function getUserMenuItems(): array
{
$userMenuItems = [];

$userMenuItems[] = MenuItem::make()
->label(__('pages/account.title'))
->url(function() {
return Account::getUrl();
})
->icon('heroicon-s-user');

return $userMenuItems;
}
}
11 replies
FFilament
Created by StanProg on 8/9/2023 in #❓┊help
Nested Navigation Groups in v3
It's available with the HasExtraAttributes trait, but NavigationItem does not use it.
14 replies
FFilament
Created by StanProg on 8/9/2023 in #❓┊help
Nested Navigation Groups in v3
It seems that this method does not exist in NavigationItem: Method Filament\Navigation\NavigationItem::extraAttributes does not exist.
14 replies
FFilament
Created by StanProg on 8/9/2023 in #❓┊help
Nested Navigation Groups in v3
Is there a way just to add some "margin-left" per item, so I can simulate somehow the nesting?
14 replies
FFilament
Created by StanProg on 8/7/2023 in #❓┊help
How to get currently logged user in AppPanelProvider?
For the reference, I did it with closure on hidden():
$userMenuItems[] = MenuItem::make()
->label(__('pages/org.title'))
->url(function() {
return Org::getUrl();
})
->hidden(function() {
return !Auth::user()->hasDirectPermission('manage org');
})
->icon('heroicon-m-building-office');
$userMenuItems[] = MenuItem::make()
->label(__('pages/org.title'))
->url(function() {
return Org::getUrl();
})
->hidden(function() {
return !Auth::user()->hasDirectPermission('manage org');
})
->icon('heroicon-m-building-office');
10 replies
FFilament
Created by StanProg on 8/7/2023 in #❓┊help
How to get currently logged user in AppPanelProvider?
Is there another way to have a UserMenu with elements based on the currently logged User?
10 replies