コード例 #1
0
 public function getProfile()
 {
     $id = Auth::user()->id;
     $user = Policeimmigration::with('rank', 'position', 'role')->where('id', $id)->first();
     if ($user) {
         return $user;
     }
     return response()->json(['error' => true, 'message' => 'ข้อมูลไม่ถูกต้อง!!'], 401);
 }