Skip to main content

Yii vs Laravel for web development

Page 1

Yii vs Laravel for web development

Criterion

Laravel

Yii

PHP requirements

PHP 7.1.3 +

PHP 5.4 +

Extensions

Yes

Yes (less than in Laravel)

Migration

Yes

Yes

CRUD generation

No default support

Gii module for fast code generating


ORM (Object­relational mapping)

Eloquent ORM provides ActiveRecord implementation.

Default ORM. Also has support for various databases

Routing

Resource routing (a route is supposed to be mentioned for action in a controller)

Default routing (no need to declare a route for each and every action)

Caching

API for various caching systems

Diverse caching

MVC pattern

Yes

Yes

Testing

PHP unit testing and Symfony testing

Codeception unit testing


Debugging

Debugging console and Laravel­debug bar A debug toolbar. Debugging console as a extension 3rd party extension.

Widgets

No default support

Built­in widgets for HTML and Ajax data tables, custom widgets, Bootstrap, and JQueryUI widgets

Template system

Blade

PHP templates, Twig is partially supported

Form validation

Validation as a separate class

Built­in to Model classes

Code scaffolding

Laravel Artisan, extensions

Gii code generator, console, extensions


RESTful APIs

Good for RESTful apps

Built­in CRUD operations for RESTful APIs

Security

ACL plugin and Access Control Filters

RBAC and built­in tools for input validation, output filtering, etc.

Default JavaScript library

Vue.js

jQuery


Turn static files into dynamic content formats.

Create a flipbook
Yii vs Laravel for web development by KadamTech - Issuu