J
J
Jedi2017-07-13 07:12:06
Yii
Jedi, 2017-07-13 07:12:06

How to set routes in YII2?

Hello. How can I set routes so that I can specify for example:
GET / = Controller/Site->Index
GET|POST /contacts = Controller/site->contacts

This was an example from another framework. I really want to install the same route system, not exactly the same, but at least similar.
It's wonderful!
$f3->route('GET /about',
function() {
echo 'Donations go to a local charity... us!';
}
);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2017-07-13
@PHPjedi

Good morning.
One
Two

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question