Abdur Razzaque
Abdur Razzaque
FFilament
Created by Abdur Razzaque on 8/20/2024 in #❓┊help
Prebuilt Import Action from Excel | TypeError: Cannot read properties of null
I know that, somewhere I do mistake. That's why the phone showing null. I have to find the error and I don't know how to do this.
15 replies
FFilament
Created by Abdur Razzaque on 8/20/2024 in #❓┊help
Prebuilt Import Action from Excel | TypeError: Cannot read properties of null
I'm not understanding, how can I dump the data from uploaded CSV file. Because the error coming from file uploaded. If the header of csv file can be read, why the data is empty?
15 replies
FFilament
Created by Abdur Razzaque on 8/20/2024 in #❓┊help
Prebuilt Import Action from Excel | TypeError: Cannot read properties of null
Not only phone. After uploading the CSV file, all data shows null. Only header can be read.
15 replies
FFilament
Created by Abdur Razzaque on 8/20/2024 in #❓┊help
Prebuilt Import Action from Excel | TypeError: Cannot read properties of null
I don't understand, what are you talking about?
// Member.php Model
class Member extends Authenticatable
{
use HasFactory, Notifiable;
protected $guard = 'member';
protected $fillable = [
'username',
'phone',
'email',
'password',
// have more field
]
}
// Member.php Model
class Member extends Authenticatable
{
use HasFactory, Notifiable;
protected $guard = 'member';
protected $fillable = [
'username',
'phone',
'email',
'password',
// have more field
]
}
15 replies
FFilament
Created by Abdur Razzaque on 8/20/2024 in #❓┊help
Prebuilt Import Action from Excel | TypeError: Cannot read properties of null
Ofcourse, here it is...
public static function getColumns(): array
{
return [
ImportColumn::make('certified_members_name_english')
->label('Name in English')
->rules(['max:255']),
ImportColumn::make('phone')
->requiredMapping()
->rules(['required', 'max:255']),
ImportColumn::make('password')
->requiredMapping()
->rules(['max:100']),
ImportColumn::make('ssc_school_name')
->label('School Name')
->rules(['max:255']),
ImportColumn::make('district_of_school')
->label('District of School')
->rules(['max:255']),
];
}

public function resolveRecord(): ?Member
{
// return Member::firstOrNew([
// // Update existing records, matching them by `$this->data['column_name']`
// 'phone' => $this->data['phone'],
// ]);

return new Member();
}

public static function getCompletedNotificationBody(Import $import): string
{
$body = 'Your member import has completed and ' . number_format($import->successful_rows) . ' ' . str('row')->plural($import->successful_rows) . ' imported.';

if ($failedRowsCount = $import->getFailedRowsCount()) {
$body .= ' ' . number_format($failedRowsCount) . ' ' . str('row')->plural($failedRowsCount) . ' failed to import.';
}

return $body;
}
public static function getColumns(): array
{
return [
ImportColumn::make('certified_members_name_english')
->label('Name in English')
->rules(['max:255']),
ImportColumn::make('phone')
->requiredMapping()
->rules(['required', 'max:255']),
ImportColumn::make('password')
->requiredMapping()
->rules(['max:100']),
ImportColumn::make('ssc_school_name')
->label('School Name')
->rules(['max:255']),
ImportColumn::make('district_of_school')
->label('District of School')
->rules(['max:255']),
];
}

public function resolveRecord(): ?Member
{
// return Member::firstOrNew([
// // Update existing records, matching them by `$this->data['column_name']`
// 'phone' => $this->data['phone'],
// ]);

return new Member();
}

public static function getCompletedNotificationBody(Import $import): string
{
$body = 'Your member import has completed and ' . number_format($import->successful_rows) . ' ' . str('row')->plural($import->successful_rows) . ' imported.';

if ($failedRowsCount = $import->getFailedRowsCount()) {
$body .= ' ' . number_format($failedRowsCount) . ' ' . str('row')->plural($failedRowsCount) . ' failed to import.';
}

return $body;
}
15 replies
FFilament
Created by Abdur Razzaque on 8/20/2024 in #❓┊help
Prebuilt Import Action from Excel | TypeError: Cannot read properties of null
No description
15 replies
FFilament
Created by Abdur Razzaque on 8/20/2024 in #❓┊help
Prebuilt Import Action from Excel | TypeError: Cannot read properties of null
No, I don't have something like this. I follow this filament instruction to import data from CSV file. https://filamentphp.com/docs/3.x/actions/prebuilt-actions/import#using-import-options
15 replies
FFilament
Created by Abdur Razzaque on 5/21/2024 in #❓┊help
Password Hash should be Hidden on form
Thank you ♥️
12 replies
FFilament
Created by Abdur Razzaque on 5/21/2024 in #❓┊help
Password Hash should be Hidden on form
So if I add again the hidden on model and if I take the password filed empty to take the older password, maybe it will be right thing. Am I right?
12 replies
FFilament
Created by Abdur Razzaque on 5/21/2024 in #❓┊help
Password Hash should be Hidden on form
This now showing the encrypted hash. It should be show the correct password. I mean decrypted hash password.
12 replies
FFilament
Created by Abdur Razzaque on 5/21/2024 in #❓┊help
Password Hash should be Hidden on form
Yes! Without removing, it's not showing the form.
12 replies
FFilament
Created by Noor on 12/19/2023 in #❓┊help
Colors
I'm sorry, I never required this type customization. I think you can check to core concept from documentation to find the avaible class to filament.
125 replies
FFilament
Created by Noor on 12/19/2023 in #❓┊help
Colors
$panel ->colors([ 'primary' => '#6366f1', ]) $panel ->colors([ 'primary' => 'rgb(99, 102, 241)', ])
125 replies
FFilament
Created by Noor on 12/19/2023 in #❓┊help
Colors
You can use any different colors on here.
125 replies
FFilament
Created by Noor on 12/19/2023 in #❓┊help
Colors
I'm pretty sure that, you're doing something that not required. This code can change the all the colors of filament theme. Where don't need to find the exact class. or any custom theme.
use Filament\Panel;
use Filament\Support\Colors\Color;

public function panel(Panel $panel): Panel
{
return $panel
// ...
->colors([
'danger' => Color::Rose,
'gray' => Color::Gray,
'info' => Color::Blue,
'primary' => Color::Indigo,
'success' => Color::Emerald,
'warning' => Color::Orange,
]);
}
use Filament\Panel;
use Filament\Support\Colors\Color;

public function panel(Panel $panel): Panel
{
return $panel
// ...
->colors([
'danger' => Color::Rose,
'gray' => Color::Gray,
'info' => Color::Blue,
'primary' => Color::Indigo,
'success' => Color::Emerald,
'warning' => Color::Orange,
]);
}
125 replies
FFilament
Created by Noor on 12/19/2023 in #❓┊help
Colors
Your question isn't clear. Are you finding the color code? or How to use the color to your theme??
125 replies
FFilament
Created by Noor on 12/19/2023 in #❓┊help
Colors
Oh! so you are making a custom theme.
125 replies
FFilament
Created by Noor on 12/19/2023 in #❓┊help
Colors
This documentation helps me to change the theme: https://filamentphp.com/docs/3.x/panels/themes
125 replies
FFilament
Created by Noor on 12/19/2023 in #❓┊help
Colors
I don't know, why do you need this type of edit. But the filament recommendation to use the filament theme. Also I don't have the idea, where do you find the theme.css.
125 replies
FFilament
Created by Noor on 12/19/2023 in #❓┊help
Colors
Where do you use the class?
125 replies