Mikail
Mikail
FFilament
Created by Mikail on 9/28/2024 in #❓┊help
badge color is not reactive on table
TextInputColumn::make('test_2'), TextColumn::make('total') ->badge() ->color(fn (string $state): string => $state <= $failedGrade ? 'danger' : '') I have a testinput like this that update the total column. Total column get updated but badge color does not get updated until page reload. Any way to make badge color also reactive on table?
8 replies
FFilament
Created by Mikail on 9/25/2024 in #❓┊help
Accessing table filter
Anyone knows if it is possible to access table filter from infolist ?
15 replies
FFilament
Created by Mikail on 9/14/2024 in #❓┊help
$navigationParentItem
Need a better way to view the child item without clicking the parent item when using $navigationParentItem. This will provide better UX. Any idea?
6 replies
FFilament
Created by Mikail on 9/11/2024 in #❓┊help
prefix does not exist.
TextColumn::make('volume') ->summarize(Sum::make() ->prefix('Total volume: ') ) This code is giving Method Filament\Tables\Columns\Summarizers\Sum::prefix does not exist. I have upgraded Filament.
7 replies
FFilament
Created by Mikail on 8/22/2024 in #❓┊help
How to access filter values from the table
How can I access table filter values within the updateStateUsing closure of a ToggleColumn in a Filament resource?
5 replies
FFilament
Created by Mikail on 8/21/2024 in #❓┊help
Filament filters my leftJoin
I am applying a leftjoin to my filter base query so that records from the left table will populate regardless of whether there's a corresponding record in the right table. The query is fine after log, but something seems to be preventing the leftjoin to work as intended. Here's the code: ->baseQuery(function (Builder $query, array $data): Builder { $query->from('subjects') ->leftJoin('subject_allocations', function ($join) use ($data) { $join->on('subjects.id', '=', 'subject_allocations.subject_id'); if (isset($data['school_class_id']) && isset($data['section_id'])) { $join->where('subject_allocations.school_class_id', $data['school_class_id']) ->where('subject_allocations.section_id', $data['section_id']); } }); Log::info($query->toSql(), $query->getBindings()); return $query; })
7 replies
FFilament
Created by Mikail on 8/4/2024 in #❓┊help
deferLoading
Is there any simple way to actually deferLoading on the table data until filter is applied?
7 replies
FFilament
Created by Mikail on 8/1/2024 in #❓┊help
Sort cluster navigation
No description
10 replies
FFilament
Created by Mikail on 7/25/2024 in #❓┊help
Customizing data before filling the form
mutateFormDataBeforeFill doesn't work in infolist. the method doesn't get called at all. Wondering what i did wrong.
5 replies
FFilament
Created by Mikail on 7/13/2024 in #❓┊help
'id' column with join
I'm having a Column 'id' in where clause is ambiguous when i use join to filter the query: public static function getEloquentQuery(): Builder { return parent::getEloquentQuery() ->join('enrollments', 'users.id', '=', 'enrollments.user_id') ->leftJoin('applications', 'users.id', '=', 'applications.user_id') ->select( 'users.*', 'enrollments.section_id', 'enrollments.school_class_id', 'enrollments.status', 'applications.application_id', 'applications.class_of_entry_id', 'applications.screening_mark', 'applications.screening_status' ) ->where('users.role_id', Role::STUDENT); } The database doesn't know which column to choose the 'id' from. This only gives error in edit and view $operation. Any help to fix this??
6 replies
FFilament
Created by Mikail on 7/6/2024 in #❓┊help
Spatie Settings
How do you make spatie-laravel-settings-plugin tenant aware. Where we can save setting based on different tenant. I tried to add the tenant school_id to the settings migration but I'm facing difficulties with default properties value. Any help?
7 replies
FFilament
Created by Mikail on 6/20/2024 in #❓┊help
Tags input
How to store tags in different records instead of default JSON format?
7 replies
FFilament
Created by Mikail on 6/18/2024 in #❓┊help
->updateStateUsing on ToggleColumn
There must be an active record no matter what in the resource which works fine in the database with a modification using ->updateStateUsing as shown in code below. The only issue is that toggle button won't go back to 'on' in the view until browser refresh. Anything I could do? ToggleColumn::make('status') ->label('Active') ->updateStateUsing(function ($record, $state) { if (!$state) { $schoolId = Filament::getTenant()->id; $hasOtherActive = $record::where('id', '!=', $record->id) ->where('school_id', $schoolId) ->where('status', true) ->exists(); if (!$hasOtherActive) { Notification::make() ->danger() ->title('Update Failed') ->body('There must be at least one active session.') ->send(); return $state = true; } } else { return $record->update(['status' => $state]); } })
6 replies
FFilament
Created by Mikail on 6/13/2024 in #❓┊help
Saving TextInputColumn in a different table
I need a way to save value in a different table rather than the static model. IT makes the update in the default model.
17 replies
FFilament
Created by Mikail on 6/1/2024 in #❓┊help
Render Hook for footer will not stay in the bottom...
No description
7 replies
FFilament
Created by Mikail on 5/6/2024 in #❓┊help
file upload glitch in the view
is the file upload component suppose to make a glitch like the one shown in the video?
5 replies
FFilament
Created by Mikail on 4/14/2024 in #❓┊help
Can multiple users share the same tenants in multi-tenancy?
Is it possible for multiple users to have access to the same multiple tenants from the panel? And secondly, could we have a single login page with multiple Auth system where users are simply directed to their own panel based on role. This is to avoid multiple login page. Would appreciate any idea on this...
8 replies
FFilament
Created by Mikail on 4/11/2024 in #❓┊help
native(false) won't work on depended dropdown, any idea?
->filters([ SelectFilter::make('school_class_and_section') ->form([ Select::make('school_class_id') ->label('Class') ->relationship('school_classes', 'name') ->native(false) ->live(), Select::make('section_id') ->label('Section') // ->native(false) NOTE: Not loading the dropdown unless native is true because sections dropdown depends on classes
->placeholder(fn (Get $get): string => empty($get('school_class_id')) ? 'First select a class' : 'Select an option') ->relationship( 'sections', 'name', fn (Builder $query, Get $get) => $query ->where('sections.school_class_id', $get('school_class_id')) ), ]) Select::make('section_id') won't load if native() is set to false. I think because of arrow fn. The Remove item feature in native(false) is very important in this regard. Any idea how to go around this?
17 replies
FFilament
Created by Mikail on 4/1/2024 in #❓┊help
->extremePaginationLinks() not working even as default
No description
19 replies
FFilament
Created by Mikail on 4/1/2024 in #❓┊help
App\Models\student not found
My resource class 'student' are users with a specific role_id from USER MODEL How do I go about this?
5 replies