当前位置: 首页>>代码示例>>PHP>>正文


PHP Flash::warning方法代码示例

本文整理汇总了PHP中Laracasts\Flash\Flash::warning方法的典型用法代码示例。如果您正苦于以下问题:PHP Flash::warning方法的具体用法?PHP Flash::warning怎么用?PHP Flash::warning使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Laracasts\Flash\Flash的用法示例。


在下文中一共展示了Flash::warning方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: handle

 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     $roleId = $this->user->getRoleId($this->auth->user()->id);
     $permitted_pages = $this->permitted_page->permittedPages($roleId);
     $is_page = false;
     foreach ($permitted_pages as $k => $page) {
         if (is_numeric($k)) {
             if ($request->is($page)) {
                 $is_page = true;
             }
         }
     }
     if (!$is_page) {
         if ($permitted_pages['access']) {
             return view('backend::_layouts.not_allowed');
         } else {
             if ($permitted_pages['process']) {
                 if ($request->method() != "GET") {
                     Flash::warning('Sayfa Erişim Seviyeniz Bu İşlemi Gerçekleştirmenizi Engelliyor');
                     return redirect()->back();
                 }
             }
         }
     }
     return $next($request);
 }
开发者ID:ringwoodinternet,项目名称:core,代码行数:33,代码来源:PermittedPage.php

示例2: update

 /**
  * Update the specified resource in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update(ProdutoRequest $request, $id)
 {
     $produto = Produto::find($id);
     $produto->update($request->all(), $id);
     Flash::warning('Produto atualizado.');
     return redirect()->route('cadastro.produtos.index');
 }
开发者ID:aureliomachados,项目名称:siscompra,代码行数:13,代码来源:ProdutoController.php

示例3: store

 /**
  * store Contact
  *
  * @param  Business           $business Business that will hold the Contact
  * @param  ContactFormRequest $request  Contact form Request
  * @return Response                     Rendered view or Redirect
  */
 public function store(Business $business, ContactFormRequest $request)
 {
     $this->log->info("BusinessContactController@store: businessId:{$business->id}");
     if (Gate::denies('manageContacts', $business)) {
         abort(403);
     }
     if (trim($request->input('nin'))) {
         $existing_contacts = Contact::whereNotNull('nin')->where(['nin' => $request->input('nin')])->get();
         foreach ($existing_contacts as $existing_contact) {
             $this->log->info("BusinessContactController: store: [ADVICE] Found existing contactId:{$existing_contact->id}");
             if ($existing_contact->isSubscribedTo($business)) {
                 $this->log->info("BusinessContactController: store: [ADVICE] Existing contactId:{$existing_contact->id} is already linked to businessId:{$business->id}");
                 Flash::warning(trans('manager.contacts.msg.store.warning_showing_existing_contact'));
                 return redirect()->route('manager.business.contact.show', [$business, $existing_contact]);
             }
         }
     }
     $contact = Contact::create($request->except('notes', '_token'));
     $business->contacts()->attach($contact);
     $business->save();
     $this->log->info("BusinessContactController@store: Contact created contactId:{$contact->id}");
     $contact->business($business)->pivot->update(['notes' => $request->get('notes')]);
     Flash::success(trans('manager.contacts.msg.store.success'));
     return redirect()->route('manager.business.contact.show', [$business, $contact]);
 }
开发者ID:martinsv,项目名称:timegrid,代码行数:32,代码来源:BusinessContactController.php

示例4: handle

 /**
  * Handle an incoming request.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  \Closure  $next
  * @return mixed
  */
 public function handle($request, Closure $next)
 {
     $roleId = $this->user->getRoleId($this->auth->user()->id);
     $permitted_pages = $this->permitted_page->permittedPages($roleId);
     $is_page = false;
     foreach ($permitted_pages as $k => $page) {
         if (is_numeric($k)) {
             if ($request->is($page)) {
                 $is_page = true;
             }
         }
     }
     if (!$is_page) {
         if ($permitted_pages['access']) {
             return view('backend::_layouts.not_allowed');
         } else {
             if ($permitted_pages['process']) {
                 if ($request->method() != "GET") {
                     Flash::warning(trans('whole::http/middleware.permitted_page_warning'));
                     return redirect()->back();
                 }
             }
         }
     }
     return $next($request);
 }
开发者ID:phpspider,项目名称:core,代码行数:33,代码来源:PermittedPage.php

示例5: postDeleteFriend

 public function postDeleteFriend($id)
 {
     $newUnFriendUser = User::find($id);
     $this->user->unfriend($newUnFriendUser);
     Flash::warning('You unfriended ' . $newUnFriendUser->name);
     return redirect('/');
 }
开发者ID:reportingsjr,项目名称:makerspace-manager,代码行数:7,代码来源:FriendshipController.php

示例6: update

 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(Request $request, $id)
 {
     $tag = Tag::find($id);
     $tag->fill($request->all());
     Flash::warning('El tag se ha modificado con éxito');
     return redirect()->route('admin.tags.index');
 }
开发者ID:eloyespeche,项目名称:BlogLaravelFinal,代码行数:14,代码来源:TagsController.php

示例7: store

 /**
  * store Contact
  *
  * @param  Business           $business Business that will hold the Contact
  * @param  ContactFormRequest $request  Contact form Request
  * @return Response                     Rendered view or Redirect
  */
 public function store(Business $business, ContactFormRequest $request)
 {
     $this->log->info(__METHOD__);
     $this->log->info(sprintf("businessId:%s", $business->id));
     if (Gate::denies('manageContacts', $business)) {
         abort(403);
     }
     //////////////////
     // FOR REFACTOR //
     //////////////////
     if (trim($request->input('nin'))) {
         $existing_contacts = Contact::whereNotNull('nin')->where(['nin' => $request->input('nin')])->get();
         foreach ($existing_contacts as $existing_contact) {
             $this->log->info("  [ADVICE] Found existing contactId:{$existing_contact->id}");
             if ($existing_contact->isSubscribedTo($business)) {
                 $this->log->info("  [ADVICE] Existing contact is already linked to business");
                 Flash::warning(trans('manager.contacts.msg.store.warning_showing_existing_contact'));
                 return redirect()->route('manager.business.contact.show', [$business, $existing_contact]);
             }
         }
     }
     $contact = Contact::create($request->except('notes', '_token'));
     $business->contacts()->attach($contact);
     $business->save();
     $this->log->info("  Contact created contactId:{$contact->id}");
     if ($request->get('notes')) {
         $business->contacts()->find($contact->id)->pivot->update(['notes' => $request->get('notes')]);
     }
     event(new NewRegisteredContact($contact));
     Flash::success(trans('manager.contacts.msg.store.success'));
     return redirect()->route('manager.business.contact.show', [$business, $contact]);
 }
开发者ID:ancchaimongkon,项目名称:timegrid,代码行数:39,代码来源:BusinessContactController.php

示例8: destroy

 public function destroy($id)
 {
     $user = User::find($id);
     $user->delete();
     Flash::warning('El usuario ' . $user->name . ' ha sido eliminado de forma exitosa');
     $users = User::orderBy('id', 'ASC')->paginate(10);
     return view('admin.users.index')->with('users', $users);
 }
开发者ID:Rodieche,项目名称:catalogo_web,代码行数:8,代码来源:UsersController.php

示例9: update

 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(Request $request, $id)
 {
     $user = User::find($id);
     $user->fill($request->all());
     $user->save();
     Flash::warning("El usuario " . $user->name . " ha sido editado con éxito!");
     return redirect()->route('admin.users.index');
 }
开发者ID:SanDroid77,项目名称:Blog-Laravel,代码行数:15,代码来源:UsersController.php

示例10: update

 public function update(CategoryRequest $request, $id)
 {
     $cat = Category::find($id);
     $cat->name = $request->name;
     $cat->save();
     Flash::warning("La Categoría ha sido editada de manera exitosa!");
     return redirect()->route('admin.categories.index');
 }
开发者ID:gratereaux,项目名称:practicing-laravel,代码行数:8,代码来源:CategoriesController.php

示例11: update

 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(Request $request, $id)
 {
     $proyecto = Proyecto::find($id);
     $proyecto->fill($request->all());
     $proyecto->save();
     Flash::warning('El proyecto: ' . $proyecto->titulo . ' ha sido editado con éxito!');
     return redirect()->route('admin.proyectos.index');
 }
开发者ID:pablotebb,项目名称:Agenda,代码行数:15,代码来源:ProyectosController.php

示例12: update

 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(Request $request, $id)
 {
     $estudiofree = Zona_estudio_free::find($id);
     $estudiofree->fill($request->all());
     $estudiofree->save();
     Flash::warning('El apartado de estudio: ' . $estudiofree->titulo . ' ha sido editado con éxito!');
     return redirect()->route('admin.zonaestudiogratis.index');
 }
开发者ID:pablotebb,项目名称:Agenda,代码行数:15,代码来源:Zona_Estudio_FreesController.php

示例13: update

 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(Request $request, $id)
 {
     $category = Category::find($id);
     $category->fill($request->all());
     $category->save();
     Flash::warning('La categoría ' . $category->categorianombre . ' ha sido editada con éxito!');
     return redirect()->route('admin.categories.index');
 }
开发者ID:pablotebb,项目名称:Agenda,代码行数:15,代码来源:CategoriesController.php

示例14: update

 public function update(Request $request, $id)
 {
     $tag = Tag::find($id);
     $tag->fill($request->all());
     $tag->save();
     Flash::warning('El tag : ' . $tag->nombre . ' se actualizo con exito!!!');
     return redirect()->route('admin.tags.index');
 }
开发者ID:kyrayagami,项目名称:proyecto,代码行数:8,代码来源:TagsController.php

示例15: update

 public function update(Request $request, $id)
 {
     $conductor = Conductor::find($id);
     $conductor->fill($request->all());
     $conductor->save();
     Flash::warning('EL conductor : ' . $conductor->nombre . ' se actualizo correctamente!!');
     return redirect()->route('admin.conductores.index');
 }
开发者ID:kyrayagami,项目名称:proyecto,代码行数:8,代码来源:ConductoresController.php


注:本文中的Laracasts\Flash\Flash::warning方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。