F
Filamentβ€’7mo ago
jepewsykes

get data belongsto relationship showing object object on text input

i have no idea whts going on Section::make('penjualan') ->compact() ->relationship('penjualan') ->schema([ TextInput::make('invoice'), Repeater::make('') ->relationship('items') ->schema([ TextInput::make('barang.nama'), TextInput::make('ppn') ]) ]), public function penjualan(): BelongsTo { return $this->belongsTo(Penjualan::class); }
No description
11 Replies
ericmp
ericmpβ€’7mo ago
TextInput::make('invoice'), to: TextInput::make('invoice.name'), im supposing ur invoice has an attr called name @jepewsykes
jepewsykes
jepewsykesOPβ€’7mo ago
still showing object object bro 😭
ericmp
ericmpβ€’7mo ago
so u mean invoice.name is also an object? πŸ€”
jepewsykes
jepewsykesOPβ€’7mo ago
not invoice its penjualan.invoice see the relation function
ericmp
ericmpβ€’7mo ago
uff not sure now r u sure u can add ->relationship method to a Section? ive never done it
jepewsykes
jepewsykesOPβ€’7mo ago
yes this is the last option i have
jepewsykes
jepewsykesOPβ€’7mo ago
not bad
No description
jepewsykes
jepewsykesOPβ€’7mo ago
using section and placeholder i dont why if using placeholder invoice showed up Thx u Btw
ericmp
ericmpβ€’7mo ago
i tried to help, not sure if i helped xd but wdym with placeholder?
jepewsykes
jepewsykesOPβ€’7mo ago
using placeholder not textinput bro and its still looks good πŸ˜‰
ericmp
ericmpβ€’7mo ago
ohh okayyy nice
Want results from more Discord servers?
Add your server