mirror of
https://github.com/kataras/iris.git
synced 2026-02-07 03:05:56 +00:00
Update to 8.2.5 | Say Hello to Controllers. Read HISTORY.md
Former-commit-id: 70f8619440497d132362da86c5187bcc57f8687b
This commit is contained in:
12
_examples/tutorial/mvc-from-scratch/controllers/index.go
Normal file
12
_examples/tutorial/mvc-from-scratch/controllers/index.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package controllers
|
||||
|
||||
// Index is our index example controller.
|
||||
type Index struct {
|
||||
Controller
|
||||
}
|
||||
|
||||
func (c *Index) Get() {
|
||||
c.Tmpl = "index.html"
|
||||
c.Data["title"] = "Index page"
|
||||
c.Data["message"] = "Hello world!"
|
||||
}
|
||||
Reference in New Issue
Block a user