adds resource model and index view