Answer the question
In order to leave comments, you need to log in
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
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question