F
Filamentβ€’3mo 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β€’3mo ago
TextInput::make('invoice'), to: TextInput::make('invoice.name'), im supposing ur invoice has an attr called name @jepewsykes
jepewsykes
jepewsykesβ€’3mo ago
still showing object object bro 😭
ericmp
ericmpβ€’3mo ago
so u mean invoice.name is also an object? πŸ€”
jepewsykes
jepewsykesβ€’3mo ago
not invoice its penjualan.invoice see the relation function
ericmp
ericmpβ€’3mo ago
uff not sure now r u sure u can add ->relationship method to a Section? ive never done it
jepewsykes
jepewsykesβ€’3mo ago
yes this is the last option i have
jepewsykes
jepewsykesβ€’3mo ago
not bad
No description
jepewsykes
jepewsykesβ€’3mo ago
using section and placeholder i dont why if using placeholder invoice showed up Thx u Btw
ericmp
ericmpβ€’3mo ago
i tried to help, not sure if i helped xd but wdym with placeholder?
jepewsykes
jepewsykesβ€’3mo ago
using placeholder not textinput bro and its still looks good πŸ˜‰
ericmp
ericmpβ€’3mo ago
ohh okayyy nice