Hiz
Hiz
FFilament
Created by Nick Ruddra on 6/15/2024 in #❓┊help
product->variants->attributes how to create fields for this
Thank you for still posting the solution! Your solution also worked out for me.
5 replies
FFilament
Created by alexanderkroneis on 9/11/2023 in #❓┊help
Failed Deployment: Class "Mockery" not found
Hi, We have 3 applications running on different servers. "Testing", "Acceptation" and "Production". On our testing server we have in our .env file the following:
APP_NAME=OurApp
APP_ENV=testing
APP_KEY=key
APP_DEBUG=false

# ... other .env stuff
APP_NAME=OurApp
APP_ENV=testing
APP_KEY=key
APP_DEBUG=false

# ... other .env stuff
And I simply renamed "testing" to "test" for APP_ENV
APP_ENV=test

# ... other .env stuff
APP_ENV=test

# ... other .env stuff
This resolved our issue.
9 replies
FFilament
Created by tjodalv on 11/10/2023 in #❓┊help
Bind different model to action form
Maybe you can try this:
//CreateProduct.php

public function createProduct(array $data): void
{
Product::create([
'name' => $data['product_name'],
'type' => $data['product_type_id']
]);
}

protected function getHeaderActions(): array
{
return [
Action::make('newProduct')
->label('Create product')
->action(fn($data) => $this->createProduct($data))
->form([
TextInput::make('product_name')->required(),
Select::make('product_type_id')
->relationship(name: 'type', titleAttribute: 'name')
]),
];
}
//CreateProduct.php

public function createProduct(array $data): void
{
Product::create([
'name' => $data['product_name'],
'type' => $data['product_type_id']
]);
}

protected function getHeaderActions(): array
{
return [
Action::make('newProduct')
->label('Create product')
->action(fn($data) => $this->createProduct($data))
->form([
TextInput::make('product_name')->required(),
Select::make('product_type_id')
->relationship(name: 'type', titleAttribute: 'name')
]),
];
}
11 replies
FFilament
Created by seetakanta on 10/5/2023 in #❓┊help
how you render button without click it
Maybe you could try to add this:
$formFilled = $this->isFormFilled();
$formFilled = $this->isFormFilled();
part a mount() function instead of the getActions()
5 replies
FFilament
Created by alexanderkroneis on 9/11/2023 in #❓┊help
Failed Deployment: Class "Mockery" not found
I just encountered this issue. This is a Livewire 3 specific issue. In the SupportFileUploads.php file, there is a function that checks if the environment your app is running in is a "testing" environment. If this is the case, it will make use of the Mockery class. In our case, we had an environment named "testing" and we just changed it to "test" in our .env, and it ran without any problems.
9 replies
FFilament
Created by Stevee on 8/23/2023 in #❓┊help
V3 clickable row at widget
8 replies
FFilament
Created by Stevee on 8/23/2023 in #❓┊help
V3 clickable row at widget
8 replies
FFilament
Created by Daniel Plomp on 4/3/2023 in #❓┊help
Many-To-Many relation and edit form
My bad for the late response . In the file of your relation manger you can add your actions with a form to your headerActions() function
public static function table(Table $table): Table
{
return $table
->columns([
// Your columns
])
->filters([

])
->headerActions([
Action::make('test')
->action(function (User $record, array $data): void {
$record->author()->associate($data['authorId']);
$record->save();
})
->form([
Forms\Components\TextInput::make('name'),
Forms\Components\Toggle::make('active'),
])
]);

}
public static function table(Table $table): Table
{
return $table
->columns([
// Your columns
])
->filters([

])
->headerActions([
Action::make('test')
->action(function (User $record, array $data): void {
$record->author()->associate($data['authorId']);
$record->save();
})
->form([
Forms\Components\TextInput::make('name'),
Forms\Components\Toggle::make('active'),
])
]);

}
39 replies
FFilament
Created by Daniel Plomp on 4/3/2023 in #❓┊help
Many-To-Many relation and edit form
You can maybe use a table action on the relation manager which shows a custom form within a modal: https://filamentphp.com/docs/2.x/tables/actions#custom-forms And perform your logic of associating the selected records
39 replies