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.com/posts/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 .
Now, we need to create RepositoryServiceProvider and bind PostRepositoryInterface.
Then register it to the AppServiceProvider.
Check the Eloquent Interface implementation at https://josafebalili.com/posts/implement-crud-with-laravel-service-repository-pattern-(with-eloquent-interface)/