Ivan's Blog

Lets learn new things!

Prepare RESTful Web Services using Laravel: The PHP Framework

I prepare this document to remember these steps. Hope it will help others too. Step 1: Install laravel Laravel documentation is very resource full. To install laravel please follow the bellow link: https://laravel.com/docs/5.4 1st have to fulfill all prerequisite! Without these, laravel will not run properly. Step 2: Make Database schema using migration. Now 1st design your application database schema. … Read More

Wowza outgoing security Secure Token and PHP, Android client

Configure outgoing security using Wowza Streaming Engine Manager There is a very good documentation in Wowza forum to enable security token for Wowza steaming server. Here is link to follow: http://www.wowza.com/forums/content.php?578-How-to-configure-security-using-Wowza-Streaming-Engine-Manager Now the outgoing stream is secured. If any one knows the secret token, then only generate the authenticate URL for steaming. Here are some code example to do this. … Read More

Yii 1.1: Some basic of theme

In a theme there is some basic folder structure: Here in blackboot theme, some basic folder, css, js, img, view->layouts In view->layouts, php files are design to get dynamic content from framework side and show them in particular sections(divs). Here, in $content variable, actual contents replaced for particular views. For other views like view->layouts->column1.php view->layouts->column2.php there used some other framework … Read More

Yii 1.1: Relations some example and links

In Model there is a function called relations. The array items are like that: [code language=”php”] ‘VarName’=&gt;array(‘RelationType’, ‘ClassName’, ‘ForeignKey’, …additional options) [/code] RelationType can be: BELONGS_TO HAS_MANY HAS_ONE MANY_MANY Example: [code language=”php”] <pre>array(         ‘posts’=&gt;array(self::HAS_MANY, ‘Post’, ‘author_id’),         ‘profile’=&gt;array(self::HAS_ONE, ‘Profile’, ‘owner_id’),      ); $post=Post::model()-&gt;findByPk(10); $author=$post-&gt;author; $posts=Post::model()-&gt;with(‘author’,’categories’)-&gt;findAll(); $posts=Post::model()-&gt;with(‘author.profile’,’author.posts’,’categories’)-&gt;findAll(); $posts=Post::model()-&gt;findAll(array(     ‘with’=&gt;array(         ‘author.profile’,         ‘author.posts’,         ‘categories’,     ) )); $users=User::model()-&gt;with(array( … Read More

Yii 1.1: Easy way to create a Module in Yii

Creating a module in Yii framework is very easy. Any one can see bellow link: http://www.yiiframework.com/doc/guide/1.1/en/basics.module Here I will describe how any one can create a module very easily in Yii. Yii have a code generator that is called gii. 1. If we have several database table, then 1st we need to generate model and CRUD from GII.     … Read More

Yii 1.1 : DropDown, Pagination, GridView, DetailsView

The most amazing this I noticed in Yii 1.1 framework is there build in module gii. By this module, anyone can generate a CRUD (Create, read, update and delete). Although it create most of the components like model, view, and controller but also we need to do some modification for better user experiences. Here I will discuss about those things: … Read More

Yii 1.1: A simple and high performance PHP framework

In my previous company (DSI), I got opportunity to work with Yii(PHP framework). In that time I realized that framework makes life so much easy(its developer’s life). One of the main reason to learn or work with this framework is its documentation is very nice. Anyone can get help from their forum also. I also read some contents of this … Read More