Template repository interface and Eloquent implementation.