Bosnadev\Repositories\Eloquent\Repository::__construct PHP Method

__construct() public method

public __construct ( Illuminate\Container\Container $app, Collection $collection )
$app Illuminate\Container\Container
$collection Illuminate\Support\Collection
    public function __construct(App $app, Collection $collection)
    {
        $this->app = $app;
        $this->criteria = $collection;
        $this->resetScope();
        $this->makeModel();
    }

Usage Example

Beispiel #1
0
 /**
  * @param App $app
  * @param Collection $collection
  * @throws \Bosnadev\Repositories\Exceptions\RepositoryException
  */
 public function __construct(App $app, Collection $collection)
 {
     parent::__construct($app, $collection);
     $this->_cache = $this->getCache();
 }