mohdaftab
mohdaftab
FFilament
Created by mohdaftab on 7/5/2024 in #❓┊help
Spatie Roles and Permissions package with Multi-Tenancy
No description
30 replies
FFilament
Created by mohdaftab on 4/12/2024 in #❓┊help
Hello, how do I make Relation Manager form use full width of the page please?
Hello, I am using Relation Manager to add records. I need to display the form modal in full width, please let me know how do I do that? Thank you
4 replies
FFilament
Created by mohdaftab on 2/27/2024 in #❓┊help
ReplicateAction with uniqid() as slug giving error
Hello, I have extended my Page model and PageResource to add is_published and a few other custom fields. I have also added globalscope to not display pages with is_published = 0 for non authenticated users. My client asked me to add a ReplicateAction but since each page has a slug so I had to use beforeReplicaSaved to create uniqid() as slug and it creates the new page with all the details but when it redirects to edit page it gives me this error "Undefined array key 21" whereas 21 is the auto-increment id. Below is the code I am using in table actions. Please let me know how do I fix this? Thank you ReplicateAction::make() ->beforeReplicaSaved(function (Model $replica): void { $replica->slug = uniqid(); $replica->is_published = 0; }) ->successRedirectUrl(function (Model $replica) { return route('filament.dashboard.resources.pages.edit', $replica->id); }),
5 replies
FFilament
Created by mohdaftab on 2/6/2024 in #❓┊help
FileUpload imageEditor replace instead of adding v1, v2 to the file
Hello, I am uploading images using FileUpload and I have added the imageEditor option and it works great but it automatically adds -v1 -v2 to the filenames created by the editor. I would like to ask if it is possible to replace the existing file instead of creating the new one? Thank you
17 replies
FFilament
Created by mohdaftab on 2/6/2024 in #❓┊help
BelongsToMany TextColumn first_name last_name searchable
No description
7 replies
FFilament
Created by mohdaftab on 2/1/2024 in #❓┊help
Fileupload directory on create
Hello, I am using Fileupload to upload property listing gallery images but I need to upload the images inside the listings/{id} folder but as the record is not created yet then I don't have the id to move the files to. Please let me know if there is any tip or trick to make it work on create? Thank you
4 replies
FFilament
Created by mohdaftab on 1/9/2024 in #❓┊help
How to use FilamentPHP Fabricator Route on custom Livewire component?
Hello, Please let me know how do I use FilamentPHP Fabricator Page route inside custom Livewire component please ? like route('page',$page->slug) I have a featured page block where I want to display featured pages (some of them has parent page as well) using livewire component, but I am not able to generate the route link to that page which may or may not have parent in the url. Thank you
4 replies
FFilament
Created by mohdaftab on 1/8/2024 in #❓┊help
Can we render form builder blocks with fabricator blocks
Hello, I am using Filament Fabricator for custom pages and have built a lot of blocks which is working really great. I need to use Fabricator for another set of resources which are totally separate from the Pages but they also require same set of blocks that Pages has. I would really like to know if I can use Fabricator to make this work and how or I have also setup Form Builder to create blocks but I am not able to understand how to make it use the Filament Fabricator page blocks. Please help me figure this out. Thank you so much.
2 replies
FFilament
Created by mohdaftab on 1/2/2024 in #❓┊help
how to access public variable in getEloquentQuery
No description
21 replies
FFilament
Created by mohdaftab on 12/29/2023 in #❓┊help
Table searchable isIndividual with drop down values
Hello, I am using a Textcolumn which has boolean values and I would like to make it searchable using isIndividual but instead of typing the search value in text input I need it to be a drop down please, Please let me know how do make it display drop down? ->searchable(isIndividual: true) Thank you so much
4 replies
FFilament
Created by mohdaftab on 12/27/2023 in #❓┊help
How do I make EditProfile.php use more width please?
I am using custom editprofile.php with Filament panel. The EditProfile page is using small width, Please let me know how do I increase the width of that form please. Thank you
8 replies
FFilament
Created by mohdaftab on 12/6/2023 in #❓┊help
How to prevent select option to be changed using inspect element
Hello, I am using 3 roles in my project (super-admin, admin, editor) I have a custom config file which has these 3 roles and I can access them using config('custom.roles') The user permissions to add new users are like this super-admin can add admin and editor admin can only add editor editor has no access to add any user my question is that I have a select option which loads options from config('custom.roles') and it shows all 3 roles when super-admin or admin is adding a user, I have changed it conditionally to load only the roles that these users can add but the main issue is when I am logged in as admin and inspect element to edit the select options and change the value to super-admin it lets me add super-admin using the admin role. Please let me know how do I make this secure so the user can only add the roles that they are permitted to. Thank you so much.
5 replies
FFilament
Created by mohdaftab on 11/26/2023 in #❓┊help
How do I prevent inactive/suspended users from logging in to dashboard?
Hello, I have a column status which takes 3 values active, inactive, suspended. I would like to only let users login which have status = 'active'. Please let me know how do I make it work? Thank you
21 replies
FFilament
Created by mohdaftab on 11/26/2023 in #❓┊help
Send Email Verification to user
Hello, How do I prevent unverified email login to the Panel please and prompt them for verifying email address please? I used this in User Model public function canAccessPanel(Panel $panel): bool { return true && $this->hasVerifiedEmail(); } also using ->emailVerification() with $panel in AdminPanelProvider it doesn't let users login and says "These credentials do not match our records." I need this to prompt them from verifying email address or send the verification email without the prompt and show the message please verify your email address instead of "These credentials do not match our records." Thank you
8 replies
FFilament
Created by mohdaftab on 11/18/2023 in #❓┊help
Table, Sort, Edit and Add button all responding really slow on the server
Hello, I am using FilamentPHP V3 and facing slowness issues on the server even with very simple table and a few records. It is comparatively fast on local server. Please watch the video to see the response. Please let me know how to diagnose what is causing the issue on the server. The front-end is really working fast. The server is shared hosting from namecheap.com and memory is 1GB only. Thank you
22 replies
FFilament
Created by mohdaftab on 11/15/2023 in #❓┊help
Select preload multiple populating values again when I click on x on multiple items
No description
73 replies
FFilament
Created by mohdaftab on 11/10/2023 in #❓┊help
How to make FilamentPHP faster
Hello, I am using FilamentPHP on a few of my projects and I kind of feel that V2 is much faster than V3. I am facing issues with slow sorting on table which uses a few sum and avg queries for each record on the table and also when I click on any action button on the table it takes a few seconds to load the modal for add or edit forms which also uses some relationship drop downs. I am using shared hosting for all my projects and I made a few admin panels with Alpinejs and Livewire which works a lot faster than Filamentphp admin panel. Please let me know what are the best practices to do to make it more user friendly and increase the performance. Thank you
40 replies
FFilament
Created by mohdaftab on 10/30/2023 in #❓┊help
requiresConfirmation with ToggleColumn
No description
2 replies
FFilament
Created by mohdaftab on 8/1/2023 in #❓┊help
Unable to locate a class or view for component [filament-fabricator.layouts.Main]
Hello, I am using Fabricator package with Filament V2 and it works really great on my local, I get this error on production server on the created pages and dashboard works fine. I am using MainLayout as the main layout for the page. Please let me know how do I fix this? Thank you
12 replies