|
@@ -20,7 +20,9 @@ class UserController extends Controller
|
|
|
}
|
|
|
|
|
|
public function showLast(User $id){
|
|
|
- return $id->lastCoordinates;
|
|
|
+ $koordinata = $id->lastCoordinates;
|
|
|
+ //return $id->lastCoordinates;
|
|
|
+ return view('lastposition',compact('koordinata'));
|
|
|
}
|
|
|
|
|
|
|
|
@@ -33,10 +35,10 @@ class UserController extends Controller
|
|
|
|
|
|
|
|
|
public function userdata(User $id, $date) {
|
|
|
-
|
|
|
-
|
|
|
- return $id->locations()->whereDate('created_at', $date)->get();
|
|
|
-
|
|
|
-
|
|
|
+ //$dates = [];
|
|
|
+ $dates = $id->locations()->whereDate('created_at', $date)->get();
|
|
|
+ //return $id->locations()->whereDate('created_at', $date)->get();
|
|
|
+ return view('userdate',compact('dates'));
|
|
|
+ //return $dates[0]["lat"]." ".$dates[0]["lng"];
|
|
|
}
|
|
|
}
|