示例#1
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function getDetail($id)
 {
     $client = Client::find($id);
     $data_clients = DataClient::with("client")->where("client_id", "=", $id)->get();
     return view("clients.detail")->with(array('client' => $client, 'data_client' => $data_clients));
     return redirect()->back();
 }
 /**
  * Display a listing of the resource.
  *
  */
 public function getIndex()
 {
     $clients = DataClient::get();
     foreach ($clients as $client) {
         $client->client_id = $client->id;
         $client->save();
     }
 }