Ander
Does not install filament package
When I update the filament package, it shows me this error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires filament/upgrade ^3.1, it is satisfiable by filament/upgrade[v3.1.0-alpha1, ..., 3.x-dev] from composer repo (https://repo.packagist.org) but filament/upgrade[dev-main] from path repo (filament/packages/*) has higher repository priority. The packages from the higher priority repository do not match your constraint and are therefore not installable. That repository is canonical so the lower priority repo's packages are not installable. See https://getcomposer.org/repoprio for details and assistance.
Follow these steps: https://github.com/filamentphp/filament/tree/3.x?tab=readme-ov-file#contributing
3 replies
Wizard still showing "Next" when steps hidden dynamically
I'm trying to hide a step depending on the variable 'applies_to_all_employees,' the step hides, but the 'next' button doesn't change to 'create.' In version 2 of filament, this did work.
2 replies
hasone relations and belong to
I am trying to use 2 relations in a resource, the model is "employee", through this I am making the first relation
to get to the "EmployeeAddress" table, the relationship is hasOne, data: 'employee_id','address_id', 'start_date', 'end_date', the second is to get
to the "Address" table, the relationship is belongs to, data: 'street_1', 'street_2', 'city', 'state', 'postal code'.
but when saving all the data it returns this error: SQLSTATE[42S22]: Column not found: 1054 Unknown column '' in 'where clause'
but it is supposed that when the relation is there it returns the id, isn't it?
3 replies
get element of array, not index
How can I get the element of the index of the array of a select. The $state only returns the index of the array but I also need the element . For example, the values are: [
'A' => 'Example 1',
'B' => 'Example 2'
].
I want to get "Example 1", but I don't want to modify 'A', otherwise I would put something like 'Example 1' => 'Example 1'.
4 replies
select will not open createOptionForm modal
Inside a custom page of a resource, I call a Livewire view, where I have a form, but the select modal doesn't open, but if I use a form on the page, it opens.
<x-filament::page>
{{$this->form}}
@livewire('form-pay-schedule')
</x-filament::page>
Does anyone know why this happens?
5 replies
Form Select - how can I interact with the newly created record after creation?
When creating an option from a Select field, how can I interact with the newly created record after creation? or some way that I can create it my way instead of saving automatically
Forms\Components\Select::make('user_id')
->relationship('user', 'name')
->searchable()
->createOptionForm([
Forms\Components\TextInput::make('name')
->label(('Nombre'))
->required(),
Forms\Components\TextInput::make('email')
->label(('Email'))
->required()
->email()
])
->createOptionAction(function (Forms\Components\Actions\Action $action) {
return $action
->modalHeading('new user')
->modalButton('create')
->modalWidth('lg');
})->after(function () use ($record) {
$table = TableTest::([
"id_user" => $record->id;
])
});
})
3 replies
Not recognized more than one rule
This is my code:
what I'm trying to do is create different rules depending on what the user chooses in the select. It only works for me if I use one rule, when I use more than one it returns this error: "The given value "7|min:1" does not represent a valid number."
6 replies