What is the difference between Yii and Laravel?
1. Yii does not over-design the code for design patterns, while Laravel is a bit over-designed;
2. Laravel syntax is more expressive, and every line of code is It can be concise and expressive;
2. The Laravel community is relatively active and has abundant resources.
1. The syntax is more expressive
Laravel features
You know that in the following line of code " What does "true" mean?
$uri = Url::create('some/uri', array(), array(), true);
In addition, do you know other parameters Does it mean here (except the first one)? Of course you don't know. Because this line of code is not expressive.
Look at this code again:
$url = URL::to_secure('some/uri');
This expression creates a URL using the HTTPS protocol Link, In fact, the above two ways of writing are doing the same thing, but which one is more clear and expressive?
2. High-quality documentation
Laravel has a great community support. The expressiveness and good documentation of the Laravel code itself make PHP programming a pleasure.
3. Rich expansion packages
Bundle is the name for expansion packages in Laravel. It can be anything - as large as a complete ORM, as small as a debug tool, or just copy & paste to install any extension! Laravel's extension packs are contributed by developers from all over the world, and more are constantly being added.
4. Open source and hosted on GITHUB
Laravel is completely open source. All code is available on Github, and you are welcome to contribute.
Recommended tutorial: "Yii Tutorial"
The above is the detailed content of What is the difference between Yii and Laravel?. For more information, please follow other related articles on the PHP Chinese website!