hello_world
hello_world
FFilament
Created by hello_world on 6/28/2024 in #❓┊help
form fill and default of select tag is not working
here the default of the select tag is not working so i use mount to fill the form but there also not working
2 replies
FFilament
Created by hello_world on 6/27/2024 in #❓┊help
How to get State of SelectConstraints
SelectConstraint::make('contactEvents.status') ->options([ 'Registered' => 'Registered', 'Checked In' => 'Checked In', 'Buyer' => 'Buyer', ]) ->icon('heroicon-m-bookmark') ->label('Contact Event Status'), and can i override the query of this perticukar constraints
2 replies
FFilament
Created by hello_world on 6/26/2024 in #❓┊help
when i'm using ->native(false) then disabled is not working
Select::make('Pos_Devices') ->preload() ->options(function (Get $get) { return PosDevice::availablePosDevices() ->pluck('name', 'pos_devices.id')->toArray(); }) ->hidden(function (Get $get) { return auth()->user()->id != $get('user_id'); }) ->native(false) ->disabled(function () { return $this->assignedDevices ? true : false; }),
1 replies
FFilament
Created by hello_world on 6/24/2024 in #❓┊help
Attachments are not uploading when i set File Attachments Visibility as public in Rich Editor
when i set the visibility of Rich editor as Public then the attachments are not uploading but i want it to be public so that it will acessable all the time this is my code RichEditor::make('body') ->required() ->fileAttachmentsDisk('public-s3') ->fileAttachmentsDirectory('mail-body-attachments') ->fileAttachmentsVisibility('public'),
4 replies
FFilament
Created by hello_world on 5/14/2024 in #❓┊help
Multiple Select Issue
Select::make('pos_devices_id')
->label('POS Devices')
->default(function () {
$userId = auth()->user()->id;
return PosDevice::whereHas('users', function ($query) use ($userId) {
$query->where('users.id', $userId);
})->pluck('name','id')->toArray();
})
->options(function (Get $get, Set $set) {
$userId = $get('user_id');

$test = PosDevice::doesntHave('users', 'and', function ($query) use ($userId) {
$query->where('user_id', $userId);
})->where('status', 1)->pluck('name', 'id')->toArray();
// $set('data', $test);
if ($userId) {
return $test;
}
return [];
})
->multiple()
->live()
->afterStateUpdated(function (Get $get, $state) {
$assignDevices = $get('Assigned Devices');
info($state);
return $state;
}),
Select::make('pos_devices_id')
->label('POS Devices')
->default(function () {
$userId = auth()->user()->id;
return PosDevice::whereHas('users', function ($query) use ($userId) {
$query->where('users.id', $userId);
})->pluck('name','id')->toArray();
})
->options(function (Get $get, Set $set) {
$userId = $get('user_id');

$test = PosDevice::doesntHave('users', 'and', function ($query) use ($userId) {
$query->where('user_id', $userId);
})->where('status', 1)->pluck('name', 'id')->toArray();
// $set('data', $test);
if ($userId) {
return $test;
}
return [];
})
->multiple()
->live()
->afterStateUpdated(function (Get $get, $state) {
$assignDevices = $get('Assigned Devices');
info($state);
return $state;
}),
the saved data is not rendering properly if i use
->default(function () {
$userId = auth()->user()->id;
return PosDevice::whereHas('users', function ($query) use ($userId) {
$query->where('users.id', $userId);
})->pluck('id')->toArray();
})
->default(function () {
$userId = auth()->user()->id;
return PosDevice::whereHas('users', function ($query) use ($userId) {
$query->where('users.id', $userId);
})->pluck('id')->toArray();
})
then it is showing id's and if i use name in pluck then i am unable to sav it giving a error that string can't insert which type is bigInt
2 replies
FFilament
Created by hello_world on 5/6/2024 in #❓┊help
->action() is not working in wizard ->nextAction()
here is my code
->nextAction(
fn (ActionsAction $action) => $action->label('')
->action(function () {
dd('hello');
})
->extraAttributes(fn () => [
'class' => 'wizard-button'
]),
)
->nextAction(
fn (ActionsAction $action) => $action->label('')
->action(function () {
dd('hello');
})
->extraAttributes(fn () => [
'class' => 'wizard-button'
]),
)
4 replies
FFilament
Created by hello_world on 5/3/2024 in #❓┊help
I can't formatState of TextColumn having value null
TextColumn::make('last_contacted')->date('M d')->label('Last Attempt')->sortable()->formatStateUsing(function($state){
if($state != null){
info($state);
}
else{
info('hello');
}
}),
TextColumn::make('last_contacted')->date('M d')->label('Last Attempt')->sortable()->formatStateUsing(function($state){
if($state != null){
info($state);
}
else{
info('hello');
}
}),
20 replies
FFilament
Created by hello_world on 4/30/2024 in #❓┊help
can't hide Close button of a modal
here is my code i given below
11 replies
FFilament
Created by hello_world on 4/29/2024 in #❓┊help
afterStateUpdated() is not working in Datepicker inside livewire components
DatePicker::make('date')
->label('')
->afterStateUpdated(function ($state) {
info($state);
})
->native(false)
->reactive()
->minDate(Carbon::now())
->closeOnDateSelection()
->extraAttributes(['class' => 'date_picker']),
DatePicker::make('date')
->label('')
->afterStateUpdated(function ($state) {
info($state);
})
->native(false)
->reactive()
->minDate(Carbon::now())
->closeOnDateSelection()
->extraAttributes(['class' => 'date_picker']),
this is my code please check when i use tis DatePicker in Normal Resource or widget the afterStateUpdated() is working but not working if i put the same DatePicker inside a Livewire component Form
12 replies
FFilament
Created by hello_world on 4/16/2024 in #❓┊help
Getting Error in Sudden Change in Tab
I'm using a Custom table which is changing through a Year filter and I 'm getting Typed property Filament\Widgets\TableWidget::$table must not be accessed before initialization this error when i suddenly change my year filter
9 replies
FFilament
Created by hello_world on 1/19/2024 in #❓┊help
Getting Error in Query Builder in Table Widget
https://gist.github.com/abhi051002/cdbee5da66029f4ada377f3df40cceaa when i use a query in table widget it gives me the error " SQLSTATE[42803]: Grouping error: 7 ERROR: column "payments.id" must appear in the GROUP BY clause or be used in an aggregate function LINE 1: ...ONTH FROM transaction_date) order by "month" asc, "payments"... ^" but when i use the same query any where and dd/info the result it works well why it is not working on query builder and give the erro and i know if i add the payments.id then it will work well but i want result without including it.
15 replies