Roberto S.
Roberto S.
FFilament
Created by Jpac14 on 8/22/2024 in #❓┊help
How can I pass a URL to Widget on panel initialisation?
This error typically occurs when Filament cannot find the correct panel configuration. We need to specify the panel to which the resource belongs. In Filament 3, each resource belongs to a specific panel. In my case I use something like this:
CompanyResource::getUrl('edit', ['record' => 1], panel: 'management');
CompanyResource::getUrl('edit', ['record' => 1], panel: 'management');
Or you can do this too:
$route = Filament::getPanel('management')->getUrl(CompanyResource::class, 'edit', ['record' => 1]);
$route = Filament::getPanel('management')->getUrl(CompanyResource::class, 'edit', ['record' => 1]);
6 replies
FFilament
Created by Expecto Patronum on 11/5/2024 in #❓┊help
Form Component : Size avatar in Fileupload
You have to do two things to change the size, the first is to change the size of the field container like this:
FileUpload::make('avatar')
->avatar()
->extraAttributes([
'style' => 'width: 500px; height: 500px;'
]),
FileUpload::make('avatar')
->avatar()
->extraAttributes([
'style' => 'width: 500px; height: 500px;'
]),
Then you need to add this CSS to your Filament theme:
.filepond--root {
width: 500px !important;
height: 500px !important;
}
.filepond--root {
width: 500px !important;
height: 500px !important;
}
5 replies
FFilament
Created by Roberto S. on 10/22/2024 in #❓┊help
Add Action to Select modal create and update
Great! Thanks Leandro!
8 replies
FFilament
Created by Roberto S. on 10/22/2024 in #❓┊help
Add Action to Select modal create and update
Thanks Matthew, I had already read that documentation but my problem is that in the Select I can't add the registerModalActions(). I don't know if there is a way to do it from this field.
8 replies
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