本文整理汇总了PHP中Actions::uploadPhotos方法的典型用法代码示例。如果您正苦于以下问题:PHP Actions::uploadPhotos方法的具体用法?PHP Actions::uploadPhotos怎么用?PHP Actions::uploadPhotos使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Actions
的用法示例。
在下文中一共展示了Actions::uploadPhotos方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addNormalUser
private function addNormalUser($aRequest)
{
$aUser = array();
foreach ($this->aUserParams as $sParam) {
switch ($sParam) {
case "username":
$aUser[$sParam] = strtolower($aRequest[$sParam]);
break;
case "logo":
$aUser[$sParam] = Actions::uploadPhotos($aRequest['logo'], 'logo');
break;
default:
$aUser[$sParam] = $aRequest[$sParam];
break;
}
}
$aUser['date_registered'] = date('Y-m-d h:i:s');
$aUser['age'] = $aRequest['date_of_birth'];
//Hashing the password to be saved encrypted
$aUser['password'] = Hash::make($aUser['password']);
DB::table('users')->insert($aUser);
$dIdUser = DB::table('users')->where(array('username' => $aUser['username']))->get(array('id_user'));
DB::table('user_rating')->insert(array('id_user' => $dIdUser[0]->id_user, 'likes_count' => 0));
echo "You've registered successfully!";
return redirect()->intended('/');
}