NoxyArg
NoxyArg
FFilament
Created by NoxyArg on 4/18/2024 in #❓┊help
Repeater Duplicate queries when adding new item
Thanks for the answer, I didn't know the existence of eager loading, I looked at the Laravel documents but I don't understand how to apply it in this case, could you give me an example?, thx !
6 replies
FFilament
Created by NoxyArg on 4/7/2024 in #❓┊help
Action form how send data ?
tnx !
11 replies
FFilament
Created by NoxyArg on 4/7/2024 in #❓┊help
Action form how send data ?
excellent thanks !! , Sorry for my ignorance and why is it like this?
11 replies
FFilament
Created by NoxyArg on 4/7/2024 in #❓┊help
Action form how send data ?
for example if selected the first(13) , the dd() show "0" and if selected the second(9) show "1" like the screenshot , I'm sure it's nonsense but I can't figure it out. :squint:
11 replies
FFilament
Created by NoxyArg on 4/7/2024 in #❓┊help
Action form how send data ?
Tnx for the reply ! ,In this case don't have relationship, but there is no problem with that, the problem is that it would not be passing the selected id, it only gives me the position of an array of the ids that are to be selected, I don't see what I'm doing doing wrong :S
11 replies
FFilament
Created by NoxyArg on 4/7/2024 in #❓┊help
Action form how send data ?
bump
11 replies
FFilament
Created by NoxyArg on 2/17/2024 in #❓┊help
Panel custom Url ? like the demo web ?
yeeess thank you so much!! 😄
6 replies
FFilament
Created by NoxyArg on 11/10/2023 in #❓┊help
Group of items inside a group
⬆️
8 replies
FFilament
Created by NoxyArg on 11/10/2023 in #❓┊help
Group of items inside a group
but if move the select inside the repeater here is the problem

Forms\Components\Repeater::make('test')
->schema([


Select::make('kit_id')
->live()
->options(function () {
return Kit::all()->pluck('code', 'id');
})
->afterStateUpdated(
function ($set) {
$actionEJ = [
['category_id' => 2,'article_id' => 3,'article_quantity' => 12],
['category_id' => 3,'article_id' => 5,'article_quantity' => 22],
];
$set('test', $actionEJ ?? null);
}
),


Forms\Components\TextInput::make('category_id'),
Forms\Components\TextInput::make('article_id'),
Forms\Components\TextInput::make('article_quantity'),
]),

Forms\Components\Repeater::make('test')
->schema([


Select::make('kit_id')
->live()
->options(function () {
return Kit::all()->pluck('code', 'id');
})
->afterStateUpdated(
function ($set) {
$actionEJ = [
['category_id' => 2,'article_id' => 3,'article_quantity' => 12],
['category_id' => 3,'article_id' => 5,'article_quantity' => 22],
];
$set('test', $actionEJ ?? null);
}
),


Forms\Components\TextInput::make('category_id'),
Forms\Components\TextInput::make('article_id'),
Forms\Components\TextInput::make('article_quantity'),
]),
Obviously this doesn't do anything, any ideas?
8 replies
FFilament
Created by NoxyArg on 11/10/2023 in #❓┊help
Group of items inside a group
No description
8 replies
FFilament
Created by NoxyArg on 11/10/2023 in #❓┊help
Group of items inside a group
Now I need to insert an item from a repeater, from the outside I can add it fine, but from inside the repeater I don't know how to do it, any ideas? this is my code example:
Select::make('kit_id')
->live()
->options(function () {
return Kit::all()->pluck('code', 'id');
})
->afterStateUpdated(
function ($set) {
$actionEJ = [
['category_id' => 2,'article_id' => 3,'article_quantity' => 12],
['category_id' => 3,'article_id' => 5,'article_quantity' => 22],
];
$set('test', $actionEJ ?? null);
}
),
Forms\Components\Repeater::make('test')
->schema([
Forms\Components\TextInput::make('category_id'),
Forms\Components\TextInput::make('article_id'),
Forms\Components\TextInput::make('article_quantity'),
]),
Select::make('kit_id')
->live()
->options(function () {
return Kit::all()->pluck('code', 'id');
})
->afterStateUpdated(
function ($set) {
$actionEJ = [
['category_id' => 2,'article_id' => 3,'article_quantity' => 12],
['category_id' => 3,'article_id' => 5,'article_quantity' => 22],
];
$set('test', $actionEJ ?? null);
}
),
Forms\Components\Repeater::make('test')
->schema([
Forms\Components\TextInput::make('category_id'),
Forms\Components\TextInput::make('article_id'),
Forms\Components\TextInput::make('article_quantity'),
]),
8 replies
FFilament
Created by NoxyArg on 11/10/2023 in #❓┊help
Group of items inside a group
thanks for the reply 😄
8 replies
FFilament
Created by NoxyArg on 10/14/2023 in #❓┊help
Action on a resource that creates another resource?
I achieve what I wanted, directly inserting the data in the DB ->action(function($record) { DB::table('orders')->insert( array('client_id' => $record->client_id, 'obra' => 'TEST', 'description' => $record->invoice_number, 'article_id' => 2, 'created_by' => auth()->user()->id) ); })
6 replies
FFilament
Created by NoxyArg on 10/14/2023 in #❓┊help
Action on a resource that creates another resource?
In the InvoiceResource i create a action Tables\Actions\Action::make('OrderCreate') ->action(fn ($record) => redirect()->route('filament.admin.resources.orders.create',['invoice_number' => $record->invoice_number, 'client_id' => $record->client_id,'obra' => $record->obra])) And in the OrderResource Forms\Components\TextInput::make('obra') ->default(function(Request $request) { return $request->input('invoice_number'); }) With this I fill the field
6 replies
FFilament
Created by NoxyArg on 10/14/2023 in #❓┊help
Action on a resource that creates another resource?
Thanks for the answer, I'm going to investigate, for now I was able to send the data through the url and by request insert it into the forms, there must be a way to directly create the record without this step
6 replies