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


PHP Company::update方法代码示例

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


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

示例1: update

 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(Request $request, Company $company)
 {
     $input = array_except(Input::all(), '_method');
     $company->update($input);
     Session::flash('flash_message', 'Company updated successfully!');
     return Redirect::route('company.index')->with('message', 'Company updated');
 }
开发者ID:stoic1979,项目名称:laravel_trucks,代码行数:14,代码来源:CompanyController.php

示例2: store

 /**
  * Store new account
  *
  */
 public function store(Request $request)
 {
     $user = new User();
     $user->name = $request->input('name');
     $user->username = $request->input('username');
     $user->email = $request->input('email');
     $pass = $request->input('password');
     $user->role = 'Owner';
     if (!empty($pass)) {
         $user->password = bcrypt($pass);
     }
     $user->save();
     // Create Company
     $company = new Company();
     $company->name = $request->input('company_name');
     $company->email = $request->input('company_email');
     $company->address1 = $request->input('address1');
     $company->address2 = $request->input('address2');
     $company->city = $request->input('city');
     $company->postcode = $request->input('postcode');
     $company->url = strtolower(str_replace(' ', '', $request->input('company_name')));
     $company->save();
     $user->company_id = $company->id;
     $user->update();
     $company->user_id = $user->id;
     $company->update();
     $settings = new Settings();
     $settings->application_id = 1;
     $settings->references_id = 0;
     $settings->company_id = $company->id;
     $settings->save();
     $refs = new ReferenceFields();
     $refs->settings_id = $settings->id;
     $refs->company_id = $company->id;
     $refs->save();
     $options = new Settings();
     $options->references_id = 1;
     $options->application_id = 0;
     $options->company_id = $company->id;
     $options->save();
     flash()->success('Success', 'Account successfully created');
     return back();
 }
开发者ID:wyrover,项目名称:applications,代码行数:47,代码来源:AdminController.php

示例3: update

 /**
  * Update the specified resource in storage.
  *
  * @param  CompanyRequest   $request
  * @param  Company          $company
  * @return Response
  */
 public function update(CompanyRequest $request, Company $company)
 {
     $company->update($request->all());
     return redirect('quan-tri/cong-ty')->with('flash_message', Lang::get('system.update'));
 }
开发者ID:khanhpnk,项目名称:sbds,代码行数:12,代码来源:CompanyController.php

示例4: update

 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  Developer  $developer
  * @param  StoreDeveloperRequest $validationRequest
  * @return \Illuminate\Http\Response
  */
 public function update(StoreCompanyRequest $request, Company $company)
 {
     $input = array_except(Input::all(), '_method');
     $company->update($input);
     Session::flash('message', 'Company upated');
     return redirect('/company');
 }
开发者ID:figura4,项目名称:c64,代码行数:15,代码来源:CompanyController.php


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