der andere
der andere
FFilament
Created by Altffenser on 10/22/2023 in #❓┊help
$container must not be accessed before initialization
Anyone found the solution? return $table ->modifyQueryUsing(function ($query) { $currentUserId = auth()->id(); $query->where(function ($query) use ($currentUserId) { $query->where('Sender', $currentUserId) ->orWhere('Empfänger', $currentUserId); }); }) ->columns([ Tables\Columns\TextColumn::make('Sender')->numeric()->sortable(), Tables\Columns\TextColumn::make('Nachricht')->numeric()->sortable(), ]) ->filters([ Filter::make('Empfänger') ->form(static function () { return [ ToggleButtons::make('Empfänger') ->label('Deine Chats') ->options(static function (Get $get) { $user = auth()->user(); return self::getLast6Chats($user, $get('searchText')); }) ->live() ->inline(), TextInput::make('searchText') ->label('Suche nach einem Chat') ->live() ->placeholder('Suche nach einem Benutzer...') ->name('searchText'), ]; }) ->query(static function (Get $get, $query) { $empfänger = $get('Empfänger'); $query->where(function ($query) use ($empfänger) { $query->where('Sender', $empfänger) ->orWhere('Empfänger', $empfänger); }); }), trying to use the Empfänger field to edit the query but i get the error
4 replies