The
back
function generates a redirect HTTP response to the user's previous location:<?php return back($status = 302, $headers = [], $fallback = '/');
return back();
<?php $this->tokenData = session('statamic:protect:password.tokens.'.request('token'));
if (! $this->tokenData) {
return back()->withErrors(['token' => 'Invalid or expired token.'], 'passwordProtect');
}
$guard = new Guard($this->getScheme());
<?php $guard = new Guard($this->getScheme());
if (! $guard->check($this->password)) {
return back()->withErrors(['password' => 'Incorrect password.'], 'passwordProtect');
}
return $this
<?php $redirect = $request->has('_redirect')
? redirect($request->input('_redirect'))
: back();
return $request->wantsJson()
? new JsonResponse(['message' => trans($response)], 200)
<?php {
$redirect = $request->has('_error_redirect')
? redirect($request->input('_error_redirect'))
: back();
if ($request->wantsJson()) {
throw ValidationException::withMessages([
<?php DuplicateIdRegenerated::dispatch();
return back()->with('success', __('ID regenerated and Stache cleared'));
}
private function getStoreByPath(string $path)
<?php ]);
if (Facades\Fieldset::find($request->handle)) {
return back()->withInput()->with('error', __('A fieldset with that name already exists.'));
}
$fieldset = (new Fieldset)
<?php {
session()->put('statamic.cp.selected-site', $handle);
return back()->with('success', 'Site selected.');
}
}
<?php $this->clearApplicationCache();
$this->clearImageCache();
return back()->withSuccess(__('All caches cleared.'));
}
protected function clearStacheCache()
<?php {
Stache::refresh();
return back()->withSuccess(__('Stache cleared.'));
}
protected function clearStaticCache()
<?php {
app(StaticCacher::class)->flush();
return back()->withSuccess(__('Static page cache cleared.'));
}
protected function clearApplicationCache()
<?php return back()->withSuccess(__('Application cache cleared.'));
}
protected function clearImageCache()
<?php {
Artisan::call('statamic:glide:clear');
return back()->withSuccess(__('Image cache cleared.'));
}
}
<?php Mail::to($request->email)->send(new Test);
return back()->withSuccess(__('Test email sent.'));
}
}
<?php {
Git::commit();
return back()->withSuccess(__('Content committed'));
}
}
<?php Search::index($index)->update();
});
return back()->withSuccess(__('Indexes successfully updated.'));
}
}