This is a continuation of my previous post: https://dev.to/jsf00/implement-crud-with-laravel-service-repository-pattern-1dkl
You might want to check my previous post about php interface before proceeding. https://josafebalili.vercel.app/php-interface/
Let's create a repository interface for the post. Let's call it PostRepositoryInterface.php. As you can see, this repository class implemented our PostRepository that we created .
https://photos.app.goo.gl/jEVhZ882N6mgSfpk7
Now, we need to create RepositoryServiceProvider and bind PostRepositoryInterface.
Then register it to the AppServiceProvider.
https://github.com/jsafe00/laravel-service-repository/tree/with-interface
Check the Eloquent Interface implementation at https://josafebalili.vercel.app/laravel-service-repository-eloquent-interface