Kleis
Kleis
FFilament
Created by Kleis on 8/1/2024 in #❓┊help
User administration for tenants
Thanks, that actually works wonders, although the url becomes a bit redundant, by having the ID 2 times "/admin/3/organizations/3/edit" Ideally it should just be /admin/3/organization or something like that
4 replies
FFilament
Created by Kleis on 8/31/2023 in #❓┊help
Hide widget on dashboard
I have a custom dashboard (otherwise it would show the 2 default widgets), but it still renders all widgets from the widget folder
11 replies
FFilament
Created by Kleis on 8/31/2023 in #❓┊help
Hide widget on dashboard
(I have executed composer dump-autoload), but it didnt help in locating the component
11 replies
FFilament
Created by Kleis on 8/31/2023 in #❓┊help
Hide widget on dashboard
Unable to find component: [app.filament.page-widgets.usage-overview] I can hide it using canView and request matching, but its not pretty, since then the loading state of dashboard is wrong
11 replies
FFilament
Created by Kleis on 8/31/2023 in #❓┊help
Hide widget on dashboard
that was my initial idea too, but then its not found.
use App\Filament\PageWidgets\UsageOverview;
[...]
protected function getHeaderWidgets(): array
{
return [
UsageOverview::class
];
}
use App\Filament\PageWidgets\UsageOverview;
[...]
protected function getHeaderWidgets(): array
{
return [
UsageOverview::class
];
}
namespace App\Filament\PageWidgets;

use Filament\Widgets\StatsOverviewWidget as BaseWidget;
use Filament\Widgets\StatsOverviewWidget\Card;
use Illuminate\Support\Facades\DB;

class UsageOverview extends BaseWidget
namespace App\Filament\PageWidgets;

use Filament\Widgets\StatsOverviewWidget as BaseWidget;
use Filament\Widgets\StatsOverviewWidget\Card;
use Illuminate\Support\Facades\DB;

class UsageOverview extends BaseWidget
11 replies
FFilament
Created by justgkp on 8/12/2023 in #❓┊help
is there any possibility to change relation manager label
public static function getTitle(\Illuminate\Database\Eloquent\Model $ownerRecord, string $pageClass): string { return __('Ownerships'); }
8 replies
FFilament
Created by malebestia. on 8/11/2023 in #❓┊help
form button management
Something like >modalContent(function(MyModel $record) { return view('filament.pages.actions.advance', ['record'=>$record]);) There is functions on v3 to hide the modal buttons, not sure if it's available in v2. https://filamentphp.com/docs/3.x/actions/modals#removing-a-default-modal-footer-action-button
7 replies
FFilament
Created by Kleis on 8/11/2023 in #❓┊help
File upload not showing after reload
omg... I had a photoAttribute from before rewriting the admin panel to filament, which was stealing the database field. It works now 🫣
7 replies
FFilament
Created by Kleis on 8/11/2023 in #❓┊help
File upload not showing after reload
The path looks ok, except for the added forward slash, no? photos: "["apartments/A/photos//Peugeot_e-208_dynamic_front34.jpg"]", semweb@dedi5139:~/public_html/demo$ ls public/storage/apartments/A/photos/ Peugeot_e-208_dynamic_front34.jpg
7 replies
FFilament
Created by Kleis on 8/11/2023 in #❓┊help
File upload not showing after reload
This is on the edit page yes, but good point that name wont be set on a create page.
7 replies
FFilament
Created by Liam on 8/9/2023 in #❓┊help
grid help
19 replies
FFilament
Created by Liam on 8/9/2023 in #❓┊help
grid help
Have you tried placing the fields in the order you want them? That's what I ended up doing in another form, if you have 3 fields at column 1 then 1 at column 2 it will start 3 rows down 😑
19 replies
FFilament
Created by Kleis on 8/7/2023 in #❓┊help
How to access current model in custom view page
It works \o/ thanks both. @livewire('View-apartment', ['record'=>$record]) public ?\App\Models\Apartment $record = null;
6 replies
FFilament
Created by Kleis on 8/7/2023 in #❓┊help
How to access current model in custom view page
So I am thinking that the first view that calls the @livewire needs to forward the param ?
6 replies
FFilament
Created by Kleis on 8/7/2023 in #❓┊help
How to access current model in custom view page
Just tried, but its null :/ I am guessing it gets lost somewhere along the way. ApartmentResource has a view route : 'view' => Pages\ViewApartment::route('/{record}'), That route includes the component : @livewire('View-apartment') That component shows the table : {{ $this->table }} Which is defied in the livewire component 🫣
6 replies
FFilament
Created by Kleis on 8/4/2023 in #❓┊help
Dynamic text/header in RelationshipManager modal
Figured it out... simple really 🫣
Placeholder::make('test')->content(function ($state) {return new HtmlString($state); }),
Placeholder::make('test')->content(function ($state) {return new HtmlString($state); }),
With the test data filled using mountUsing
9 replies
FFilament
Created by Kleis on 8/4/2023 in #❓┊help
Dynamic text/header in RelationshipManager modal
In the example I would like to show the 'test' value in the placeholder. Real life the data would be a week number and date based on a custom query.
9 replies
FFilament
Created by Becker Maxime on 8/4/2023 in #❓┊help
Widgets v2 to v3
The TableWidget now uses fluent style instead of "magically named functions", just a bit of moving parts around and looks much better 👍
<?php

namespace App\Filament\Widgets;

use Closure;
use Filament\Tables;
use Filament\Widgets\TableWidget;
use Illuminate\Database\Eloquent\Builder;
use Filament\Tables\Table;

class OpenOrders extends TableWidget
{
protected static ?int $sort = 10;

public function table(Table $table): Table
{
return $table
->query(\App\Models\Order::where("status_id", 2)->orderBy('id', 'desc'))
->columns([
Tables\Columns\TextColumn::make('id')->label('#'),
Tables\Columns\TextColumn::make('full_name')->label(__('Name')),
])
->filters([
// ...
])
->actions([
// ...
])
->bulkActions([
// ...
])
->recordUrl(
fn (\App\Models\Order $record): string => route('orders.show', ['order' => $record->id])
)
;
}
}
<?php

namespace App\Filament\Widgets;

use Closure;
use Filament\Tables;
use Filament\Widgets\TableWidget;
use Illuminate\Database\Eloquent\Builder;
use Filament\Tables\Table;

class OpenOrders extends TableWidget
{
protected static ?int $sort = 10;

public function table(Table $table): Table
{
return $table
->query(\App\Models\Order::where("status_id", 2)->orderBy('id', 'desc'))
->columns([
Tables\Columns\TextColumn::make('id')->label('#'),
Tables\Columns\TextColumn::make('full_name')->label(__('Name')),
])
->filters([
// ...
])
->actions([
// ...
])
->bulkActions([
// ...
])
->recordUrl(
fn (\App\Models\Order $record): string => route('orders.show', ['order' => $record->id])
)
;
}
}
8 replies
FFilament
Created by Rasasak on 8/1/2023 in #❓┊help
How to start theme
There is fi- css classes that you can override https://beta.filamentphp.com/docs/3.x/support/style-customization
9 replies
FFilament
Created by Kleis on 8/1/2023 in #❓┊help
Beta 22 seems to break TableWidget
thanks 👍
4 replies