Skip to content

Instantly share code, notes, and snippets.

@geggleto
Created May 3, 2017 17:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geggleto/c6d434f919ea7b7db781665d9383ea59 to your computer and use it in GitHub Desktop.
Save geggleto/c6d434f919ea7b7db781665d9383ea59 to your computer and use it in GitHub Desktop.
<?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