The repository basically allows you to decouple your business logic from your database layer.
Whilst your eloquent model knows how to find all records for a given entity, your repository could wrap that in business-specific logic:
// Eloquent
$users = User::where('active', true)->get();
// Repository
$users = $this->userRepository->getAll(true);
class UserRepository {
protected $model;
public function __construct(User $model)
{
$this->model = $model;
}
public function getAll($active = false)
{
if ( $active === true )
{
return $this->model->where('active', true)->get();
}
return $this->model->all();
}
}
This gives you testability and separation of concerns, your app is no longer tightly coupled to a particular implementation. In doing so, it becomes simpler to switch out the eloquent persistence for talking to a JSON API for example. This becomes easier still when you then you bind an interface to your controllers - something like UserRepositoryInterface - because you can update all uses of that interface just by updating one line in your service provider.
As with anything, though, it's up to you to determine if this is appropriate for your application. Repositories add another layer of complexity to your app that perhaps a small CRUD application won't actually need.