bernhard
bernhard
FFilament
Created by bernhard on 4/29/2025 in #❓┊help
Resource Page outside filament
I am just looking for the "best"/most elegant solution. ATM, I am solving it like this: bootstrap/app.php
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
...
then: function() {
Route::middleware([
...Filament::getPanel('admin')->getMiddleware(),
...Filament::getPanel('admin')->getAuthMiddleware(),
])
->prefix(Filament::getPanel('admin')->getPath())
->name('filament.admin.')
->group(base_path('routes/admin.php'));
}
)
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
...
then: function() {
Route::middleware([
...Filament::getPanel('admin')->getMiddleware(),
...Filament::getPanel('admin')->getAuthMiddleware(),
])
->prefix(Filament::getPanel('admin')->getPath())
->name('filament.admin.')
->group(base_path('routes/admin.php'));
}
)
routes/app.php
Route::get("mail-templates/{record}/preview", fn(MailTemplate $record) => MyController)
->name("resources.mail-templates.preview");
Route::get("mail-templates/{record}/preview", fn(MailTemplate $record) => MyController)
->name("resources.mail-templates.preview");
It works, but it doesn't feel like the truly correct or most elegant solution. Since it's actually "part of the resource," I thought there might be a way to integrate it directly into the resource class. But obviously, I can live with my current solution 😉
6 replies
FFilament
Created by bernhard on 4/29/2025 in #❓┊help
Resource Page outside filament
What do you mean with "manually" register it? In routes/web.php? And is it possible, to render a filament page completly free, I mean without header, sidebar, footer, etc?
6 replies
FFilament
Created by islandnuge on 4/29/2025 in #❓┊help
Redirecting to a specific filament resource after authenticating correctly
Here is an tutorial for a logout redirect to start with: https://filamentphp.com/content/tim-wassenburg-how-to-customize-logout-redirect
5 replies
FFilament
Created by islandnuge on 4/29/2025 in #❓┊help
Redirecting to a specific filament resource after authenticating correctly
I haven't tried it out, but you could hook to the \Filament\Http\Responses\Auth\Contracts\LoginResponse
5 replies
FFilament
Created by bernhard on 3/20/2025 in #❓┊help
Optionally activate table summary with action
7 replies
FFilament
Created by bernhard on 3/20/2025 in #❓┊help
Optionally activate table summary with action
@nanopanda And how did you implement the Action but (to save me some time :)) if you have time to show me your example. I will try to create a reproducable Repo for the issue in the meantime
7 replies
FFilament
Created by bernhard on 3/20/2025 in #❓┊help
Optionally activate table summary with action
Thanks for your time. Yeah, looks like it. Are you bscarola?
7 replies
FFilament
Created by bernhard on 3/20/2025 in #❓┊help
How to center filter modal footer?
just for the records: This specific modal is a "choice" modal with just submit/close actions. And even if I have other buttons, I really dont like buttons on the left side. Its very uncommon. Most UI tools I use have it centered or right align. Nova for example have them right. But its ok, I can work around it. Thanks for your help.
14 replies
FFilament
Created by bernhard on 3/20/2025 in #❓┊help
How to center filter modal footer?
plus the action is right, while the cancel is left. Thats very inconsistent if you compare it with the filter modal for example
14 replies
FFilament
Created by bernhard on 3/20/2025 in #❓┊help
How to center filter modal footer?
centered....
14 replies
FFilament
Created by bernhard on 3/20/2025 in #❓┊help
How to center filter modal footer?
No description
14 replies
FFilament
Created by bernhard on 3/20/2025 in #❓┊help
How to center filter modal footer?
Ok, just css. I thought there is a setting for it, I am just missing. Thanks for your help!
14 replies
FFilament
Created by bernhard on 3/20/2025 in #❓┊help
How to center filter modal footer?
I am forcing most other buttons to be centered with the following in my AdminPanelProvider:
->bootUsing(function () {
Page::formActionsAlignment('center');
})
->bootUsing(function () {
Page::formActionsAlignment('center');
})
But this doesn't help here
14 replies
FFilament
Created by bernhard on 3/20/2025 in #❓┊help
How to center filter modal footer?
14 replies
FFilament
Created by bernhard on 3/20/2025 in #❓┊help
How to center filter modal footer?
I didnt add them. They are default behaviour of filament. Just use
->filtersLayout(FiltersLayout::Modal)
->filtersLayout(FiltersLayout::Modal)
on your Table
14 replies
FFilament
Created by bernhard on 3/4/2025 in #❓┊help
Using Tailwind 4 alongside with filament
Sorry for late answer. Tried it out and it worked. But this - as far as I have tried - only works when not using Filament V3 on the frontend, because of some changes in TW4. So using it in an "isolated" admin panel is fine, but mixing Filament3 with TW4 will obviously break a lot of styles.
8 replies
FFilament
Created by bernhard on 3/6/2025 in #❓┊help
Sum of 2 columns of a relation
Using ->selectRaw adds another column, using ->select overwrites the default select part
5 replies
FFilament
Created by bernhard on 3/6/2025 in #❓┊help
Sum of 2 columns of a relation
Nevermind, found it:
TextColumn::make('order_positions_sum_product_price')
->money("EUR")
->sum(
['orderPositions' => fn (Builder $query) => $query->select(\DB::raw('SUM(product_price * amount)'))],
'product_price'
),
TextColumn::make('order_positions_sum_product_price')
->money("EUR")
->sum(
['orderPositions' => fn (Builder $query) => $query->select(\DB::raw('SUM(product_price * amount)'))],
'product_price'
),
5 replies
FFilament
Created by bernhard on 2/17/2025 in #❓┊help
Key-value Field with dot in key
but only on edit, not on create. weird bug
49 replies
FFilament
Created by bernhard on 2/17/2025 in #❓┊help
Key-value Field with dot in key
even ->afterStateUpdated(fn ($state) => dd($state)) ->live(onBlur: true) throws the error, when the field loses the focus. So as you can see, it has nothing to do with the save / model
49 replies