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


PHP Customer::destroy方法代码示例

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


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

示例1: adminDeleteCustomers

 public function adminDeleteCustomers()
 {
     $id = Input::get('javascriptArrayString');
     //if( Customer::find($id)->customerlog )
     $hasRecord = Customer::find($id)->customerlog()->lists('id');
     Customer::destroy($id);
     $data['status'] = 'success';
     $data['message'] = 'Customer\'s record deleted successfully';
     return Response::json($data);
 }
开发者ID:sliekasirdis79,项目名称:POS,代码行数:10,代码来源:AdminCustomerController.php

示例2: destroy

 /**
  * Remove the specified resource from storage.
  * DELETE /customers/{id}
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     Customer::destroy($id);
     return Redirect::route('customers.index')->with('message', 'Deleted customer')->with('alert-class', 'success');
 }
开发者ID:razerbite,项目名称:frisco_foundry,代码行数:12,代码来源:CustomersController.php

示例3: destroy

 /**
  * Remove the specified customer from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     if ($pj = Penjualan::where('customer_id', '=', $id)->first()) {
         $pjid = $pj->id;
         DetailPenjualan::where('penjualan_id', '=', $pjid)->delete();
     }
     Penjualan::where('customer_id', '=', $id)->delete();
     Customer::destroy($id);
     return Redirect::to('admin/customer/tipe/1')->with('message', 'berhasil menghapus customer');
 }
开发者ID:shittyc0de,项目名称:AplikasiLC,代码行数:16,代码来源:CustomersController.php

示例4: delete

 /**
  * Remove the specified resource from storage.
  * DELETE /adminbuildings/{id}
  *
  * @param  int  $id
  * @return Response
  */
 public function delete($id)
 {
     $customer = Customer::find($id);
     $public_path = public_path() . $this->public_path;
     $image_fields = $this->image_fields;
     for ($i = 0; $i < count($image_fields); $i++) {
         if (file_exists($public_path . $customer->{$image_fields}[$i])) {
             File::delete($public_path . $customer->{$image_fields}[$i]);
         }
     }
     Customer::destroy($id);
     return Redirect::back();
 }
开发者ID:syafdia,项目名称:PAS,代码行数:20,代码来源:CustomersController.php

示例5: destroy

 public function destroy($id)
 {
     Customer::destroy($id);
     return Redirect::route('customers_path');
 }
开发者ID:UniquelySimilar,项目名称:order_mgmt_laravel,代码行数:5,代码来源:CustomerController.php

示例6: destroy

 /**
  * Remove the specified customer from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     Customer::destroy($id);
     return Redirect::route('admin.customers.index');
 }
开发者ID:yanguanglan,项目名称:sz,代码行数:11,代码来源:CustomersController.php

示例7: switch

<?php
    $action = $_REQUEST['action'];
    $handler->loadModel('customer_m');
    $customer = new Customer;

    switch ($action){
        case 'read':
            echo $customer->read($_POST);
            break;
        case 'create':
            echo $customer->create($_POST['data']);
            break;
        case 'update':
            echo $customer->update($_POST['data']);
            break;
        case 'destroy':
            echo $customer->destroy($_POST['data']);
            break;            
    }
?>
开发者ID:nenpenthes,项目名称:Ext-PHP,代码行数:20,代码来源:customer_c.php

示例8: destroy

 /**
  * Remove the specified product from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     Customer::destroy($id);
     return Response::json(array('success' => true));
 }
开发者ID:jimmyhien,项目名称:dailyhuuhoc,代码行数:11,代码来源:CustomersController.php


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