dasK_
dasK_
FFilament
Created by dasK_ on 4/5/2024 in #❓┊help
Storing and Retrieving Price
thanks for the link, I feel as though it's basically the same thing as what I'm doing?
public function getRetailPriceAttribute($value)
{
return $value / 100;
}

public function setRetailPriceAttribute($value)
{
$this->attributes['retailPrice'] = $value * 100;
}
public function getRetailPriceAttribute($value)
{
return $value / 100;
}

public function setRetailPriceAttribute($value)
{
$this->attributes['retailPrice'] = $value * 100;
}
I don't want to get the attribute as a decimal value, I just want filament to do that
3 replies
FFilament
Created by dasK_ on 3/18/2024 in #❓┊help
Replacing Login Route with Jetstream
I tried that yesterday, didn't work.. have been developing in docker and octane, for whatever reason I had my app\providers folder excluded from the mount and had to rebuild. Thank you!
5 replies
FFilament
Created by Wannes on 1/13/2024 in #❓┊help
Field is required CSV Importer
I have this package as well, thank you!
34 replies
FFilament
Created by Wannes on 1/13/2024 in #❓┊help
Field is required CSV Importer
same issue 😦
34 replies
FFilament
Created by Wannes on 1/13/2024 in #❓┊help
Field is required CSV Importer
I did upgrade from filament 2 when 3 came out, if that makes a difference
34 replies
FFilament
Created by Wannes on 1/13/2024 in #❓┊help
Field is required CSV Importer
console says livewire.js?id=a27c4ca2:347 Uncaught TypeError: Cannot read properties of null (reading 'name')
34 replies
FFilament
Created by Wannes on 1/13/2024 in #❓┊help
Field is required CSV Importer
No description
34 replies
FFilament
Created by Wannes on 1/13/2024 in #❓┊help
Field is required CSV Importer
dd($this->data); in resolveRecord after removing the requiredMapping and rules for required array:7 [▼ // app\Filament\Imports\ProviderImporter.php:35 "ID" => "174" "Name" => "Vodafone Albania" "Logo url" => "" "Network type" => "4g" "Country" => "Albania" "Created at" => "2024-02-08 03:48:26" "Updated at" => "2024-02-08 03:59:41" ]
34 replies
FFilament
Created by Wannes on 1/13/2024 in #❓┊help
Field is required CSV Importer
csv should just be UTF-8 encoding right?
34 replies
FFilament
Created by Wannes on 1/13/2024 in #❓┊help
Field is required CSV Importer
Yep, npm run build then npm run dev
34 replies
FFilament
Created by Wannes on 1/13/2024 in #❓┊help
Field is required CSV Importer
updated to v3.2.33 and still having the same issue unfortunately
34 replies
FFilament
Created by Wannes on 1/13/2024 in #❓┊help
Field is required CSV Importer
Sorry for late reply, class ProviderImporter extends Importer { protected static ?string $model = Provider::class; public static function getColumns(): array { return [ ImportColumn::make('name') ->label('Name') ->requiredMapping() ->rules(['required', 'max:255']), ImportColumn::make('logoUrl') ->rules(['max:255']), ImportColumn::make('network_type') ->rules(['max:255']), // ImportColumn::make('country') // ->relationship(resolveUsing: function ($state) { // return Country::where('name', $state)->first()?->id; // }) ]; } public function resolveRecord(): ?Provider { return Provider::firstOrNew([ 'name' => $this->data['Name'], ]); return new Provider(); } Note: I commented out the relationship column just to show that I'm not doing anything complicated
34 replies
FFilament
Created by Wannes on 1/13/2024 in #❓┊help
Field is required CSV Importer
No description
34 replies
FFilament
Created by Wannes on 1/13/2024 in #❓┊help
Field is required CSV Importer
No description
34 replies
FFilament
Created by Wannes on 1/13/2024 in #❓┊help
Field is required CSV Importer
documentation says use Filament\Actions\Imports\ImportColumn; public function getColumns(): array { but when you generate the importer it does a public static function.. weird.
34 replies
FFilament
Created by Wannes on 1/13/2024 in #❓┊help
Field is required CSV Importer
I'm seeing this in console livewire.js?id=a27c4ca2:347 Uncaught TypeError: Cannot read properties of null (reading 'name') double checked the csv, looks fine, I even did a dd in resolveRecord after taking the required selections out of the getColumns, that returned the correct array..
34 replies
FFilament
Created by Wannes on 1/13/2024 in #❓┊help
Field is required CSV Importer
Same issue here, did you have any luck fixing this?
34 replies
FFilament
Created by dasK_ on 2/3/2024 in #❓┊help
Filament Page In the Wrong Panel?
Figured it out, I was trying to use Laravel routes in web.php, Filament only works properly with
protected static ?string $slug = 'top-up/{orderNumber}';
protected static bool $shouldRegisterNavigation = false;
protected static ?string $slug = 'top-up/{orderNumber}';
protected static bool $shouldRegisterNavigation = false;
5 replies
FFilament
Created by dasK_ on 2/3/2024 in #❓┊help
Filament Page In the Wrong Panel?
I also do have another page called TopUp in the admin panel, but I completely renamed the userPanel one, still the same outcome, and to the best of my knowledge.. it should work as I'm doing the same thing for my order page
5 replies
FFilament
Created by dasK_ on 2/3/2024 in #❓┊help
Filament Page In the Wrong Panel?
I've put a Log::info('UserPanel route: ' . config('your.config.route')); in the mount, and I get the expected output [2024-02-03 05:21:01] local.INFO: UserPanel route:
5 replies