D2RTECH
D2RTECH
FFilament
Created by D2RTECH on 10/3/2024 in #❓┊help
Add a query with a join
Just for reference for others, this was solved using below Select::make('laptop_id') ->label('Laptop') ->options( Laptop::query() ->leftJoin('laptop_assignments as la', function ($join) { $join->on('laptops.asset_id', '=', 'la.laptop_id') ->whereRaw('la.assigned_at = (SELECT MAX(assigned_at) FROM laptop_assignments WHERE laptop_id = laptops.asset_id)'); }) ->whereNull('la.laptop_id') ->orWhere(function ($query) { $query->whereNotNull('la.returned_at') ->where('la.returned_at', '<', today()); }) ->pluck('asset_id', 'asset_id') ->toArray() )
->searchable(),
6 replies
FFilament
Created by D2RTECH on 10/3/2024 in #❓┊help
Add a query with a join
Group any help on this?
6 replies
FFilament
Created by D2RTECH on 10/3/2024 in #❓┊help
Add a query with a join
technically this is the query which will fetch me the result, how do i include it in options SELECT laptops.* FROM laptops LEFT JOIN ( SELECT laptop_id, MAX(assigned_at) AS latest_assignment FROM laptop_assignments GROUP BY laptop_id ) AS latest_assignment ON laptops.asset_id = latest_assignment.asset_id LEFT JOIN laptop_assignments AS la ON la.asset_id = laptops.asset_id AND la.assigned_at = latest_assignment.latest_assignment WHERE la.asset_id IS NULL OR (la.returned_at IS NOT NULL AND la.returned_at < CURDATE());
6 replies
FFilament
Created by D2RTECH on 5/4/2024 in #❓┊help
issue with fillrecordusing
It is very surprising that this code did not worked on my Local machine, but when i hosted it on server, it worked absolutely fine. here is the code snippet ImportColumn::make('item_loaned') ->requiredMapping() ->fillRecordUsing(function (Inventory $record, string $state): void { if(strtolower($state) === 'yes') { $record->item_loaned = 'Yes'; } elseif (strtolower($state) === 'no') { $record->item_loaned = 'No'; } else { $record->item_loaned = 'No'; } }) ->rules(['required', 'max:255']),
3 replies
FFilament
Created by D2RTECH on 2/12/2024 in #❓┊help
Getting a 403 when deployed on hosted server on hostinger
Problem is resolved, the issue was that the server.php was missing. Somehow by default when we create a Project server.php is not created, hence application could not be started
10 replies
FFilament
Created by D2RTECH on 2/12/2024 in #❓┊help
Getting a 403 when deployed on hosted server on hostinger
No description
10 replies
FFilament
Created by D2RTECH on 2/12/2024 in #❓┊help
Getting a 403 when deployed on hosted server on hostinger
No description
10 replies
FFilament
Created by D2RTECH on 2/12/2024 in #❓┊help
Getting a 403 when deployed on hosted server on hostinger
My complete app is basically panel only
10 replies
FFilament
Created by D2RTECH on 2/12/2024 in #❓┊help
Getting a 403 when deployed on hosted server on hostinger
i am not on VPN
10 replies
FFilament
Created by D2RTECH on 2/12/2024 in #❓┊help
Getting a 403 when deployed on hosted server on hostinger
nope... i am not able to open anything
10 replies
FFilament
Created by D2RTECH on 2/12/2024 in #❓┊help
Getting a 403 when deployed on hosted server on hostinger
any help?
10 replies
FFilament
Created by D2RTECH on 1/9/2024 in #❓┊help
file upload error 422 on local machine
any idea?
6 replies
FFilament
Created by D2RTECH on 1/9/2024 in #❓┊help
file upload error 422 on local machine
yeah, tried diff files...file size is around 1mb
6 replies
FFilament
Created by D2RTECH on 1/8/2024 in #❓┊help
how to show the mobile number with country code
this worked 🙂
8 replies
FFilament
Created by D2RTECH on 1/8/2024 in #❓┊help
how to show the mobile number with country code
country code and mobile number are store differently in the db table
8 replies
FFilament
Created by D2RTECH on 1/8/2024 in #❓┊help
how to show the mobile number with country code
kindly help
8 replies
FFilament
Created by D2RTECH on 1/8/2024 in #❓┊help
how to show the mobile number with country code
Basically need to concatenate both of them and prefix them with a + sign
8 replies
FFilament
Created by D2RTECH on 1/8/2024 in #❓┊help
in Filament v3.x how to show city Name when city ID is saved in the table
it was easy
14 replies
FFilament
Created by D2RTECH on 1/8/2024 in #❓┊help
in Filament v3.x how to show city Name when city ID is saved in the table
Worked 🙂
14 replies
FFilament
Created by D2RTECH on 1/8/2024 in #❓┊help
in Filament v3.x how to show city Name when city ID is saved in the table
no real reason
14 replies