Yii Framework Forum: To do my URL unique - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

To do my URL unique Rate Topic: -----

#1 User is offline   topkurs 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 12-December 17

Posted 12 December 2017 - 05:57 AM

del
0

#2 User is offline   Arockia Johnson SR 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 194
  • Joined: 25-June 13
  • Location:Singapore

Posted 13 December 2017 - 09:59 PM

Hi,

Are you trying to use query string as unique or the action name as dynamic unique?

If your goal is to have each URL unique then simply use md5() and append to your param.


<?= Yii::app()->createUrl('/shop-'.$model->id.'-'.$uid.'-'.$model->uid . md5($model->id. uniqid())); ?>



and If URL param means then no need to concat the params as single.

May be


public function actionIndex($id,$uid,$hash){
        $arbs = Arbitration::model()->findAll('uid=:uid OR uto=:uid ORDER BY created DESC',array(':uid'=>Yii::app()->user->id));
        $this->render('index',array('arbs'=>$arbs));
 }


மகிழ்ச்சியாக குறியிடுங்கள்!..... Happy Coding!.....


Thanks & Regards,
ஜான்சன் ( Arockia Johnson SR )
www.arojohnson.tk

Hit (+) button If my replies really helped you!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users