Dimitar Papazov DEV
Custom Column Clickable - Prevent
Maybe try this https://filamentphp.com/docs/3.x/tables/advanced#record-urls-clickable-rows
or https://github.com/filamentphp/filament/discussions/8142#discussioncomment-6846440
6 replies
CSS not working after fresh install of filament
How is your vite file looking? Maybe there is a miss.
also try runing
sail npm run dev
to start the watcher and it should work. If you would like to run without the watcher, you should run the sail npm run build
to create the files. (you can omit the "sail" if you dont use it)25 replies
Interact with Pivot attributes in Relation Manager
You should probably add it to the table with
->wtih('userHasDepartments')
and modify the query like so:
https://filamentphp.com/docs/3.x/tables/filters/getting-started#modifying-the-base-query
Also look at this: https://filamentphp.com/docs/3.x/panels/resources/relation-managers#editing-with-pivot-attributes4 replies
ViewAction::Make() in users list to show transactions of a user
Please provice code sample, until then, hop on the docs and try this:
Create a view page for each transaction: https://filamentphp.com/docs/3.x/panels/resources/viewing-records#adding-a-view-page-to-an-existing-resource
and also add the view action in the table: https://filamentphp.com/docs/3.x/panels/resources/viewing-records#adding-a-view-page-to-an-existing-resource
11 replies
Fileupload
Create a custom disk https://imnhasan.medium.com/laravel-storage-link-up-and-create-disk-b1386d455b7b
25 replies
Popup Model With Multi-Step Form
Looks like a Wizard in a modal? https://filamentphp.com/docs/3.x/forms/layout/wizard
5 replies
Custom action before EditRecord
Please show a code sample so we can get idea where and what are you want.
For now, here is an example on how to show modal on some action: https://filamentphp.com/docs/3.x/actions/modals#modal-forms
3 replies
If a relationship is hidden on a resource form does filament still try to submit it?
You can try to
dd
the subitted data and check whats passing. Just add the method mutateFormDataBeforeCreate
in the Create** in the resource folder.
```php
// in Create(resource name).php EXAMPLE: CreatePage.php
protected function mutateFormDataBeforeCreate(array $data): array
{
dd($data);
}
```
You can check if is null and remove it from the data. Same can be done for Edit.4 replies
Get the active tenant id
Is your "tenant" a Company? If it is you can get the current tenant :
$tenant = Filament::getTenant();
Ref: https://filamentphp.com/docs/3.x/panels/tenancy#accessing-the-current-tenant
or if tenant has nothing to do with the company, and you need the logged user's company, you should be able to get it like this: auth()->user()->companies()->first()
or apply a scope to filter the current one.3 replies
Attached user to a tenant
Can you provide the UserResource code here, so we can see? Basicly you have to have a company relationship in the User model and on the call it like this:
Select::make('company')->relationship('company','name')
5 replies
Modify query on AttachAction
Solved! After many hours and tests, figure it out.
Refrence: https://filamentphp.com/docs/2.x/admin/resources/relation-managers#customizing-the-saving-process
Solution:
3 replies