hasMany(BasketsContent::class); } /** * Get the customer that owns the Basket * * @return \Illuminate\Database\Eloquent\Relations\BelongsTo */ public function customer(): BelongsTo { return $this->belongsTo(Customer::class); } /** * The "booted" method of the model. * * @return void */ protected static function booted(): void { static::creating(function (Basket $basket) { $basket->reference = Str::ulid(); }); } }