當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。