本文整理汇总了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);
}
示例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');
}
示例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]);
}
示例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);
}
示例5: postDeleteFriend
public function postDeleteFriend($id)
{
$newUnFriendUser = User::find($id);
$this->user->unfriend($newUnFriendUser);
Flash::warning('You unfriended ' . $newUnFriendUser->name);
return redirect('/');
}
示例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');
}
示例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]);
}
示例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);
}
示例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');
}
示例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');
}
示例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');
}
示例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');
}
示例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');
}
示例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');
}
示例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');
}