Skip to content

Instantly share code, notes, and snippets.

@scramatte
Created May 1, 2024 17:09
Show Gist options
  • Select an option

  • Save scramatte/9dc500d7a88175f04a39ab7bb1f3c95c to your computer and use it in GitHub Desktop.

Select an option

Save scramatte/9dc500d7a88175f04a39ab7bb1f3c95c to your computer and use it in GitHub Desktop.
Product Model
<?php
namespace Modules\Billing\Models\Product;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class Product extends Model
{
protected $table = 'billing.products';
public function family(): BelongsTo {
return $this->belongsTo(ProductFamily::class);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment