Roberto S.
Roberto S.
FFilament
Created by Gush on 9/6/2023 in #❓┊help
Delete confirmation text
On current version is:
->modalHeading('Title Here')
->modalDescription('Text Here')
->modalHeading('Title Here')
->modalDescription('Text Here')
5 replies
FFilament
Created by Roberto S. on 6/26/2024 in #❓┊help
SelectFilter by 2 level relationship
SelectFilter::make('country')
->label(__('Country'))
->options(fn () => Country::pluck('name', 'code')->toArray())
->query(function (Builder $query, array $data) {
if (! empty($data['value'])) {
$query->whereHas(
'place',
fn (Builder $query) => $query->whereHas(
'country',
fn (Builder $query) => $query->where('code', '=', $data['value'])
)

);
}
}),
SelectFilter::make('country')
->label(__('Country'))
->options(fn () => Country::pluck('name', 'code')->toArray())
->query(function (Builder $query, array $data) {
if (! empty($data['value'])) {
$query->whereHas(
'place',
fn (Builder $query) => $query->whereHas(
'country',
fn (Builder $query) => $query->where('code', '=', $data['value'])
)

);
}
}),
24 replies
FFilament
Created by Roberto S. on 6/26/2024 in #❓┊help
SelectFilter by 2 level relationship
This is the code:
24 replies
FFilament
Created by Roberto S. on 6/26/2024 in #❓┊help
SelectFilter by 2 level relationship
Thank you very much for your help! It's working now!
24 replies
FFilament
Created by Roberto S. on 6/26/2024 in #❓┊help
SelectFilter by 2 level relationship
No description
24 replies
FFilament
Created by Roberto S. on 6/26/2024 in #❓┊help
SelectFilter by 2 level relationship
This one throws an error: Filament\Support\Services\RelationshipJoiner::prepareQueryForNoConstraints(): Argument #1 ($relationship) must be of type Illuminate\Database\Eloquent\Relations\Relation, null given, called in /Users/rsv/Herd/my_project/vendor/filament/forms/src/Components/Select.php on line 763
24 replies
FFilament
Created by Roberto S. on 6/26/2024 in #❓┊help
SelectFilter by 2 level relationship
The result without
multiple()
multiple()
is the same
24 replies
FFilament
Created by Roberto S. on 6/26/2024 in #❓┊help
SelectFilter by 2 level relationship
No description
24 replies
FFilament
Created by Roberto S. on 6/26/2024 in #❓┊help
SelectFilter by 2 level relationship
No description
24 replies
FFilament
Created by Roberto S. on 6/26/2024 in #❓┊help
SelectFilter by 2 level relationship
Yes, I do: Vehicle.php
public function place(): BelongsTo
{
return $this->belongsTo(Place::class);
}
public function place(): BelongsTo
{
return $this->belongsTo(Place::class);
}
Place.php
public function country(): BelongsTo
{
return $this->belongsTo(Country::class);
}

public function vehicles(): HasMany
{
return $this->hasMany(Vehicle::class);
}
public function country(): BelongsTo
{
return $this->belongsTo(Country::class);
}

public function vehicles(): HasMany
{
return $this->hasMany(Vehicle::class);
}
Country.php
public function place(): HasMany
{
return $this->hasMany(Place::class);
}
public function place(): HasMany
{
return $this->hasMany(Place::class);
}
24 replies
FFilament
Created by Roberto S. on 6/26/2024 in #❓┊help
SelectFilter by 2 level relationship
I get a SQL error:
SELECT
count(*) AS aggregate
FROM
"vehicles"
WHERE
"status" = PUB
AND ("country" IN (CN))
SELECT
count(*) AS aggregate
FROM
"vehicles"
WHERE
"status" = PUB
AND ("country" IN (CN))
`
24 replies
FFilament
Created by Roberto S. on 6/10/2024 in #❓┊help
Hide and set value don't work simultaneously
Awesome! Thanks a lot. It works great
7 replies
FFilament
Created by Roberto S. on 6/10/2024 in #❓┊help
Hide and set value don't work simultaneously
The error is that if I hide the redeem_id when the redeemer_type is NULL it is not set to NULL. However if I don't hide it the behaviour is correct.
7 replies
FFilament
Created by Roberto S. on 1/10/2024 in #❓┊help
Tailwind colors doesn't work
Thanks!
7 replies
FFilament
Created by Roberto S. on 1/10/2024 in #❓┊help
Tailwind colors doesn't work
Thanks but that not the issue. I think that the problem is that my default tailwind config is not loaded on /admin Filament panel
7 replies