Home » Blog


This tutorial will show you how we can use dynamic model yii2.In some case, we do not want the model because we do not want to insert any data in the MySQL tables. But we need client-side and server-side validations to secure our functionality. To overcome this problem we have an option in yii2 to use dynamic models. For DynamicModel we don't need to create any file Or Class. Everything is already implemented by Yii we just need… Read More
Today we are going to learn how to create dropdown in yii2 gridview. In this post, I will show you how we can add dropdown list in grid view filter and in the column value. Let's start. [php] [ 'attribute' => 'status', 'filter' => ['A'=>'Active','I'=>'Inactive','B'=>'Block'], 'filterInputOptions' => [ 'class' => 'form-control', 'prompt' => 'Select' ], 'format' => 'raw', 'value' => function ($model) { return Html::dropDownList('status', $model->status, ['A'=>'Active','I'=>'Inactive','B'=>'Block'], ['onchange' => "changeStatus($(this).val(),'$model->id')"]); }] [/php] In the above example,… Read More
Summary: Hi Everyone in this post I am trying to cover all git commands for the beginner with little description. I am pretty sure that I would help you. [php] git log --grep="javascript" // search for a commit description name git log HEAD git log --oneline ---> to see the log in one line git log --graph --oneline --decorate --all // to see the log with the branch name git diff git diff filename (if want see specfic… Read More
Summary: In this post, We are going to learn the meaning of tilde (~), caret (^),  wildcard ( * ) in composer.json file. When we install the composer you can see a file name composer.json is created. When we just open it we can see some sign near to version like tilde (~), caret (^) and wildcard ( *). For example, I show you yii2 json file below: [php] "require":{ "php":">=5.4.0", "yiisoft/yii2":"~2.0.6", "yiisoft/yii2-bootstrap":"~2.0.0", "yiisoft/yii2-swiftmailer":"~2.0.0 || ~2.1.0" } [/php] Composer.json… Read More
Summary: In this post, I am going to show the Top 7 commands of git you must learn. These are some basic commands that you must have to learn before continuing with Git. Git is a fast-growing platform to manage code and repository. Git has a lot of features related to managing code and taking backup of files and folders. The best part of git it is very easy to learn. There are many web-based hosting services that using… Read More
Introduction: Linux is a free and open-source operating system just like Windows and Mac OS. We can use Linux on computers and servers. Summary: Basic Linux commands for files and folders I choose this topic Because so many users don't know about the simple command of Linux. In this post, I am going to show you some basic command related to folder and file so that you can easily manage them. We need Shell or Terminal to execute these commands. We… Read More
Summary: Hi, everyone. In this post I am going to show you how we can group by in array PHP by using foreach loop. We have no defalut function for groupby of array in php. Let's start, We have a array which contain Items in key and It's owner in value. [php][ "Item1" => "Randy", "Item2" => "Stan", "Item3" => "Randy" ]; [/php] But we need to show result like below: [php] [ "Randy" =>["Item1","Item3"],"Stan"=>["Item2"]… Read More
Introduction: Composer is package manager for the PHP. Composer for managing php dependencies and download php package, library, framework etc. Summary: In this post, I am going to show you how we can download and install composer in Window. It is not much difficult to download just follow the below steps. First of all, you need to on Composer official website with this https://getcomposer.org/download/ link. For Windows system, we do not need to run any commands.… Read More
Introduction: Yii2 is the fast-growing PHP framework. It has a lot of features like client-side and server-side validations, debug tools and a lot of extensions to work easier. It is the best framework for bigger websites. Summary: There are two types of apps available to download Yii2 one is Basic which is useful for the small website which has no more panel only has frontend. Another one is Advanced which is useful for projects which have more than one panel. In this post,… Read More
Introduction: Laravel is a great PHP framework. It has a lot of features related to validations, working with array and some other security features. You can learn about laravel from laracasts here you can also find some other good things about laravel. Summery: In this post, I am going to show you how we can download laravel with the help of Composer. If you want to know about the composer you can see my post How To Install Composer. Let's start, There are two methods… Read More
Back to top