I have a table that belongs to either the Bill table or the Quotation table. Since each record requires either a Bill or a Quotation, the bill_id
and quotation_id
fields must be nullable. How can I define this in the Laravel Blueprint (https://github.com/laravel-shift/blueprint) draft.yaml file?
CustomerInfo:
name: string
contact_tel: string
email: string nullable
address: string nullable
postcode: string nullable
city: string nullable
state: string nullable
relationships:
belongsTo: Bill, Quotation