Last active
August 29, 2015 14:09
-
-
Save graymic/76977e3717ba96408bfc to your computer and use it in GitHub Desktop.
Polymorphic Model Namespaces
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php Some\Extended\Models\Namespace; | |
class MyBespokeModel extends Some\Other\Parent\Namespace\Model { | |
/** | |
* As this class is \App\Api\Models - Map the polymorphic relationship to this model | |
* so that it can be accessed either by Common\Models or Api\Models. | |
* | |
* @var string | |
*/ | |
protected $morphClass = 'SharedBaseNameModel'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment