コード例 #1
0
 private function _gen_support($id_client)
 {
     $support = ClientSupport::where("id_client", "=", $id_client)->get();
     $res = [];
     foreach ($support as $c) {
         $res[$c->id_support] = $c->support->nama;
     }
     return $res;
 }
コード例 #2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     //
     $client = Client::find($id);
     $cs = ClientSupport::where('id_client', $id)->delete();
     $user = User::find($client->id_user)->delete();
     $client->delete();
     Session::flash("success", "Success Delete Client");
 }