Arshavir
Arshavir
FFilament
Created by Arshavir on 6/20/2024 in #❓┊help
If field is disabled, do not require
Is it true, if field is disabled it would be not required (pass validation)? I have toggle, when toggle is on, field becomes disabled, but still required validation don't let me to pass the field.
40 replies
FFilament
Created by Arshavir on 6/20/2024 in #❓┊help
Toggle on Section Header
Hi everyone, is it possible to put Toggle on Section Header like Action button?
3 replies
FFilament
Created by Arshavir on 5/25/2024 in #❓┊help
Form Wizard with substeps and Infolist items
No description
2 replies
FFilament
Created by Arshavir on 5/21/2024 in #❓┊help
ToggleButtons in RelationManager Attach getting Error "Array to string conversion"
When trying to Attach new item with Pivot getting Array to String Error, with Edit working fine. Here are codes: Models
class Group extends Model
{
use HasFactory, SoftDeletes;

protected $fillable = [
'course_id',
'name',
'type',
];

protected $casts = [
'type' => GroupType::class,
'lecturer_type' => 'array',
];

public function course()
{
return $this->belongsTo(Course::class);
}

public function lecturers()
{
return $this->belongsToMany(Lecturer::class)
->withPivot(['lecturer_type']);
}
}
class Group extends Model
{
use HasFactory, SoftDeletes;

protected $fillable = [
'course_id',
'name',
'type',
];

protected $casts = [
'type' => GroupType::class,
'lecturer_type' => 'array',
];

public function course()
{
return $this->belongsTo(Course::class);
}

public function lecturers()
{
return $this->belongsToMany(Lecturer::class)
->withPivot(['lecturer_type']);
}
}
class Lecturer extends Model
{
use HasFactory, SoftDeletes, HasTranslations;

public $translatable = [
'first_name',
'last_name',
'father_name',
'position'
];

protected $fillable = [
'chair_id',
'first_name',
'last_name',
'father_name',
'position',
'photo',
];

public function chair()
{
return $this->belongsTo(Chair::class);
}

public function groups()
{
return $this->belongsToMany(Group::class)
->withPivot(['lecturer_type']);
}
}
class Lecturer extends Model
{
use HasFactory, SoftDeletes, HasTranslations;

public $translatable = [
'first_name',
'last_name',
'father_name',
'position'
];

protected $fillable = [
'chair_id',
'first_name',
'last_name',
'father_name',
'position',
'photo',
];

public function chair()
{
return $this->belongsTo(Chair::class);
}

public function groups()
{
return $this->belongsToMany(Group::class)
->withPivot(['lecturer_type']);
}
}
18 replies
FFilament
Created by Arshavir on 5/15/2024 in #❓┊help
Many-to-Many relationship - get name from third table
No description
49 replies