Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- callAjax("http://page.app/serial?" + Date["now"](), function (a) {
- console["log"]("resultcheck", a);
- try {
- a = JSON["parse"](a)
- } catch (e) {};
- g["freeBussy"] = false;
- // Aqui verrifico el id
- if (b == a["id"]) {
- g["setstatus"](true, a["id"], f);
- return c(true)
- };
- g["setstatus"](false, null, f);
- return c(false)
- }
- {"id":2,"email":"user1@gmail.com","name":"User example 1","online":0}
- [
- {"id":2,"email":"user3@gmail.com","name":"User example 3","c":false},
- {"id":2,"email":"user2@gmail.com","name":"User example 2","c":false},
- {"id":1,"email":"user1@gmail.com","name":"User Example 1","c":false}
- ]
- public function serial(Request $request){
- $users = User::select('id','email','name','online')->where('status','=','1')
- ->orderBy('id','DESC')
- ->get();
- return response()->json($users);
- }
- callAjax("http://page.app/serial?" + Date["now"](), function (a) {
- console["log"]("resultcheck", a);
- try {
- a = JSON["parse"](a)
- } catch (err) {console.log(err)};
- g["freeBussy"] = false;
- // Aqui verrifico el id
- a.forEach(function(a) {
- if (b == a["id"]) {
- g["setstatus"](true, a["id"], f);
- return c(true)
- };
- });
- g["setstatus"](false, null, f);
- return c(false)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement