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