本文整理汇总了PHP中App\Http\Controllers\Session::regenerateToken方法的典型用法代码示例。如果您正苦于以下问题:PHP Session::regenerateToken方法的具体用法?PHP Session::regenerateToken怎么用?PHP Session::regenerateToken使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类App\Http\Controllers\Session
的用法示例。
在下文中一共展示了Session::regenerateToken方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: postComplete
public function postComplete($slug, $item, InquireForm $inquireForm)
{
$this->prj02Inquire->fill($inquireForm->all());
$systemData = \Helper::getItemInfo("constants.system_inquire.{$slug}.{$item}");
$this->prj02Inquire->form = $systemData['form'];
$this->prj02Inquire->uid = $systemData['uid'];
if (isset($this->prj02Inquire->important)) {
unset($this->prj02Inquire->important);
}
if ($slug == 'inquire' && $item == 'member' && isset($this->prj02Inquire->ext55)) {
$this->prj02Inquire->ext55 = $this->prj02Inquire->ext55 . '年';
}
$this->prj02Inquire->save();
// Get subject, URL
$arrItem = $this->prj02Inquire->toArray();
$arrItem['URL'] = \Helper::getItemInfo("constants.system_inquire.{$slug}.{$item}")['URL'];
$arrItem['subject'] = \Helper::getItemInfo("constants.system_inquire.{$slug}.{$item}")['MailSubjectAdmin'];
$arrItem['CATALOG_ITEM'] = $slug . '_' . $item;
// Send Mail to Admin only
\Helper::sendMailAdmin($arrItem, $arrItem['subject']);
//Clean session
\Session::regenerateToken();
// Redirect complete html on this action with get method
return \redirect()->route('inquire-finish', [$slug, $item]);
}
示例2: postComplete
/**
* Do complete, sendmail to admin, save to database, render view to user
*
* @author Ngoc Nguyen + Dung Le + Tu Tran + My Vo
*
* @param String $catalogItem
* @param Prj02Catalog $prj02Catalog
* @param CatalogForm $catalogForm FormRequest for validate
*
* @return View
*/
public function postComplete($catalogItem, Prj02Catalog $prj02Catalog, CatalogForm $catalogForm)
{
$prj02Catalog->fill($catalogForm->all());
// Do before save
$form = \Helper::getFormTable($catalogItem);
// Array item for send mail
$arrItem = $catalogForm->all();
// Do before save and send mail
if ($form !== 'input-r1-3') {
$arrItem['ext7'] = $arrItem['ext7'] === 'h' ? '申し込む' : '申し込まない';
$this->beforeSaveCustom($prj02Catalog, $form);
}
$prj02Catalog->save();
// Get subject, URL
$arrItem['URL'] = \Helper::getItemInfo("constants.system_catalog.{$catalogItem}")['URL'];
$arrItem['subject'] = \Helper::getItemInfo("constants.system_catalog.{$catalogItem}")['MailSubjectAdmin'];
$arrItem['CATALOG_ITEM'] = 'catalog_' . $catalogItem;
// Send mail admin
\Helper::sendMailAdmin($arrItem, $arrItem['subject']);
//Put session for R2
\Session::put('ext1', \Session::get('info_input')['ext1']);
\Session::put('ext2', \Session::get('info_input')['ext2']);
\Session::put('ext3', \Session::get('info_input')['ext3']);
// Clear session
\Session::regenerateToken();
\Session::forget('dct');
\Session::forget('id');
\Session::forget('info_input');
\Session::forget('cat_item');
return redirect()->route('catalog-finish', $catalogItem);
}
示例3: postComplete
/**
* show and handle compete page
*
* @author My Vo
*
* @return \Illuminate\View\View
*/
public function postComplete(Prj02FormR5 $prj02FormR5, CatalogFormR5 $catalogFormR5)
{
// Get platform
$platFormID = \Session::get('id');
// Return to cache
\Helper::catalogLoad($platFormID, $prj02FormR5->platformName);
$catalogList = $prj02FormR5->platformName . $platFormID . 'List';
// get item from cache
$listItem = \Cache::get($catalogList);
$arrItem = \Session::get('dct');
foreach ($arrItem as $key => $value) {
if (empty($value)) {
break;
}
$arrItem[$key] = array_shift($listItem[$value]);
}
// ext1 field data
$item = implode(',', $arrItem);
//serial number
$serial_number = date('yymm-55');
//Registration date
//※2015年 7月 6日(月曜日) 17時 29分
$youbi = ['日', '月', '火', '水', '木', '金', '土'];
$registration_date = date('Y年 n月 j日(') . $youbi[date('w')] . date(') G:i');
// Select model and system name by catalogItem
$systemData = \Helper::getItemInfo("constants.system_catalog.{$this->catalogItem}");
$prj02FormR5->fill($catalogFormR5->all());
$prj02FormR5['name1'] = $prj02FormR5['name1'] . " " . $prj02FormR5['name2'];
$prj02FormR5['kana1'] = $prj02FormR5['kana1'] . " " . $prj02FormR5['kana2'];
$prj02FormR5['address1'] = $prj02FormR5['area'] . $prj02FormR5['address1'];
$prj02FormR5['ext8'] = $prj02FormR5['ext8'] . $prj02FormR5['ext9'];
$prj02FormR5['ext1'] = $item;
$prj02FormR5['form'] = $systemData['form'];
$prj02FormR5['uid'] = $systemData['uid'];
$prj02FormR5['ext6'] = $serial_number;
$prj02FormR5['ext7'] = $registration_date;
$prj02FormR5['ext11'] = '希望しない';
$prj02FormR5['ext12'] = '希望しない';
// unset attributes
unset($prj02FormR5['name2']);
unset($prj02FormR5['kana2']);
unset($prj02FormR5['area']);
unset($prj02FormR5['ext9']);
// array item send email
$arrItem = $prj02FormR5->getAttributes();
// save
$prj02FormR5->save();
// Get subject, URL
$arrItem['URL'] = \Helper::getItemInfo("constants.system_catalog.{$this->catalogItem}")['URL'];
$arrItem['subject'] = \Helper::getItemInfo("constants.system_catalog.{$this->catalogItem}")['MailSubjectAdmin'];
$arrItem['CATALOG_ITEM'] = 'catalog_' . $this->catalogItem;
// Send mail admin
\Helper::sendMailAdmin($arrItem, $arrItem['subject']);
// Send mail user
$subject = \Helper::getItemInfo("constants.system_catalog.{$this->catalogItem}")['MailSubjectClient'];
\Helper::sendMailUser($arrItem, $arrItem['email1'], $subject);
\Session::regenerateToken();
\Session::forget('dct');
\Session::forget('id');
\Session::forget('info_input');
\Session::forget('cat_item');
return view('pages.default.catalog.r5.complete');
}
示例4: postComplete
public function postComplete(Prj02Catalog $prj02Catalog, CatalogFormR3 $catalogFormR3)
{
$prj02Catalog->fill($catalogFormR3->all());
$systemData = \Helper::getItemInfo("constants.system_catalog.{$this->catalogItem}");
$prj02Catalog->form = $systemData['form'];
$prj02Catalog->uid = $systemData['uid'];
$prj02Catalog->save();
// Get subject, URL
$arrItem = $prj02Catalog->toArray();
$arrItem['URL'] = $systemData['URL'];
$arrItem['subject'] = $systemData['MailSubjectAdmin'];
$arrItem['CATALOG_ITEM'] = $this->catalogItem;
// Send Mail to Admin only
\Helper::sendMailAdmin($arrItem, $arrItem['subject']);
// Regenerate Session
\Session::regenerateToken();
\Session::remove('r3-form-dct');
\Session::remove('r3-form-input');
// Redirect complete html on this action with get method
return \redirect()->route('catalog-complete-r3');
}