title: Is it possible to create custom relationships in Laravel models?
body: <p>I have a relationship which is neither One-To-One nor One-To-Many and I was wondering if it's possible to express a custom relationship in Laravel/Eloquent models.</p>
  
  <p>Essentially I have products which belong to a single category, but multiple products can belong to the same category. The <code>products</code> table stores the <code>category_id</code>. This obviously isn't One-To-One as categories are reused and Laravel would require a <code>product_id</code> foreign key on the <code>categories</code> table. It is closer to a One-To-Many, which is limited to a single item, but I'd prefer having to avoid making an additional <code>category_product</code> table to define a single relationship. I suspect this is a Many-To-One relationship?</p>