Пример #1
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $facturi = Facturis::findOrFail($id);
     $cl = explode(',', $facturi->idclient);
     $client = Clientis::where('id', $facturi->idclient)->lists('nume', 'id');
     $clienti = Clientis::whereNotIn('id', $cl)->lists('nume', 'id');
     $datefactura = Facturiproduses::where('idfactura', $id)->get();
     return view('administrare.pages.facturi.edit', compact('facturi'))->with('client', $client)->with('clienti', $clienti)->with('datefactura', $datefactura)->with('count', count($datefactura));
 }
Пример #2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     Clientis::destroy($id);
     return redirect('admin/clienti');
 }