codeartisan
codeartisan
FFilament
Created by codeartisan on 5/13/2024 in #❓┊help
Use filament in wirelive
I have ever configured them in livewire just am failing to get the link
6 replies
FFilament
Created by codeartisan on 5/13/2024 in #❓┊help
Use filament in wirelive
The setup part then I also want to use their tables
6 replies
FFilament
Created by codeartisan on 5/2/2024 in #❓┊help
Auto increment column
thank you solved
6 replies
FFilament
Created by codeartisan on 4/26/2024 in #❓┊help
Create a resume like builder in filament php
okay thank you
5 replies
FFilament
Created by codeartisan on 4/26/2024 in #❓┊help
Join 3 tables
Thank you let me check it out
6 replies
FFilament
Created by codeartisan on 4/26/2024 in #❓┊help
Join 3 tables
$advances = DB::table('advances')
->select('amount_before', 'amount_after', 'amount', 'date')
->where('customer_id', $customerId)
->get();

$balancings = DB::table('balancings')
->select('net_pay_out', 'deductable_advance', 'price', 'date')
->where('customer_id', $customerId)
->get();

$cashPayments = DB::table('cash_payments')
->select('amount as deductable_advance', 'date') // Rename the amount field
->where('customer_id', $customerId)
->get();

// Merge the results of advances and balancings into a single collection
$ledger = $advances->merge($balancings)->merge($cashPayments);

// Sort the merged collection by the 'date' field in ascending order
$sortedLedger = $ledger->sortBy('date');

// Convert the sorted collection to a plain array for JSON response,
// and then reindex the array numerically
$ledgerArray = $sortedLedger->values()->toArray();
$advances = DB::table('advances')
->select('amount_before', 'amount_after', 'amount', 'date')
->where('customer_id', $customerId)
->get();

$balancings = DB::table('balancings')
->select('net_pay_out', 'deductable_advance', 'price', 'date')
->where('customer_id', $customerId)
->get();

$cashPayments = DB::table('cash_payments')
->select('amount as deductable_advance', 'date') // Rename the amount field
->where('customer_id', $customerId)
->get();

// Merge the results of advances and balancings into a single collection
$ledger = $advances->merge($balancings)->merge($cashPayments);

// Sort the merged collection by the 'date' field in ascending order
$sortedLedger = $ledger->sortBy('date');

// Convert the sorted collection to a plain array for JSON response,
// and then reindex the array numerically
$ledgerArray = $sortedLedger->values()->toArray();
Thats what I had before I want to convert it to filament // Return the response as JSON, with data as an array of items return response()->json(['data' => $ledgerArray]);
6 replies
FFilament
Created by codeartisan on 4/1/2024 in #❓┊help
Dynamically create a column in the
thank you
22 replies
FFilament
Created by codeartisan on 4/7/2024 in #❓┊help
Create an email like table using filament
thank you
5 replies
FFilament
Created by codeartisan on 4/1/2024 in #❓┊help
Dynamically create a column in the
Yeah
22 replies
FFilament
Created by codeartisan on 4/1/2024 in #❓┊help
Dynamically create a column in the
just wanted to try out the second option
22 replies
FFilament
Created by codeartisan on 4/1/2024 in #❓┊help
Dynamically create a column in the
but the first solution works fine
22 replies
FFilament
Created by codeartisan on 4/1/2024 in #❓┊help
Dynamically create a column in the
it a dynamic field
22 replies
FFilament
Created by codeartisan on 4/1/2024 in #❓┊help
Dynamically create a column in the
no
22 replies
FFilament
Created by codeartisan on 4/1/2024 in #❓┊help
Dynamically create a column in the
first one works but the second one is giving me challenges
22 replies
FFilament
Created by codeartisan on 4/1/2024 in #❓┊help
Dynamically create a column in the
I cant find any information about a virtual column
22 replies
FFilament
Created by codeartisan on 4/1/2024 in #❓┊help
Dynamically create a column in the
thank you
22 replies
FFilament
Created by codeartisan on 4/1/2024 in #❓┊help
Dynamically create a column in the
Hello members any help
22 replies
FFilament
Created by codeartisan on 3/28/2024 in #❓┊help
FormatUsingState is null on a select relationship
solved
5 replies
FFilament
Created by codeartisan on 3/28/2024 in #❓┊help
FormatUsingState is null on a select relationship
Thank you
5 replies
FFilament
Created by codeartisan on 3/26/2024 in #❓┊help
Getting access to the request object in filament table actions
Action::make('delete')
->label('Delete')
->requiresConfirmation()
->color('danger')
->icon('heroicon-o-trash')
->action(function ($record, Request $request) {
// Delete the record
if ($record->delete()) {
try {
//code...
$this->createAudit($request, "Deleted user of name " . $record->name . "", 'DELETED USER');
} catch (\Throwable $th) {
//throw $th;
//dd($th);
}
Notification::make()
->title('Delete record ' . $record->id . ' successfully')
->success()
->send();
}
})
->visible(function ($record) {
return $record->email == 'superadmin@coffeeims.com';
}),
Action::make('delete')
->label('Delete')
->requiresConfirmation()
->color('danger')
->icon('heroicon-o-trash')
->action(function ($record, Request $request) {
// Delete the record
if ($record->delete()) {
try {
//code...
$this->createAudit($request, "Deleted user of name " . $record->name . "", 'DELETED USER');
} catch (\Throwable $th) {
//throw $th;
//dd($th);
}
Notification::make()
->title('Delete record ' . $record->id . ' successfully')
->success()
->send();
}
})
->visible(function ($record) {
return $record->email == 'superadmin@coffeeims.com';
}),
5 replies