Author Topic: How to set default controller in yii  (Read 16187 times)

phpdeveloper

  • Newbie
  • *
  • Posts: 39
How to set default controller in yii
« on: September 17, 2012, 05:38:45 AM »
HI ,
      This is very easy to set Default controller in Yii you can just simply write a line of code in Your protecte/config/main.
                'defaultController' => 'home ', //insert this line for set default controller

rahul

  • Newbie
  • *
  • Posts: 16
Re: How to set default controller in yii
« Reply #1 on: September 17, 2012, 05:43:05 AM »

      Thanks PhpDeveloper for this cool idea to set default controller .

    Can you make me clear what is the Home IN   'defaultController' => 'Home',  please Help
                                           
                                           

phpdeveloper

  • Newbie
  • *
  • Posts: 39
Re: How to set default controller in yii
« Reply #2 on: September 17, 2012, 05:46:42 AM »
Hey this is the Name of your controller in your controller directory LIKe HOmeController.php

You can also understand like this :
                                                           'defaultController' => 'Your Controller Name ',
 
Hope Now this is easy to understand .

perks

  • Newbie
  • *
  • Posts: 11
Re: How to set default controller in yii
« Reply #3 on: September 17, 2012, 12:19:08 PM »
Thanks for your efforts you made to find the way to set default controller in yii . 

 

X

Do you know?

IfAndBut.com gives you a platform where you can ask questions related to web and internet..
So, why wait..
Join Now!
anything