Created
May 3, 2017 17:10
-
-
Save geggleto/c6d434f919ea7b7db781665d9383ea59 to your computer and use it in GitHub Desktop.
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 | |
namespace App; | |
use App\Services\ServerProviderFactory; | |
use Illuminate\Database\Eloquent\Model; | |
class Provider extends Model | |
{ | |
public function service() | |
{ | |
//Where do I get the dependency? | |
return (new ServerProviderFactory($depedency))->make($this->type); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment