Cybrarist
Cybrarist
FFilament
Created by Prosp30 on 1/4/2024 in #❓┊help
When navigating fast on the navbar, sometimes JS breaks
@Prosp30 can you refer me to the issue please
6 replies
FFilament
Created by Cybrarist on 10/24/2023 in #❓┊help
relationship from another database
yea this is what i am doing currently, but it just feels weird since it's natively supported in other places but not in select filter.
3 replies
FFilament
Created by Cybrarist on 6/7/2023 in #❓┊help
Duplicate the row for many to many relationship in Model A List page
so i did the following which didn't work
public function stores()
{
return $this->belongsToMany(Store::class)->using(ProductStore::class)->withTimestamps()->withPivot(['price'])
}
public function stores()
{
return $this->belongsToMany(Store::class)->using(ProductStore::class)->withTimestamps()->withPivot(['price'])
}
also i tried the following which also didn't work
public function product_stores()
{
return $this->hasMany(ProductStore::class);
}
public function product_stores()
{
return $this->hasMany(ProductStore::class);
}
with Tables\Columns\TextColumn ::make('product_services.id') not sure if im missing something, but in both cases they show record1,record2 in the same row
22 replies
FFilament
Created by Cybrarist on 6/7/2023 in #❓┊help
Duplicate the row for many to many relationship in Model A List page
true, i didn't try pivot model method, let me check if it works
22 replies
FFilament
Created by Cybrarist on 6/7/2023 in #❓┊help
Duplicate the row for many to many relationship in Model A List page
but ofc it would've been better to duplicate the row
22 replies
FFilament
Created by Cybrarist on 6/7/2023 in #❓┊help
Duplicate the row for many to many relationship in Model A List page
then i would get product 1 | store 1 | price 1 | store 2 | price 2 ----------------------------
22 replies
FFilament
Created by Cybrarist on 6/7/2023 in #❓┊help
Duplicate the row for many to many relationship in Model A List page

Tables\Columns\TextColumn ::make('stores.name')->formatStateUsing(function ($state){
return Str::of(Str::replace("," , "<br>" , $state))->toHtmlString() ;
}),

Tables\Columns\TextColumn ::make('stores.name')->formatStateUsing(function ($state){
return Str::of(Str::replace("," , "<br>" , $state))->toHtmlString() ;
}),
22 replies
FFilament
Created by Cybrarist on 6/7/2023 in #❓┊help
Duplicate the row for many to many relationship in Model A List page
in the end i ended up doing the following just to make it better
22 replies
FFilament
Created by Cybrarist on 6/7/2023 in #❓┊help
Duplicate the row for many to many relationship in Model A List page
otherwise, the above will show llike this product 1 | store 1 , store 2 | price store 1 , price store 2
22 replies
FFilament
Created by Cybrarist on 6/7/2023 in #❓┊help
Duplicate the row for many to many relationship in Model A List page
usually i shouldn't, but what if i want to following product 1 | Store 1 | price in store 1 | _ product 1 | store 2 | price in store 2 |
22 replies
FFilament
Created by Cybrarist on 6/7/2023 in #❓┊help
Duplicate the row for many to many relationship in Model A List page
i already have many to many relationship and the relationship is displayed like above. no issues with that
22 replies
FFilament
Created by MikePageDev on 6/7/2023 in #❓┊help
Add new parent in select field
but i think it' better to handle it in the backend, otherwise anyone can inspect the html and change the vlaue
10 replies
FFilament
Created by MikePageDev on 6/7/2023 in #❓┊help
Add new parent in select field
you can use ->default
10 replies
FFilament
Created by dyo on 6/5/2023 in #❓┊help
Having Toggle in table header
7 replies
FFilament
Created by Cybrarist on 6/7/2023 in #❓┊help
Duplicate the row for many to many relationship in Model A List page
what i tried to use is to create a custom column and call getrecord to add them manually, it's a workaround that's messy so i just discarded it in the end, but i wonder if there's an easy way to acheive it
22 replies
FFilament
Created by Cybrarist on 6/7/2023 in #❓┊help
Duplicate the row for many to many relationship in Model A List page
replicate will create another record, what i am looking to achieve is the the following, instead of

product 1 | category1,category2|
product 2 | category2|

product 1 | category1,category2|
product 2 | category2|
i want the following

product 1 | category1|
product 1 | category2|
product 2 | category2|

product 1 | category1|
product 1 | category2|
product 2 | category2|
so it's just a matter of displaying
22 replies
FFilament
Created by DianaMujoiu on 6/7/2023 in #❓┊help
Relation manager in custom page
shouldn't you do it through getFormSchema method ?
5 replies
FFilament
Created by K R A T O S on 6/7/2023 in #❓┊help
Hi! How can I alter data before displaying it in the table?
you can use
TextColumn::make('column')->formatStateUsing(function ($record (if u want the whole record) or $state (if u want the value) ) { return $manipulated }),
TextColumn::make('column')->formatStateUsing(function ($record (if u want the whole record) or $state (if u want the value) ) { return $manipulated }),
4 replies
FFilament
Created by Shaung Bhone on 6/6/2023 in #❓┊help
Filament Select Option
why not using enums ?
37 replies