Dimitar Papazov DEV
Change language Only in Admin panel
Hello,
How to change the language only while we are in the /admin?
I need my main app to be in EN, so in my .env
APP_LOCALE=en
, but is there something to add to change the lang only for admin?
Is there a workarount with some hook?2 replies
Action->form() not getting filled when reusing form
Hello,
Having a
Action
on a view page. I want to reuse the form from InvoiceResource
as i did, but i want to force fill it with data from the $record
, but it doesnt get filled. No errors, just doesnt work;
Any ideas on how to handle this?
5 replies
Modify query on AttachAction
Hello,
I have this code, allowing to attach more products with BelongsToMany Relation:
It works, but I want to modify the query when saving, to add the inverse record in the DB, how do your do that ?
Tried
$action->getRecordSelect()->saveRelationshipsUsing
, but since it doesnt have ->relationship
chained it doesnt work.
Is there any way to do this, event if its not trough filament?
Thanks!3 replies
Help, Setting runtime config only for one FileUpload
Hi firends,
Here I have a FileUpload that is setupped to work with S3 pre-signed links and I need to change the livewire's temp dir disk to be one.
So my idea is to have FileUpload component extended and set the config runtime value there:
but how to get it back to the default after components finished rendering/executing so no conflict or overide will happen if I have 1 S3FileUpload field and next to it i have a regular FileUpload?
Any idea how to handle this?
6 replies
Multiple FIleUpload Reorderable
Hey friends, I have little question on how things work.
I have a FileUpload, multiple + reorderable, used a
**saveRelationshipsUsing**
to hook in to the saving part, but when I try to reorder them with **reorderUploadedFilesUsing**
, it seems that its tries to go through this method (saveRelationshipsUsing
) again after reorder and it removes the uploaded files from the filepond component visualy (after save), but after refresh they are still there. Also they don't appear to be sorted properly.
How to prevent the files to disapear and how to force the images to come sorted, since the sortBy
is not honored? How can I approach this?
Here is my code:
6 replies
Repeater custom input names based on if it is relationship or currently added
Hello,
I have a FormBuilder/Repeater with some fields in it with custom
name
attributes to be able to be submited with the page. I set the input name with ->extraInputAttributes(['name' => 'promotions[promo_from]'])
.
How can I check if current Repeater iteration its comming from existing relation(is existing record) and to change the input name
to use the relation id as key as follows:
Repeater (relation: promotions)
.. then on click of the repeater "add new" button, the keys of the names to be sequential
Currently I have the following schema for a filament form
10 replies
How to set inputs "[name]" attribute to bahave like regular input field
Hi, I'm new to filament form builder, but I have search for this a lot, and didnt found anything.
I want to use Filament FormBulder on parts of my page, but the problem is that the Components dont have
name
attributes and I cant do a global submit of both livewire components and normal blade components in my page.
Is there a easy way (and how to do it) of setting the name
attribute to each form(livewire) component to act like a normal blade/html component and when you hit a global save button to have the livewire's values available in the request global.
Example with given form and what I expect to happen with mixed livewire/filament component and regular inputs:
15 replies