Skip to content

Instantly share code, notes, and snippets.

@jsdecena
Last active March 14, 2018 01:44
Show Gist options
  • Save jsdecena/5224d603a3a609875a15439e5eb68558 to your computer and use it in GitHub Desktop.
Save jsdecena/5224d603a3a609875a15439e5eb68558 to your computer and use it in GitHub Desktop.
<?php
namespace App\Articles\Repositories;
use App\Articles\Article;
use App\Articles\Repositories\Interfaces\ArticleRepositoryInterface;
use App\Base\BaseRepository;
class ArticlesRepository extends BaseRepository implements ArticleRepositoryInterface
{
protected $model;
/**
* ArticlesRepository constructor.
* @param Article $article
*/
public function __construct(Article $article)
{
$this->model = $article;
}
/**
* @param array $attributes
* @return mixed
*/
public function create(array $attributes)
{
return $this->model->create($attributes);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment