Skip to content

Instantly share code, notes, and snippets.

@lfbn
Last active July 31, 2020 18:19
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 lfbn/de3e681237c338a2f61b1939b9d4c30a to your computer and use it in GitHub Desktop.
Save lfbn/de3e681237c338a2f61b1939b9d4c30a to your computer and use it in GitHub Desktop.
EloquentRepositoryInterface.php #laravel #laravel_repositories
<?php
namespace App\Repositories\Eloquent;
use Illuminate\Database\Eloquent\Model;
/**
* Interface EloquentRepositoryInterface
* @package App\Repositories\Eloquent
*/
interface EloquentRepositoryInterface
{
/**
* @param array $attributes
* @return Model
*/
public function create(array $attributes): Model;
/**
* @param int $id
* @return Model|null
*/
public function find(int $id): ?Model;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment