public function getUserTerrains($id = null)
 {
     $filter = $id ? $id : Auth::user()->id;
     $data = Terrain::where('user_id', $filter)->with('characteristics', 'photos', 'localitate')->get();
     return Response::json(['data' => $data]);
 }
 public function index()
 {
     $terrain = Terrain::where('aprobat', 1)->get();
     return view('buyer.index');
 }