本文整理汇总了PHP中Illuminate\Support\Facades\Session::flash方法的典型用法代码示例。如果您正苦于以下问题:PHP Session::flash方法的具体用法?PHP Session::flash怎么用?PHP Session::flash使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Support\Facades\Session
的用法示例。
在下文中一共展示了Session::flash方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: scopeDate
public function scopeDate($query, $date)
{
if (trim($date) != "") {
$query->where(\DB::raw("CONCAT(date)"), "LIKE", "%{$date}%");
Session::flash('message', 'Fecha:' . ' ' . $date . ' ' . 'Resultado de la busqueda');
}
}
示例2: store
public function store(LocationRequest $request)
{
$location = Location::create($request->all());
Session::flash('success', true);
Session::flash('message', 'Aðgerð tókst: Ný staðsetning');
return Redirect::back();
}
示例3: destroy
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return Response
*/
public function destroy($id)
{
$contact = Contact::findOrFail($id);
$contact->delete();
Session::flash('message', 'Successfully Deleted your Data!');
return redirect()->back();
}
示例4: update
/**
* Update the specified resource in storage.
*
* @param int $id
* @param StoreBankDetailPostRequest $request
* @return Response
*/
public function update(BankDetail $bank, StoreBankDetailPostRequest $request)
{
$input = $request->all();
$bank->fill($input)->save();
Session::flash('flash_message', 'Bank Details successfully Updated!');
return redirect()->back();
}
示例5: store
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Requests\CreatePagoRequest $request)
{
$pago = Pagos::create($request->all());
$message = 'Pago efectuado de: ' . $pago->monto . ' al usuario: ' . $pago->user->first_name . ' ' . $pago->user->last_name;
Session::flash('message', $message);
return Redirect::route('admin.users.index');
}
示例6: TambahJadwal
public function TambahJadwal()
{
$rules = array('unit_id' => 'required', 'kategori' => 'required', 'tglstart' => 'required', 'tglases' => 'required', 'tglfinish' => 'required', 'detail' => 'required');
$messages = array('unit_id.required' => 'Nama Jabatan Harus Terisi', 'kategori.required' => 'Kategori Harus Dipilih', 'tglstart.required' => 'Tanggal Mulai Harus Terisi', 'tglases.required' => 'Tanggal Asessment Harus Terisi', 'tglfinish.required' => 'Tanggal Selesai Harus Terisi', 'detail.required' => 'Detail Harus terisi');
$validasi = validator::make(Input::all(), $rules, $messages);
if ($validasi->fails()) {
return Redirect::back()->withErrors($validasi)->withInput();
} else {
$kat = Input::get('kategori');
if ($kat == 'internal') {
$aa = "in";
} else {
$aa = "ex";
}
DB::transaction(function ($aa) use($aa) {
//asesment promosi
$jadwal = KandidatPromote::create(['unit_staf_id' => Input::get('unit_id'), 'tgl_awal' => Input::get('tglstart'), 'tgl_asesment' => Input::get('tglases'), 'tgl_selesai' => Input::get('tglfinish'), 'detail' => Input::get('detail')]);
//rekrutmen rekap header
$rekap_header = HeaderRekap::create(['id_asesmen' => $jadwal->id, 'kategori' => Input::get('kategori'), 'nama' => Input::get('jabatan'), 'tanggal_awal' => Input::get('tglstart'), 'tanggal_akhir' => Input::get('tglfinish'), 'deksripsi' => Input::get('detail')]);
//asessment promosi daftar
$daftar = KandidatPromosiDaftar::create(['asesment_promosi_id' => $jadwal->id, 'nip' => Input::get('nip'), 'detail' => Input::get('detail')]);
//rekrutment rekap profiling
$profil = ProfilingRekap::create(['id_rekap' => $rekap_header->id, 'kategori' => $aa, 'nip' => $daftar->nip, 'id_jabatan' => $jadwal->unit_staf_id]);
});
Session::flash('message', 'Berhasil Menambahkan Jadwal Asessment');
return Redirect::to('career/jadwal/lihat/asessment');
}
}
示例7: destroy
public function destroy($id, Request $request)
{
Dnschecker::destroy($id);
$message = 'El registro ha sido eliminado con exito';
Session::flash('message', $message);
return $message;
}
示例8: store
public function store()
{
// getting all of the post data
$file = array('image' => Input::file('image'));
$input = Request::all();
$image = $input['image'];
// setting up rules
$rules = array('image' => 'required');
//mimes:jpeg,bmp,png and for max size max:10000
// doing the validation, passing post data, rules and the messages
$validator = Validator::make($image, $rules);
if ($validator->fails()) {
// send back to the page with the input data and errors
return Redirect::to('/')->withInput()->withErrors($validator);
} else {
// checking file is valid.
if (Input::file('image')->isValid()) {
$destinationPath = '/uploads/images';
// upload path
$extension = Input::file('image')->getClientOriginalExtension();
// getting image extension
$fileName = rand(11111, 99999) . '.' . $extension;
// renameing image
Input::file('image')->move($destinationPath, $fileName);
// uploading file to given path
// sending back with message
Session::flash('success', 'Upload successfully');
return Redirect::to('upload');
} else {
// sending back with error message.
Session::flash('error', 'uploaded file is not valid');
return Redirect::to('upload');
}
}
}
示例9: logout
public function logout()
{
Session::flush();
Session::flash('message', 'You have successfully logged out of the system.');
Session::flash('alert-class', 'alert-success');
return Redirect::to('/');
}
示例10: scopeName
public function scopeName($query, $name)
{
if (trim($name) != "") {
$query->where(\DB::raw("CONCAT(name)"), "LIKE", "%{$name}%");
Session::flash('message', 'Nombre:' . ' ' . $name . ' ' . 'Resultado de la busqueda');
}
}
示例11: destroy
public function destroy($id)
{
$page = Page::findOrFail($id);
$page->delete();
Session::flash('delete_page', 'page has been deleted');
return redirect('panel/pages');
}
示例12: logout
public function logout()
{
Session::flush();
Auth::logout();
Session::flash('messages', ["Successfully logged out."]);
return view('front.index');
}
示例13: delete
public function delete($id)
{
$user = usersdb::find($id);
$user->delete();
Session::flash('success', "L'utilisateur {$user->username} a bien été supprimé.");
return Redirect::route('users.index');
}
示例14: destroy
public function destroy($id)
{
$horarios = Horario::find($id);
$horarios->delete();
Session::flash('message', 'El Horario de la fecha ' . $horarios->fecha . ' fue eliminado');
return redirect()->route('Administrador.horarios.index');
}
示例15: update
public function update()
{
$btnStatus = Input::get('btn_sta');
$inputs = Input::get('check');
switch ($btnStatus[0]) {
case 1:
foreach ($inputs as $key => $id) {
DB::table('users')->where('id', $id)->delete();
}
Session::flash('flash_message', "Sukses Menghapus Data !!");
break;
case 2:
foreach ($inputs as $key => $id) {
DB::table('users')->where('id', $id)->update(['hak_akses' => "2"]);
}
Session::flash('flash_message', "Sukses Memperbaharui Status !!");
break;
case 3:
foreach ($inputs as $key => $id) {
DB::table('users')->where('id', $id)->update(['hak_akses' => "3"]);
}
Session::flash('flash_message', "Sukses Memperbaharui Status !!");
break;
default:
break;
}
return redirect('users');
}