23 lines
358 B
Go
23 lines
358 B
Go
package controllers
|
|
|
|
import (
|
|
"gelvin/app/application"
|
|
"gelvin/app/models"
|
|
)
|
|
|
|
type Controller struct {
|
|
app *application.Application
|
|
model *models.Model
|
|
}
|
|
|
|
func (c Controller) Model() *models.Model {
|
|
return c.model
|
|
}
|
|
|
|
func NewController(app *application.Application) *Controller {
|
|
return &Controller{
|
|
app: app,
|
|
model: models.NewModel(app),
|
|
}
|
|
}
|