
Explore the Yii framework, a high performance, component-based PHP framework for rapid web development using the model–view–controller pattern, with ready-to-use features and templates.
Install composer through the terminal or by downloading the composer file, then verify by typing composer to confirm version 1.5.1 for a successful setup.
Download the latest composer snapshot from the official website and save the file. Use this to install extensions or libraries in your project, or run composer without a public installation.
Learn to install yii2 from an archive file by downloading a zip, extracting it to your htdocs directory, and initializing a development project with php init for a local server.
Install Yii2 basic via the second composer method: download composer.phar, copy it into your project, and run the basic command after installing the asset plugin. Then verify the setup by opening localhost/learning to confirm basic and advanced features are accessible.
Compare Yii2 basic and advanced templates, examine frontend and backend structures (assets, config, bootstrap, vendor, common, console), and learn how env, vagrant, and params shape development and production setups.
Explore how param-local localizes parameters to backend or frontend, use aliases for directories, and how controllers, models, views, and the runtime folder structure a Yii2 application.
Learn the mvc flow in yii2, where the user submits data to the controller, updates the model, stores it in the database, and retrieves it through the view.
Explain how the model in MVC acts as the gatekeeper for data, validating and storing fields like name, email, subject, and body, while remaining blind to view and controller.
Learn how the view requests data from the model, renders html, and triggers controller actions through user interactions, while leveraging layout and forms in Yii2.
In yii2, the controller collects information, passes it to the model for storage, and renders a view via actions like index.
Learn how to pass data from the controller to the view in Yii2 using variables, arrays, and strings, and display them in the view with echo, var_dump, and foreach.
Learn how partial view enables reusing a single view in multiple pages by rendering a shared menu across index and detail in a Yii2 frontend controller.
Discover how to structure a Yii2 layout with a header, body, and footer, using a main layout file and partial views to keep the header, menu, and footer consistent.
Learn how to pass data from a Yii2 controller to a view and into the layout using params, echoing variables and guarding with isset to avoid undefined variables.
Learn to pass data to layout using session in PHP, initialize with session_start, verify with isset, and echo variables like var2 across pages.
Pass data from a controller to a view and onward to a partial in Yii2, using the same method to send a menu title or category to the partial menu.
Learn how to change yii website templates using the best method. Download a template from html5 webtemplates.co.uk/templates, copy files into a theme folder, and preview locally.
Copy the theme css and image assets into the project, update AppAsset with style.css, and move the header and footer into the layout to apply the new template.
Customize a Yii2 website template by removing bootstrap, updating header links (home, about, contacts, product, log in, sign up), adjusting the banner image, and ensuring proper routing after cache clear.
Install a WordPress blog template on the basic Yii2 project by accessing the public directory, downloading the template, copying it to a new theme folder under web, and previewing changes.
Learn how to modify a bootstrap-based template in Yii2 by organizing assets, integrating CSS and JavaScript, and building header, footer, and layout with partial views to mirror the original design.
Modify a bootstrap-based website template by updating the header, navigation links, and page titles, and apply a consistent header image and container layout across pages.
Replicate a responsive basic template in an advanced Yii2 layout by copying assets, updating header and footer, adjusting the menu, and adding containers for mobile-friendly design.
Enable pretty url in Yii2 to create user-friendly and seo-friendly links by uncommenting settings in frontend config main.php and in basic/web. Refresh to confirm the changes.
Create and configure a .htaccess file to enable pretty URLs and route requests correctly. Use the web directory and @web base path to load assets when actions are added.
Learn how to pass parameters between pages in Yii2 by appending product or blog post ids to urls like product/details, using the url class, and linking from index to detail.
Retrieve id and name from the url in the product detail view by passing them from the index through the controller, then render the title and the body.
Configure url rules to produce pretty urls that map a numeric id and an alpha-numeric name for product detail pages, ensuring the server format matches the client visible path.
Explore how yii's html helper generates common html tags through static methods, enabling dynamic options like class and style while showing when to prefer plain html for near-static content.
See how the html helper powers Yii's active form on a contact page, generating the form tag, csrf input, and dynamic fields like name, email, subject, body, and verification code.
Use the Yii2 html helper to render image and link elements, replacing plain html with helper calls and options like class and alt, concatenate them into a body for display.
Learn to create ordered and unordered HTML lists, apply CSS classes like list group, and wrap lists in a div with aria considerations while inspecting the results.
Create a plain HTML form using Yii2 HTML helpers, with beginForm and endForm, adding text, password, radio, and textarea fields, including default values and form-control styling, without Yii validation.
Master Yii2 html helpers for forms, including checkboxes, drop-down lists with default states, radio lists, and labels, with examples like Mr, Mrs, and master, plus css/js integration.
Explore Yii2 url helpers to manage internal links with static methods, including home, base, and route variants, optionally adding http or https, and passing parameters with arrays.
Explore Yii2 url helpers by comparing toRoute and to, display of images, and using current, remember, and relative checks to pass parameters and temporarily store the current url.
Learn how the yii array helper simplifies working with arrays and use get value to retrieve values, including handling child arrays, nested structures, and default zero-based keys.
Learn to validate array keys using the array helper key exist, check a key before retrieval, and echo whether the key exists or does not exist.
Learn how to use Yii2 array helpers to index records by id, getColumn, and map for dropdowns, including handling duplicates and mapping id to display name.
Learn to sort arrays with multisort (by id and multiple columns), toggle ascending or descending, and use isIn and merge to check values and combine arrays.
Connect a Yii2 project to a database by creating the database in phpMyAdmin with utf8_general_ci, updating the code, and validating the connection through a login test.
Use yii migrate to generate default tables, optionally set a table prefix. Run the command in your project directory and verify the migration creates the migration and user tables.
Learn to configure multiple database connections in Yii2 by adding a second db (db2), setting its DNS and location, and querying data from it.
Learn how to implement signup in Yii2, including front-end forms, validation rules, storing username and email, hashing passwords, generating authentication keys, and enabling login.
Learn how to log in with a loginform, validate username and password, check authenticated state in the controller, and retrieve the user from the database to complete login.
Learn how to check user authentication in Yii2 views by conditionally showing login or signup for guests and logout or the current user’s name or email for authenticated users.
Learn how to implement logout in Yii2 by converting a link to a post-based form using the html helper, wiring site/logout and post method rules.
Extend the signup flow in yii2 by adding name and phone fields to the model and view, update the database, and validate name as string and phone as numeric.
Learn how to restrict access to a yii2 controller using the access control behavior, with rules for allow, roles, only, and except to secure index, detail, and detail2 actions.
Master the manual authentication method for Yii2 controllers by checking if the user is logged in and redirecting guests to the site controller's login action, with proper Yii namespace usage.
Create separate login tables for frontend and backend by duplicating the afri_user table to afri_admin, updating login forms, namespaces, and identity class to admin.
Learn to build an active record powered post system in Yii2 by creating afr_post, generating a post model with validation, and using an active form to insert records.
Learn to read all records from the database using Yii2’s active record by fetching posts, displaying a list of articles, and rendering an index view with titles and IDs.
Learn to read one record from a table in Yii2 by creating a view action, passing the id as a parameter, and rendering the record's title and body.
Implement an update workflow by loading the post by id, updating the title and body, and redirecting to the view page after a successful update or create.
Learn to implement delete functionality in Yii2 by adding a delete link, creating the delete action, passing the id, checking record existence, deleting the record, and redirecting to index.
Authenticate active record actions by ensuring only the record owner can view, update, or delete a post; enforce posted by user id checks to prevent hijacking across accounts.
Seed your database with faker-generated posts, randomizing authors between user 1 and 2, and generate 100 records with titles of 5–20 words and 3–10 paragraph bodies.
Populate the landing page by retrieving all table records, pass them to the view as posts, and display each post’s title, image, posted by, and date.
Learn to optimize Yii2 queries by selecting only the needed columns and applying status and posted by conditions, ensuring faster fetches and correct results.
Sort posts using the orderby attribute in Yii2 with ascending, descending, or randomize order; limit results to 20 and count records with status 1.
Click a post on the home page to view the full content on a dedicated page, fetched by id via the Post model and controller, displaying the title and body.
Learn how to implement sluggable URLs in Yii2 with Gii, generating unique slugs from post titles, updating the model and controller to fetch posts by slug for SEO-friendly URLs.
Learn how to connect a Yii2 model to a second database, create a post2 model linked to db2, and insert and select records across databases.
The lecture explains building reusable widgets to display a truncated preview of content, using a small body widget that shows the first 20 words with a detail link.
Explore gridview features for displaying data with sorting, pagination, filtering, and styling, and learn to set a default page size of 20 to paginate large datasets.
Learn how to format a gridview in Yii2 by adding a serial number column, omitting image, status, and slug, and formatting the created at date with flexible year-month-day options.
Add an action column to a Yii2 GridView to enable view, update, and delete actions. Fix missing icons by loading Bootstrap glyphicon via CDN in AppAsset, then test each action.
Learn how to render a data list with yii2 listview using an active data provider and pagination, with a _posts partial as the item view.
Detailview widgets display a data model in a format, without an active data provider. Learn to display attributes such as title, body, and created at, and format time and date.
Paginate active record without an active data provider in Yii2 by initializing pagination, computing total count and offset, and rendering a link pager in the index view.
Explore Pjax in Yii2 for inserting a record by sending a special request on link click or form submit, updating content without reloading the page and updating browser history.
Yii is a fast, secure and professional PHP framework. Yii2 is a high performance PHP framework bet for developing robust project with speed.
Yii is one of the most popular framework and it is gaining popularity and relevancy day-by-day because of it’s key concept, performance, efficiency, flexibility and security.
Coding in plain PHP or any other language can be time consuming, especially for common tasks. Using a framework is the best way to apply common tasks, like:
In this course you will build a complete application in the Yii2 Framework from the ground up. You'll learn how the MVC pattern works as I take you step-by-step through everything needed to be an expert in Yii2.
High paying jobs require knowledge of frameworks, since speed and accuracy are crucial for the development team and company. Having knowledge of using frameworks will allow you to find a hight paying job, or find a job easier than not having the skill at all.
This course will help newbies as well as experts to solving regular problems during coding. In this course you will learn all the available features given to us from Yii2 framework. This course is all about students who are willing to learn Yii2 and want their programming skills enhanced. You will learn all sort of Best Practices to use during your development.
I created this course with the intention to provide you with the knowledge you need to use Yii2 to develop applications fast and efficiently. I also create this course to help you provide a great skill that will propel you in your web development career.
Who is the target audience?