bhattji
bhattji
FFilament
Created by bhattji on 9/19/2024 in #❓┊help
how to add custom value in sessions table
I want to add lotitude & logitude in sessions table. I have inserted these values in sessions, but it is not going to the database table. Please help, how to save this values in sessions table?
2 replies
FFilament
Created by bhattji on 9/13/2024 in #❓┊help
How to set the Avatar for the Tenant, in Filamentphp?
No description
5 replies
FFilament
Created by bhattji on 9/3/2024 in #❓┊help
How to set date of the DatePicker component?
I wish to set the Maturity date when the Loan Date is entered. I have written the code as below ->reactive() ->afterStateUpdated(function (callable $get, callable $set) { $scheme = \App\Models\Scheme::find($get('scheme_id')); if ($scheme){ $set('maturity_date', \Carbon\Carbon::parse($scheme->loan_date)->addDays($scheme->days)); } }) but it is not working 😦 How to set date of the DatePicker component?
2 replies
FFilament
Created by bhattji on 8/5/2024 in #❓┊help
How to group Item in Report Plugin
I am trying to use this Report Plugin https://github.com/eighty9nine/filament-reports Instead of listing Location as column I would like to put it as Group an list items for the Location beneath it. The owner gave this suggestion to use map, but it seems there is some missing bracket somewhere https://github.com/eighty9nine/filament-reports/issues/24#issuecomment-2263863220 public function body(Body $body): Body { return $body ->schema([ ...Location::all() ->map( fn(Location $location) => [ Text::make($location->name), Body\Table::make() ->data( fn(?array $filters) => User::join("locations", "location.id", "=", "users.location_id") ->where("users.deleted_at", null) ->where("users.location_id", $location->id) ->when(isset($filters["location_id"], fn($query) => $query->where("users.location_id", $filters["location_id"])) ->select("users.name", "users.email", "locations.name") ->get() ), ]) ]); } Can someone please help?
2 replies
FFilament
Created by bhattji on 8/4/2024 in #❓┊help
How to bypass database violations?
I have a table with unique index, I am trying to update the model in a try-catch block $exceptions = 0; try { AssetDepreciation::updateOrCreate([ 'asset_id' => $asset->id, 'as_on' => $data['as_on_date'], 'depreciated_value' => (($asset->asset_depreciations()->count() > 0 ? $asset->asset_depreciations()->orderBy('as_on','desc')->first()->depreciated_value : $asset->purchase_value) * (100 - $asset->depreciation_percentage) / 100), ]); } catch (Exception $e) { $exceptions++; } but it does not bypass "SQLSTATE[23000]: Integrity constraint violation:" why?
6 replies
FFilament
Created by bhattji on 8/4/2024 in #❓┊help
Filament Settings
Do we have updated version of Filament-Settings plugin for Filament 3.2.x & Laravel 11.x?
33 replies
FFilament
Created by bhattji on 8/3/2024 in #❓┊help
Target [Illuminate\Database\Eloquent\Model] is not instantiable
I have the UserResource, which I guess, working all fine sometime before, however I find now I am not abe to create a new User (Target [Illuminate\Database\Eloquent\Model] is not instantiable.) The EditUser works fine though How to solve this? Please help asap
12 replies