Created
July 12, 2017 13:52
-
-
Save ipabz/506f03f59995476a66922181baba4fc4 to your computer and use it in GitHub Desktop.
Repository
This file contains hidden or 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 Backfence\Repositories; | |
use Illuminate\Database\Eloquent\Model; | |
use Backfence\Contracts\YourClassNameInterface; | |
class YourClassName extends Repository implements YourClassNameInterface | |
{ | |
protected $model; | |
public function __construct(Model $model) | |
{ | |
$this->model = $model; | |
} | |
public function __call($method, $args) | |
{ | |
return call_user_func_array([$this->model, $method], $args); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment