• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Flash\Flash类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: store

 /**
  * Create a new Larabook user
  * @param SaveUserRequest $request
  * @return string
  */
 public function store(SaveUserRequest $request)
 {
     $user = $this->dispatchFrom(RegisterUserJob::class, $request);
     Auth::login($user);
     Flash::overlay("Glad to have you as a new Larabook member!");
     return redirect(route('home'));
 }
开发者ID:WeirdOne1977,项目名称:Larabook-5.1,代码行数:12,代码来源:RegistrationController.php


示例2: destroy

 public function destroy($id)
 {
     $user = User::find($id);
     $user->delete();
     Flash::error('El usuario ' . $user->name . ' ha sido borrado con exito!');
     return redirect()->route('registrar.index');
 }
开发者ID:rikardote,项目名称:agenda,代码行数:7,代码来源:RegistroController.php


示例3: updateTask

 public function updateTask($id)
 {
     $task = Task::find($id);
     $task->update(Input::all());
     Flash::success('Task was updated');
     return redirect()->back();
 }
开发者ID:jdelise,项目名称:career_site,代码行数:7,代码来源:TaskController.php


示例4: storeNode

 /**
  * store nestable node
  *
  * @param $class
  * @param string|null $path
  * @param integer|null $id
  * @throws StoreException
  * @return array
  */
 protected function storeNode($class, $path = null, $id = null)
 {
     DB::beginTransaction();
     try {
         $datas = $this->request->parent != 0 || $this->request->related != 0 ? $this->getDefineDatas($class) : $this->request->all();
         $this->model = $class::create($datas);
         $this->model->setNode($class, $this->request);
         // eğer başka ilişki varsa onları da ekle
         if ($this->opsRelation && !$this->fillModel($this->opsRelation)) {
             throw new StoreException($this->request->all());
         }
         event(new $this->events['success']($this->model));
         DB::commit();
         if (is_null($path)) {
             $attribute = "{$this->name}_uc_first";
             return response()->json(['id' => $this->model->id, 'name' => $this->model->{$attribute}]);
         }
         Flash::success(trans('laravel-modules-base::admin.flash.store_success'));
         return $this->redirectRoute($path);
     } catch (StoreException $e) {
         DB::rollback();
         event(new $this->events['fail']($e->getDatas()));
         if (is_null($path)) {
             return response()->json($this->returnData('error'));
         }
         Flash::error(trans('laravel-modules-base::admin.flash.store_error'));
         return $this->redirectRoute($path);
     }
 }
开发者ID:erenmustafaozdal,项目名称:laravel-modules-base,代码行数:38,代码来源:OperationNodeTrait.php


示例5: destroy

 public function destroy($id)
 {
     $article = Article::find($id);
     $article->delete();
     Flash::error('Se ha borrado el artículo ' . $article->title . ' exitosamente!');
     return redirect()->route('admin.articles.index');
 }
开发者ID:blitzkriegcoding,项目名称:blog_cf,代码行数:7,代码来源:ArticlesController.php


示例6: submit

 public function submit(Request $request)
 {
     //dd(bcrypt('123456'));
     //dd($request->all());
     $user = $this->user;
     $this->validate($request, ['email' => 'required|email', 'password' => 'required|confirmed|min:6']);
     $input = $request->all();
     $findUser = User::where('email', $input['email'])->first();
     //dd($findUser);
     if ($findUser) {
         if ($findUser->id === $user->id) {
             //dd('ok');
             $user->update(['password' => bcrypt($input['password'])]);
             Flash::success('گذرواژه با موفقیت تغییر کرد');
             Auth::logout();
             return redirect(route('xadmin.index'));
         } else {
             Flash::error('اطلاعات وارد شده صحیح نمی باشد');
             return redirect(route('xadmin.index'));
         }
     } else {
         Flash::error('اطلاعات وارد شده صحیح نمی باشد');
         return redirect()->back();
     }
 }
开发者ID:slifer2015,项目名称:tarabar,代码行数:25,代码来源:PasswordController.php


示例7: destroy

 public function destroy($id)
 {
     $horario = Horario::find($id);
     $horario->delete();
     Flash::error('El Horario de ' . $horario->name . ' ha sido borrado con exito!');
     return redirect()->route('horarios.index');
 }
开发者ID:rikardote,项目名称:agenda,代码行数:7,代码来源:HorariosController.php


示例8: destroy

 public function destroy($id)
 {
     $paciente = Paciente::find($id);
     $paciente->delete();
     Flash::error('Paciente ' . $paciente->rfc . ' ha sido borrado con exito!');
     return redirect()->route('pacientes.index');
 }
开发者ID:rikardote,项目名称:agenda,代码行数:7,代码来源:PacientesController.php


示例9: store

 /**
  * Store a newly created resource in storage.
  *
  * @param RegisterRequest $request
  * @param Authenticator   $auth
  * @return Response
  */
 public function store(RegisterUserRequest $request, Authenticator $auth)
 {
     $user = $this->execute($request);
     $auth->login($user);
     Flash::message('Glad to have you as a new Larabook member!');
     return redirect()->route('home');
 }
开发者ID:billwaddyjr,项目名称:Larabook2.0,代码行数:14,代码来源:RegistrationController.php


示例10: store

 public function store(Request $request)
 {
     $input = $request->all();
     $this->dispatch(new StoreUserLessonResultCommand(Auth::id(), $input['lesson_id'], $input['quiz_result']));
     Flash::success('Results Saved');
     return redirect()->back();
 }
开发者ID:jclyons52,项目名称:mycourse-rocks,代码行数:7,代码来源:UserLessonResultController.php


示例11: store

 public function store(Request $request)
 {
     $competitor = new Competitor($request->all());
     $competitor->save();
     Flash::success('Competitor ' . $competitor->name . ' se ha registrado correctamente');
     return view('register.competitor.create');
 }
开发者ID:morinacho,项目名称:TournamentApp,代码行数:7,代码来源:CompetitorController.php


示例12: saveProfile

 public function saveProfile(Request $request)
 {
     $user = Auth::user();
     $user->update($request->all());
     Flash::success('Profil frissítve!');
     return redirect()->to('profile');
 }
开发者ID:enhive,项目名称:vev,代码行数:7,代码来源:UserController.php


示例13: 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


示例14: handle

 /**
  * Check if user belongs to the specified role.
  *
  * @param Request      $request
  * @param Closure      $next
  * @param string|array $roles
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function handle(Request $request, Closure $next, $roles)
 {
     $accessDenied = true;
     if (!($user = $this->auth->getActiveUser())) {
         Flash::error(trans('dashboard::dashboard.flash.access_denied'));
         return redirect()->route('auth.login');
     }
     if (!is_array($roles)) {
         $roles = [$roles];
     }
     foreach ($roles as $role) {
         if (!($role = $this->role->getBySlug($role))) {
             continue;
         }
         if ($user->inRole($role)) {
             $accessDenied = false;
         }
     }
     if ($accessDenied) {
         Flash::error(trans('dashboard::dashboard.flash.access_denied'));
         // Redirect back to the previous page where request was made.
         return redirect()->back();
     }
     return $next($request);
 }
开发者ID:laraflock,项目名称:dashboard,代码行数:34,代码来源:RoleMiddleware.php


示例15: postRegistration

 /**
  * Process Registration
  * @param  EventRegistrationFormRequest $request [description]
  * @return [type]                                [description]
  */
 public function postRegistration(EventRegistrationFormRequest $request)
 {
     $event_id = $request->input('event_id');
     $attendee_email = $request->input('attendee.email');
     $event = $this->eventRepo->findById($event_id);
     if ($event->private) {
         $attendee = $this->guests->findByEmail($attendee_email);
         if ($attendee->isEmpty()) {
             $msg = "We are sorry, you have not yet been added to the guest list.  Please contact the organizer of this event for more info.";
             return redirect()->back()->withInput()->withErrors([$msg]);
         }
     }
     $eventRegistrationValidator = new EventRegistrationValidator($this->eventRepo, $this->attendeeRepository);
     if ($eventRegistrationValidator->noEventCapacity($event_id)) {
         $msg = "We're sorry, the event is now at full capacity.";
         return redirect()->back()->withInput()->withErrors([$msg]);
     }
     $job = new RegisterAttendee($request);
     $this->dispatch($job);
     $attendee = $this->attendeeRepository->findByEventAndEmail($event_id, $attendee_email);
     if (empty($attendee->id)) {
         // Something went wrong if we're in here: the attendee should've been registered
         // To Do: create unique exception classes for unique handling
         throw new Exception("Unable to find Registered Attendee.");
     }
     Flash::success('Thank you! You have been registered! A confirmation email have been sent.');
     return redirect()->route('event.payment', [$event, $attendee]);
 }
开发者ID:dirtyblankets,项目名称:allaccessrms,代码行数:33,代码来源:EventRegistrationController.php


示例16: testACS

 public function testACS(Request $request)
 {
     $mgmtServer = SiteConfig::whereParameter('mgmtServer')->first();
     $apiKey = SiteConfig::whereParameter('apiKey')->first();
     $secretKey = SiteConfig::whereParameter('secretKey')->first();
     foreach (['mgmtServer', 'apiKey', 'secretKey'] as $setting) {
         if (${$setting}->data != $request->{$setting}) {
             ${$setting}->data = $request->{$setting};
             ${$setting}->save();
         }
     }
     try {
         $acs = app('cloudstack');
         if (is_array($acs)) {
             Flash::error($acs['error']);
             return -1;
         }
         $result = $acs->listCapabilities();
         if (isset($result->capability->cloudstackversion)) {
             Flash::success('Successfully contacted management server.');
             return 1;
         } else {
             Flash::error('Unable to contact management server.');
             return -1;
         }
     } catch (\Exception $e) {
         Flash::error($e->getMessage());
         return -1;
     }
 }
开发者ID:1stel,项目名称:stratostack-records-generation,代码行数:30,代码来源:SettingsController.php


示例17: clearCache

 public function clearCache()
 {
     Cache::flush();
     Logs::add('process', "Ön Bellek Temizlendi");
     Flash::success('Ön Bellek Başarıyla Temizlendi');
     return redirect()->route('admin.index');
 }
开发者ID:ringwoodinternet,项目名称:core,代码行数:7,代码来源:ToolsController.php


示例18: destroy

 public function destroy($id)
 {
     $especialidad = Especialidad::find($id);
     $especialidad->delete();
     Flash::error('La especialidad ' . $especialidad->name . ' ha sido borrada con exito!');
     return redirect()->route('especialidades.index');
 }
开发者ID:rikardote,项目名称:agenda,代码行数:7,代码来源:EspecialidadesController.php


示例19: store

 /**
  * Store a newly created resource in storage.
  *
  */
 public function store(Request $request)
 {
     $input = $request->all();
     $this->dispatch(new AddModCommand($input['users'], $input['product_id']));
     Flash::success('Moderator Added');
     return redirect()->back();
 }
开发者ID:jclyons52,项目名称:mycourse-rocks,代码行数:11,代码来源:ModsController.php


示例20: postUpdate

 public function postUpdate($id, Request $request)
 {
     $user = Auth::getUser();
     if ($user->email == $request->get('email')) {
         // user try to change own password
         $validatorRules = ['password' => 'confirmed|min:6'];
     } else {
         // user try another email
         $validatorRules = ['email' => 'required|email|max:255|unique:users', 'password' => 'confirmed|min:6'];
     }
     $this->validate($request, $validatorRules);
     $data = $request->all();
     // password crypt
     if (isset($data['password'])) {
         if (empty($data['password'])) {
             unset($data['password']);
         } else {
             $data['password'] = bcrypt($data['password']);
         }
     }
     $user = User::findOrFail($id);
     $user->update($data);
     Flash::success('Benutzerdaten sind aktualisiert.');
     return redirect()->action('Auth\\EditController@getEdit');
 }
开发者ID:alcodo,项目名称:alpaca,代码行数:25,代码来源:EditController.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP TestDummy\Factory类代码示例发布时间:2022-05-23
下一篇:
PHP lang\XPClass类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap