Yii2 Training Syllabus
Yii2 Training Syllabus
2. Environment Setup
• Install PHP, Composer, and a web server (XAMPP, WAMP, or MAMP)
• Install Yii2 using Composer
• Configure a web server for Yii2
AAernoon Session:
3. Crea/ng Your First Yii2 Applica/on
• Generate a basic Yii2 applica6on using the `yii2-app-basic` template
• Directory structure overview
4. Basic Configura/on
• Configura6on files (`config/web.php`, `config/db.php`)
• SePng up a database connec6on
5. Hands-on Prac/ce
• Create a simple "Hello World" page
• Q&A and troubleshoo6ng
Day 2: Controllers, Views, and Models
Morning Session:
1. Controllers
• Crea6ng controllers
• Ac6ons and their types
• Rou6ng and URL management
2. Views
• Crea6ng views
• Using layouts and rendering views
• Passing data from controllers to views
AAernoon Session:
3. Models
• Crea6ng models
• Data valida6on and rules
• Ac6ve Record and database interac6ons
4. CRUD Opera/ons
• Genera6ng CRUD opera6ons using Gii (Yii's code generator)
• Customizing generated code
5. Hands-on Prac/ce
• Build a simple CRUD applica6on (e.g., managing a list of books)
• Q&A and troubleshoo6ng
Day 3: Advanced Features and Components
Morning Session:
1. Forms and Input Valida/on
• Crea6ng and processing forms
• Valida6ng user input
2. User Authen/ca/on
• SePng up a basic user authen6ca6on system
• Managing user sessions and access control
AAernoon Session:
3. Advanced Database Interac/on
• Using Ac6ve Record for complex queries
• Working with data rela6ons
5. Hands-on Prac/ce
• Enhance the CRUD applica6on with user authen6ca6on
• Q&A and troubleshoo6ng
Day 4: Tes/ng, Debugging, and Deployment
Morning Session:
1. Tes/ng
• Introduc6on to tes6ng in Yii2
• Unit tes6ng with PHPUnit
• Func6onal tes6ng
2. Debugging
• Using the Yii2 Debugger Toolbar
• Logging and error handling
AAernoon Session:
3. Deployment
• Preparing your applica6on for produc6on
• Configuring servers for Yii2
• Deploying Yii2 applica6ons