Donnell Wyche
Donnell Wyche
FFilament
Created by Donnell Wyche on 10/16/2024 in #❓┊help
Help with Global Search in Filament Relation Manager without a Resource
@awcodes Thanks for replying. I hacked something together that works by overriding the ProfileResource global search functions, but that's not what I want to achieve. I guess I could make a Filament resource, then hide it from navigation to get the functionality I'm seeking. But I was in the midst of source diving to try to figure this out. If I create something less hackey, I'll reply with my solution.
5 replies
FFilament
Created by Donnell Wyche on 10/30/2023 in #❓┊help
Integrating Multi-Tenancy with Laravel Spark: Handling Subscriptions and Trial Periods
I created a OnTrialMiddel Middleware. My specific application logic is missing, but you can see what I did here. Not sure if it's the best FilamentPHP approach, but like everything else, it works.
class OnTrialMiddleware
{
/**
* Handle an incoming request.
*
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
*/
public function handle(Request $request, Closure $next): Response
{
if (auth()->check() && auth()->user()->team && auth()->user()->team->trial_ends_at > now()) {
FilamentView::registerRenderHook(
'panels::global-search.before', function () {
return View::make('filament.banner.badge', [
'trialEndsAt' => auth()->user()->team->trial_ends_at,
]);
}
);
}

return $next($request);
}
}
class OnTrialMiddleware
{
/**
* Handle an incoming request.
*
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
*/
public function handle(Request $request, Closure $next): Response
{
if (auth()->check() && auth()->user()->team && auth()->user()->team->trial_ends_at > now()) {
FilamentView::registerRenderHook(
'panels::global-search.before', function () {
return View::make('filament.banner.badge', [
'trialEndsAt' => auth()->user()->team->trial_ends_at,
]);
}
);
}

return $next($request);
}
}
4 replies
FFilament
Created by Soundmit on 12/3/2023 in #❓┊help
Little email client/tracking in my app
I did something similar for my application. It tracks all of the emails that my application sends. I created a Event listener for the built-in Laravel MessageSent event. Here's a gist of the basic idea. --- https://gist.github.com/ccc-developer/94d2d369b7739dd98dbe2ac799868cf4 --- For reading emails, I use Postmark App to process any inbound emails to my application. --- https://postmarkapp.com/developer/user-guide/inbound --- I created an unique email address for each profile to do the matching and processing. --- You can avoid the outboard tracking if you use Postmark as they keep 45 days of your emails and make them available to your API.
7 replies
FFilament
Created by Donnell Wyche on 11/29/2023 in #❓┊help
ImportAction Infinite Loop when using the new FilamentPHP 3.1 Import Action
A fix was offered in this latest fix. https://github.com/filamentphp/filament/releases/tag/v3.1.8 While the error is gone, so is my ability to import anything. It doesn't trigger a job any longer, so nothing happens on import. I will try to replicate on a fresh installation.
26 replies
FFilament
Created by Donnell Wyche on 11/29/2023 in #❓┊help
ImportAction Infinite Loop when using the new FilamentPHP 3.1 Import Action
I did the same thing and added
$this->app->bind(Authenticatable::class, User::class);
$this->app->bind(Authenticatable::class, User::class);
to a service provider and this worked. I just spun up a fresh FilamentPHP installation and the ImportAction worked flawlessly. So, I will add multi-tenancy and see where it fails. Grateful to know that I wasn't the only person who had this experience.
26 replies
FFilament
Created by dissto on 8/29/2023 in #❓┊help
Adding Icons to Relation Manager Tabs
Like you, I couldn't find it in the documentation, but it is in the RelationManager class. If you are in v3, you can select an icon in your relation manager: class NotableRelationManager extends RelationManager { protected static ?string $icon = 'heroicon-m-document-text' }
6 replies
FFilament
Created by dissto on 8/29/2023 in #❓┊help
Adding Icons to Relation Manager Tabs
Is it possible in v3?
6 replies