예제 #1
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit()
 {
     $User = Auth::user();
     $this->data['User'] = $User;
     $this->data['Countries'] = Country::orderBy('title')->get();
     return view('client.users.edit', $this->data);
 }
예제 #2
0
 public function getCountry()
 {
     try {
         $response = [];
         $statusCode = 200;
         $country = Country::orderBy('country_name', 'ASC')->get();
         foreach ($country as $c) {
             $response[] = ['id' => $c->id, 'country_name' => $c->country_name];
         }
     } catch (Exception $e) {
         $statusCode = 404;
     } finally {
         return Response::json($response, $statusCode);
     }
 }