Last active
July 31, 2020 18:19
-
-
Save lfbn/de3e681237c338a2f61b1939b9d4c30a to your computer and use it in GitHub Desktop.
EloquentRepositoryInterface.php #laravel #laravel_repositories
This file contains 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 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