Yasser
Yasser
FFilament
Created by Laurens on 3/5/2024 in #❓┊help
Disable resource form while editing but enable relation managers?
Bump. I've also used disabled for this as well. Then I would use a policy as a conditional lfor the form to be disabled.... Trickling down this would conflict with Filemanet inheriting the policies, So I add a custom policy functtion canManageModelFields, canManageModelRelationShips, then the user is allowed to edit the title, yet not the addresses (relation), but tthey are allowed to edit the 'links' relationship.... Sorry for the typos.... It's Friday and I had to deploy today 🙂 To summarize my question on this: Do you have any tips on solving granular customisation through polices in filament (so the rest of my app can follow )? Kind Regards, Y .
6 replies
FFilament
Created by Yasser on 4/13/2023 in #❓┊help
Column Not Found SQL ERROR
this is Laravel relationships and not filament related. Your screenshots suggest you have a hasOne->contact relation ship and you are assigning an array of contact_ids which suggest you are implementing an hasMany->contacts
17 replies
FFilament
Created by Yasser on 12/20/2023 in #❓┊help
Disable Validation for other locales
Solved by setting all empty data to the english data for every Locale in the beforeValidate hook, just seems a nuke for this tough (wish I could ignore validation on specific forms)
3 replies
FFilament
Created by Gehts on 10/8/2023 in #❓┊help
display of the contributions of the logged in user
@Gehts That is handled by Laravel Policies -> https://laravel.com/docs/10.x/authorization#creating-policies Filament just respects the policies
For authorization, Filament will observe any model policies that are registered in your app.
For authorization, Filament will observe any model policies that are registered in your app.
3 replies
FFilament
Created by Roberto on 9/24/2023 in #❓┊help
How to make first column sticky?
Have you tried @awcodes https://github.com/awcodes/filament-sticky-header ? He's pretty active on this Discord, and quite familiar with filament. Here's the filamentphp plugin page: https://v2.filamentphp.com/plugins/sticky-headers If the package does not work as you like, you can easely use it as a core, Find this element : "fi-ta-table " <- your table, find the thead child of the table, make it sticky using javascript. Here's the documentation on enabling your javascript within filament: https://filamentphp.com/docs/3.x/support/assets#registering-javascript-files If you for some reason need some more CSS you can find the docs on the same pagem Good luck!
4 replies
FFilament
Created by Yasser on 4/13/2023 in #❓┊help
Column Not Found SQL ERROR
Thanks for your input! I'll make the extra relationship then I guess 🙂
17 replies
FFilament
Created by Yasser on 4/13/2023 in #❓┊help
Column Not Found SQL ERROR
--- Should I fix this by relating an answer to a venue with a foregin id as well ?
17 replies
FFilament
Created by Yasser on 4/13/2023 in #❓┊help
Column Not Found SQL ERROR
TextColumn::make('question.venue.name')
->label(__('venue.Venue'))
->sortable()
->searchable(),
TextColumn::make('question.venue.name')
->label(__('venue.Venue'))
->sortable()
->searchable(),
This is how I have my column set --- the Answer belongs to a single question
public function question(): BelongsTo
{
return $this->belongsTo(Question::class);
}
public function question(): BelongsTo
{
return $this->belongsTo(Question::class);
}
And a question belongsTo a single Venue
public function venue(): BelongsTo
{
return $this->belongsTo(Venue::class);
}
public function venue(): BelongsTo
{
return $this->belongsTo(Venue::class);
}
Tough a Question also has Many answers
public function answers():HasMany{
return $this->hasMany(Answer::class);
}
public function answers():HasMany{
return $this->hasMany(Answer::class);
}
17 replies
FFilament
Created by Yasser on 4/13/2023 in #❓┊help
Column Not Found SQL ERROR
Where can I find the Query with the join that gets fired ?
17 replies
FFilament
Created by BKF Dev on 3/8/2023 in #❓┊help
Check if dark mode is enabled
I really suggest you do read the documentation tough:
When the user toggles between dark or light mode, a browser event called dark-mode-toggled is dispatched. You can listen to it:
When the user toggles between dark or light mode, a browser event called dark-mode-toggled is dispatched. You can listen to it:
<div
x-data="{ mode: 'light' }"
x-on:dark-mode-toggled.window="mode = $event.detail"
>
<span x-show="mode === 'light'">
Light mode
</span>

<span x-show="mode === 'dark'">
Dark mode
</span>
</div>
<div
x-data="{ mode: 'light' }"
x-on:dark-mode-toggled.window="mode = $event.detail"
>
<span x-show="mode === 'light'">
Light mode
</span>

<span x-show="mode === 'dark'">
Dark mode
</span>
</div>
https://filamentphp.com/docs/2.x/admin/appearance#changing-the-brand-logo It's all there .... Further down you'll be told how you can extend the filament theme with your own css
21 replies
FFilament
Created by BKF Dev on 3/8/2023 in #❓┊help
Check if dark mode is enabled
Filament does not use pink as far as I found. Try adding a Div with classes:”h-20 2-20 bg-pink-600”. If you can’t see it and your watcher is running (npm dev) I suggest you go over the documentation on theming until any custom css works. (Aka the div shows up)
21 replies
FFilament
Created by Laurens on 3/13/2023 in #❓┊help
Translate builder field content inside repeater field
Bump
4 replies
FFilament
Created by johncarter on 3/10/2023 in #❓┊help
Reposition default page buttons
You render your own view, you don't use filament's actions and you add your own buttons within the form tags of the view
13 replies
FFilament
Created by Yasser on 3/7/2023 in #❓┊help
Sending Notifications On a Filament Page
Got a solution if anyone is keeping up with this, I checked the code from filament breezy, thumbs up! if i didnt need breeze itself I wouldve installed it 😄 ->statePath('userData'), Adding this to the profileForm fixes the fill
37 replies
FFilament
Created by BKF Dev on 3/8/2023 in #❓┊help
Check if dark mode is enabled
No problem 🙂
21 replies
FFilament
Created by BKF Dev on 3/8/2023 in #❓┊help
Check if dark mode is enabled
<img src="./logos/light.svg" alt="light mode logo" class="dark:hidden">
<img src="./logos/dark.svg" alt="dark mode logo" class="hidden dark:block">
<img src="./logos/light.svg" alt="light mode logo" class="dark:hidden">
<img src="./logos/dark.svg" alt="dark mode logo" class="hidden dark:block">
21 replies
FFilament
Created by BKF Dev on 3/8/2023 in #❓┊help
Check if dark mode is enabled
if 2 logos ^ toeknee
21 replies
FFilament
Created by BKF Dev on 3/8/2023 in #❓┊help
Check if dark mode is enabled
Is your logo an SVG ? do you want to change the fillcolor with CSS ? or do you have 2 logos ?
21 replies