Controllers
INFO
This page will describe how controllers can be generated.
Examples
Basic Controller
yaml
arch: 1.0.0
definitions:
controllers:
web:
Plain:
plain: true
Resource Controller
yaml
arch: 1.0.0
definitions:
controllers:
web:
Resource:
methods: ['index', 'store', 'update']
Partial Resource Routes
yaml
arch: 1.0.0
definitions:
controllers:
web:
ResourceWithMethods:
methods:
index:
- view: post.index with:posts
create:
- view: post.create
store:
- redirect: post.index
Singleton Resource Controllers
yaml
arch: 1.0.0
definitions:
controllers:
web:
Singleton:
singleton: true
methods: ['store', 'update']
Nested Resources
yaml
arch: 1.0.0
definitions:
controllers:
web:
Parent/Nested:
methods: ['index', 'store', 'update']
Nested Singleton
yaml
arch: 1.0.0
definitions:
controllers:
web:
Parent/NestedSingleton:
singleton: true
methods: ['store', 'update']
Single Action Controllers
yaml
arch: 1.0.0
definitions:
controllers:
web:
Invokable:
invokable: true