Sidem
Sidem
FFilament
Created by Sidem on 8/18/2024 in #❓┊help
livewire action
do you have some references ?
5 replies
FFilament
Created by Sidem on 6/10/2024 in #❓┊help
select didn't return id
but i will try
18 replies
FFilament
Created by Sidem on 6/10/2024 in #❓┊help
select didn't return id
that why i use {$value]
18 replies
FFilament
Created by Sidem on 6/10/2024 in #❓┊help
select didn't return id
i need to generate x select depends of a variable
18 replies
FFilament
Created by Sidem on 6/10/2024 in #❓┊help
select didn't return id
and in my ProductResource/pages/createProduct.php i put the
protected function beforeCreate(): void
{
dd($this->data);
}
protected function beforeCreate(): void
{
dd($this->data);
}
18 replies
FFilament
Created by Sidem on 6/10/2024 in #❓┊help
select didn't return id
Select::make("products.type_{$value}[]")
->options(
TypeProducts::all()->pluck('name', 'id')->toArray()
)
->multiple()
->searchable()
->columnSpan(2),

TextInput::make("products.name_{$value}")
->required()
->columnSpan(2),

TextInput::make("products.value_{$value}")
->integer()
->minValue(1)
->required()
->columnSpan(2)
Select::make("products.type_{$value}[]")
->options(
TypeProducts::all()->pluck('name', 'id')->toArray()
)
->multiple()
->searchable()
->columnSpan(2),

TextInput::make("products.name_{$value}")
->required()
->columnSpan(2),

TextInput::make("products.value_{$value}")
->integer()
->minValue(1)
->required()
->columnSpan(2)
18 replies
FFilament
Created by Sidem on 6/10/2024 in #❓┊help
select didn't return id
No description
18 replies
FFilament
Created by Sidem on 6/10/2024 in #❓┊help
select didn't return id
in my model, in the function create()
18 replies
FFilament
Created by Sidem on 6/10/2024 in #❓┊help
select didn't return id
same if i remove the [] :
php Select::make("products.type_{$value}")
php Select::make("products.type_{$value}")
18 replies
FFilament
Created by Sidem on 6/10/2024 in #❓┊help
select didn't return id
after updated my code :
Select::make("products.type_{$value}[]")
->label("Product type {$value}")
->options(
TypeProduct::all()->pluck('name', 'id')->toArray()
)
->multiple()
->searchable()
->columnSpan(2),
Select::make("products.type_{$value}[]")
->label("Product type {$value}")
->options(
TypeProduct::all()->pluck('name', 'id')->toArray()
)
->multiple()
->searchable()
->columnSpan(2),
i have the same error
18 replies
FFilament
Created by Sidem on 6/10/2024 in #❓┊help
select didn't return id
nop it's in my Product Resource.php, in a Grid
18 replies
FFilament
Created by Sidem on 5/15/2024 in #❓┊help
wizard with many steps
no in the end I deleted a step from my form and the problem is solved
6 replies
FFilament
Created by Sidem on 5/15/2024 in #❓┊help
Select does not record the data
public static function create($data){
Log::debug('Data received in request:', request()->all());
dd($data);
}
public static function create($data){
Log::debug('Data received in request:', request()->all());
dd($data);
}
7 replies
FFilament
Created by Sidem on 5/15/2024 in #❓┊help
Select does not record the data
for information I customized the way I create my objects so I have a create method in my model which currently takes care of:
7 replies
FFilament
Created by Sidem on 5/15/2024 in #❓┊help
Select does not record the data
I moved forward and saw that it appears in the logs when I delete all the caches, I restart the application and displaying not $data but $request()->all()
7 replies
FFilament
Created by Sidem on 5/15/2024 in #❓┊help
Select does not record the data
I just wanted to test the field
7 replies
FFilament
Created by Sidem on 5/15/2024 in #❓┊help
align input
Here is my code :
Wizard\Step::make('products')
->schema([
TextInput::make('number_products')
->label('numbers of products')
->integer()
->minValue(1)
->live()
->afterStateUpdated(function ($state, $set) {
$set('numbers_of_products', range(0, $state - 1));
}),

Grid::make(2)
->schema(function (Get $get) {
$products = $get('numbers_of_products') ?? [];
$allInputs = [];

foreach ($products as $index => $product) {
$Inputs = Grid::make(1)->schema([
Select::make("type_of_products_{$index}")
->label("my first label")
->multiple()
->searchable()
->preload()
->relationship('type_of_products', 'name_of_products', fn (Builder $query) => $query->orderBy('name_of_products', 'asc'))
->required()
->columnSpan(1),

TextInput::make("name_of_products_{$index}")
->label("the second label with big test : larem ipsum dolor sit amet, consectetur adipiscing elit. Nulla nec purus euismod, fermentum nunc nec, tincidunt nisl")
->required()
->columnSpan(1),

TextInput::make("product_quantite_{$index}")
->label("last label")
->integer()
->minValue(1)
->required()
->columnSpan(1)
]);

$allFields[] = Grid::make(3)->schema($Inputs);
}

return $allInputs;
})
->key('dynamicTypeFields'),

]),
Wizard\Step::make('products')
->schema([
TextInput::make('number_products')
->label('numbers of products')
->integer()
->minValue(1)
->live()
->afterStateUpdated(function ($state, $set) {
$set('numbers_of_products', range(0, $state - 1));
}),

Grid::make(2)
->schema(function (Get $get) {
$products = $get('numbers_of_products') ?? [];
$allInputs = [];

foreach ($products as $index => $product) {
$Inputs = Grid::make(1)->schema([
Select::make("type_of_products_{$index}")
->label("my first label")
->multiple()
->searchable()
->preload()
->relationship('type_of_products', 'name_of_products', fn (Builder $query) => $query->orderBy('name_of_products', 'asc'))
->required()
->columnSpan(1),

TextInput::make("name_of_products_{$index}")
->label("the second label with big test : larem ipsum dolor sit amet, consectetur adipiscing elit. Nulla nec purus euismod, fermentum nunc nec, tincidunt nisl")
->required()
->columnSpan(1),

TextInput::make("product_quantite_{$index}")
->label("last label")
->integer()
->minValue(1)
->required()
->columnSpan(1)
]);

$allFields[] = Grid::make(3)->schema($Inputs);
}

return $allInputs;
})
->key('dynamicTypeFields'),

]),
4 replies
FFilament
Created by Sidem on 5/15/2024 in #❓┊help
wizard with many steps
ok i will check thanks 🙂
6 replies
FFilament
Created by Sidem on 5/10/2024 in #❓┊help
update defaultItems repeater with an other fields
Maybe i can use this : https://filamentphp.com/docs/3.x/forms/advanced#dependant-select-options but i didn't find how to do it
3 replies
FFilament
Created by Sidem on 4/4/2024 in #❓┊help
diplay columnspan
No description
4 replies