本文整理汇总了PHP中session::forget方法的典型用法代码示例。如果您正苦于以下问题:PHP session::forget方法的具体用法?PHP session::forget怎么用?PHP session::forget使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类session
的用法示例。
在下文中一共展示了session::forget方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: handle
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
if (!$this->session->has('lastActivityTime')) {
$this->session->put('lastActivityTime', time());
} else {
if (time() - $this->session->get('lastActivityTime') > $this->getTimeOut()) {
$this->session->forget('lastActivityTime');
Auth::logout();
return redirect($this->getRedirectUrl())->with([$this->getSessionLabel() => 'You have been inactive for ' . $this->timeout / 60 . ' minutes ago.']);
}
}
$this->session->put('lastActivityTime', time());
return $next($request);
}
示例2: handleFilterRequest
/**
* Handle filter request for creating propel query.
*
* @param array $filter_request
* @param string $filter_name
* @return bool
*/
public function handleFilterRequest($filter_request, $filter_name)
{
if (session($filter_name)) {
$filter = session($filter_name);
} else {
$filter = array();
}
if (isset($filter_request['reset'])) {
session::forget($filter_name);
$filter = array();
$this->createQuery($filter, false);
} else {
if (isset($filter_request['search'])) {
$this->createQuery($filter_request, true);
} else {
$this->createQuery($filter, false);
}
}
}
示例3: ReturningCustomerForm
/**
* Returning Customer Form Processing. (This will redirect them back to the front end, which should have all of there information!
*/
public function ReturningCustomerForm()
{
$lastname = Input::get('lastname');
$email = Input::get('email');
$capche_key = '6LdI9wATAAAAANT_6rPnIaMpVXhAGO8AhOu7H_eV';
$capche_secret = '6LdI9wATAAAAAGAb9tN6ugLnTWFfHUtb3XCc8YdQ';
$response = Input::get('g-recaptcha-response');
//check if the y are correct
$results = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret=' . $capche_secret . '&response=' . $response . '&remoteip=' . $_SERVER['REMOTE_ADDR']);
$response = json_decode($results);
if (isset($response->success) && $response->success) {
$solved_capache = true;
} else {
$messages = new Illuminate\Support\MessageBag();
$messages->add('You must prove you are human ', " <b>Capache Error</b>");
Session::flash('ShowReturnPanel', true);
Session::flash('SearchError', true);
return Redirect::to('/')->withErrors($messages);
}
$this->TranslateOrderFromStatus("false", $ordered_cpn, $ordered_repayment_promisory_note, $ordered_pslf, $ordered_forebearance);
Session::put('ordered_cpn', $ordered_cpn);
Session::put('ordered_repayment_promisory_note', $ordered_repayment_promisory_note);
Session::put('ordered_pslf', $ordered_pslf);
Session::put('ordered_forebearance', $ordered_forebearance);
session::forget('Step3Completed');
// $ssn = str_replace('-', '', $ssn); // remove any dashes.
// $ssn = substr($ssn,0,3) .'-'.substr($ssn,3,2).'-'.substr($ssn,5);
//find out if they have anything matching.
// $search = $this->leadtracapi->FindClientByLastNameAndSSN($lastname, $ssn);
$search = $this->leadtracapi->FindClientByLastNameAndEmail($lastname, $email);
if (!$search) {
//Show the page & add errors!
Session::flash('ShowReturnPanel', true);
Session::flash('SearchError', true);
Session::forget('fileNumber');
} else {
Session::put('fileNumber', $search);
// lets see if they are upgrading/updating their profile (see if they have paid for anything.)
$client = $this->leadtracapi->GetClient($search, array('FirstName', 'LastName', 'Loan_Program'));
$upgrade = array('100% Payments Received', 'Process Payments');
session::forget('Step3Completed');
$this->TranslateOrderFromStatus($client->Status->Sales, $ordered_cpn, $ordered_repayment_promisory_note, $ordered_pslf, $ordered_forebearance);
Session::put('ordered_cpn', $ordered_cpn);
Session::put('ordered_repayment_promisory_note', $ordered_repayment_promisory_note);
Session::put('ordered_pslf', $ordered_pslf);
Session::put('ordered_forebearance', $ordered_forebearance);
if (isset($client->Status->Accounting) && in_array($client->Status->Accounting, $upgrade)) {
Session::put('ClientUpgrade', true);
} else {
Session::put('ClientUpgrade', false);
}
}
return Redirect::to('/');
}
示例4: ReturningCustomerForm
/**
* Returning Customer Form Processing. (This will redirect them back to the front end, which should have all of there information!
*/
public function ReturningCustomerForm()
{
$lastname = Input::get('lastname');
$email = Input::get('email');
$capche_key = '6LdI9wATAAAAANT_6rPnIaMpVXhAGO8AhOu7H_eV';
$capche_secret = '6LdI9wATAAAAAGAb9tN6ugLnTWFfHUtb3XCc8YdQ';
$response = Input::get('g-recaptcha-response');
//check if the y are correct
$results = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret=' . $capche_secret . '&response=' . $response . '&remoteip=' . $_SERVER['REMOTE_ADDR']);
$response = json_decode($results);
$response->success = true;
# PRZ ReturningCustomerForm()
if (isset($response->success) && $response->success) {
$solved_capache = true;
} else {
$messages = new Illuminate\Support\MessageBag();
$messages->add('You must prove you are human ', " <b>Capache Error</b>");
Session::flash('ShowReturnPanel', true);
Session::flash('SearchError', true);
return Redirect::to('/')->withErrors($messages);
}
session::forget('Step3Completed');
$search = $this->leadtracapi->FindClientByLastNameAndEmail($lastname, $email);
if (!$search) {
//Show the page & add errors!
Session::flash('ShowReturnPanel', true);
Session::flash('SearchError', true);
Session::forget('fileNumber');
} else {
Session::put('fileNumber', $search);
// lets see if they are upgrading/updating their profile (see if they have paid for anything.)
$client = $this->GetClientFromSession(true);
$upgrade = array('100% Payments Received', 'Process Payments');
session::put('Step3Completed', true);
}
// register their browser id so that this is the primary one editing the file
$this->System_Register_With_Clients_BrowserID();
// run step 1, step 2.
Session::flash('dont_auto_logout', true);
return Redirect::to('/');
}