[add] initial commit
This commit is contained in:
22
app/controllers/controller.go
Normal file
22
app/controllers/controller.go
Normal file
@@ -0,0 +1,22 @@
|
||||
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),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user