Skip to content

Instantly share code, notes, and snippets.

@kapv89
Created July 28, 2013 23:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kapv89/6100738 to your computer and use it in GitHub Desktop.
Save kapv89/6100738 to your computer and use it in GitHub Desktop.
Abstract Eloquent Use Case
class Order extends AbstractEloquent {
protected $isSuperType = true;
protected $typeField = 'class';
}
namespace Order;
class Delivery extends Order {
protected $isSubType = true;
}
class Pickup extends Order {
protected $isSubType = true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment