當前位置: 首頁>>代碼示例>>PHP>>正文


PHP app\Profile類代碼示例

本文整理匯總了PHP中app\Profile的典型用法代碼示例。如果您正苦於以下問題:PHP Profile類的具體用法?PHP Profile怎麽用?PHP Profile使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Profile類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: settingupdate

 public function settingupdate($id, Request $request)
 {
     $accout = DB::table('users')->find($id);
     $user = new Profile();
     $data = array('Address' => $request->input('Address'), 'Contact' => $request->input('Contact'), 'Graduation_Date' => $request->input('Graduation_Date'), 'Comments' => $request->input('Comments'), 'Email' => $request->input('Email'));
     $user->where('id', $accout->profile_id)->update($data);
     return Redirect('/');
 }
開發者ID:kritishpahi,項目名稱:SoftwareEngineering,代碼行數:8,代碼來源:UC.php

示例2: store

 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(ProfileCreateRequest $request)
 {
     $profile = new Profile(['nombre' => $request['nombre'], 'apP' => $request['apP'], 'apM' => $request['apM'], 'telefono' => $request['telefono'], 'fechaNac' => $request['telefono'], 'user_id' => $request['id']]);
     $profile->save();
     $user = User::find($request['id']);
     Session::flash('message', 'Datos ingresados Correctamente');
     return view('profileUsr.profile', compact('user', 'profile'));
 }
開發者ID:behimar,項目名稱:sistema-contabilidad,代碼行數:14,代碼來源:ProfileController.php

示例3: createDefaultUserProfile

 public function createDefaultUserProfile(User $new_user)
 {
     $profile = new Profile();
     $profile->user_id = $new_user->id;
     $profile->about_me = '';
     $profile->profile_image_name = UserController::getDefaultImageName();
     $profile->save();
 }
開發者ID:ebrimamaubeh,項目名稱:utg_bantaba,代碼行數:8,代碼來源:RegisterController.php

示例4: getInsert

 public function getInsert()
 {
     //インスタンス生成
     $profile = new Profile();
     $profile->name = "fujimon";
     $profile->age = 23;
     $profile->detail = "ikemen";
     //保存
     $profile->save();
 }
開發者ID:iiyuda7,項目名稱:laravel5_testing,代碼行數:10,代碼來源:TestController.php

示例5: confirm

 public function confirm($token)
 {
     $confirm = ConfirmUser::where('token', $token)->firstOrFail();
     $user = User::where('email', $confirm->email)->first();
     $user->attachRole(3);
     $user->status = 1;
     $user->save();
     $profile = new Profile();
     $profile->user_id = $user->id;
     $profile->city_id = $confirm->city_id;
     $profile->save();
     $confirm->delete();
     return redirect('auth/login')->with('status', 'Вы успешно потдвердили регистрацию. Теперь войдите в систему используя свой email и пароль.');
 }
開發者ID:AbuLoot,項目名稱:vi,代碼行數:14,代碼來源:CustomAuthController.php

示例6: confirm

 public function confirm($token)
 {
     $confirm = ConfirmUser::where('token', $token)->firstOrFail();
     $user = User::where('email', $confirm->email)->first();
     $user->attachRole(3);
     $user->status = 1;
     $user->save();
     $profile = new Profile();
     $profile->user_id = $user->id;
     $profile->city_id = $confirm->city_id;
     $contacts = ['phone' => null, 'telegram' => null, 'whatsapp' => null, 'viber' => null, 'phone2' => null, 'telegram2' => null, 'whatsapp2' => null, 'viber2' => null];
     $profile->phone = json_encode($contacts);
     $profile->save();
     $confirm->delete();
     return redirect('auth/login')->with('status', 'Вы успешно потдвердили регистрацию. Теперь войдите в систему используя свой email и пароль.');
 }
開發者ID:vizovteam,項目名稱:vizov,代碼行數:16,代碼來源:CustomAuthController.php

示例7: create

 public function create()
 {
     $user = Auth::user();
     // try to find the profile id that matches the user profile
     try {
         $profile = Profile::where('user_id', $user->id)->firstOrFail();
     } catch (ModelNotFoundException $e) {
         // if it fails create profile
         $profile = new Profile();
         $profile->user_id = $user->id;
         $profile->save();
         flash()->overlay('Welcome to Baking Amigo!', 'Now tell us a bit about yourself.', 'info');
     }
     // redirect to the edit page
     return redirect("/users/{$user->id}/edit");
 }
開發者ID:adrianapope,項目名稱:baking-amigo,代碼行數:16,代碼來源:ProfilesController.php

示例8: getProfile

 public function getProfile(Request $request)
 {
     $id = $request->input('id');
     $profile = Profile::find($id);
     $profile->delete();
     return response()->json(['status' => 'valid']);
 }
開發者ID:JordanRodriguezU,項目名稱:classroom_management,代碼行數:7,代碼來源:UserController.php

示例9: multiple

 public function multiple(Request $request)
 {
     if (!$request->has('toCall')) {
         return response()->json(['error' => 'nope'], 400);
     }
     $input = $request->all();
     $toCall = json_decode($input['toCall']);
     foreach ($toCall as $id) {
         $profile = \App\Profile::where('id', '=', $id)->get()->first();
         $post_data = ['From' => '0' . $profile->phone, 'CallerId' => '07930447021', 'Url' => 'http://my.exotel.in/exoml/start/56809', 'CallType' => 'trans'];
         $exotel_sid = 'ruralfuse';
         // Your Exotel SID - Get it here: http://my.exotel.in/Exotel/settings/site#exotel-settings
         $exotel_token = '072f910fe7c604a3aba59c768a78e1d498ba17fe';
         // Your exotel token - Get it here: http://my.exotel.in/Exotel/settings/site#exotel-settings
         $url = "https://" . $exotel_sid . ":" . $exotel_token . "@twilix.exotel.in/v1/Accounts/" . $exotel_sid . "/Calls/connect";
         $ch = curl_init();
         curl_setopt($ch, CURLOPT_VERBOSE, 1);
         curl_setopt($ch, CURLOPT_URL, $url);
         curl_setopt($ch, CURLOPT_POST, 1);
         curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
         curl_setopt($ch, CURLOPT_FAILONERROR, 0);
         curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
         curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data));
         $http_result = curl_exec($ch);
         $error = curl_error($ch);
         $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
         curl_close($ch);
     }
 }
開發者ID:simmimourya1,項目名稱:Ruralfuse_final,代碼行數:29,代碼來源:CallController.php

示例10: getCompletedProfiles

 /**
  * @return mixed
  */
 private function getCompletedProfiles($limit = null)
 {
     $profiles = Profile::completed()->get()->filter(function ($profile) {
         return $profile->hasProfilePic();
     });
     return !is_null($limit) && $profiles->count() > $limit ? $profiles->random($limit) : $profiles;
 }
開發者ID:michaeljoyner,項目名稱:expeditionists,代碼行數:10,代碼來源:PagesController.php

示例11: update

 /**
  * Update the specified resource in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update($id)
 {
     $data = ['first_name' => Input::get('first_name'), 'last_name' => Input::get('last_name'), 'address' => Input::get('address'), 'pin' => Input::get('pin'), 'emirate_id' => Input::get('emirate_id'), 'phone' => Input::get('phone')];
     //          return response()->json($data);
     Profile::find($id)->update($data);
     return redirect('/home');
 }
開發者ID:bluecipherz,項目名稱:gl-ct,代碼行數:13,代碼來源:ProfileController.php

示例12: getPreview

 public function getPreview()
 {
     $profile = Profile::where("user_id", "=", Auth::id())->first();
     if (!$profile) {
         return redirect('/register');
     } else {
         if ($profile->isActive == 1) {
             return redirect('/profile/index/' . $profile->id);
         }
     }
     $photos = [];
     if ($profile->photo1 != "") {
         $photos[] = $profile->photo1;
     }
     if ($profile->photo2 != "") {
         $photos[] = $profile->photo2;
     }
     if ($profile->photo3 != "") {
         $photos[] = $profile->photo3;
     }
     if ($profile->photo4 != "") {
         $photos[] = $profile->photo4;
     }
     if ($profile->photo5 != "") {
         $photos[] = $profile->photo5;
     }
     $data = array('selectedPage' => 2, 'profile' => Profile::where("user_id", "=", Auth::id())->first(), 'user' => Auth::user(), 'pageUrl' => $_ENV['BASE_FB_URL'] . 'profile/index/' . $profile->id, 'photos' => $photos);
     return view('register.preview', $data);
 }
開發者ID:ElasticOrange,項目名稱:canon-orasul-respira-foto,代碼行數:29,代碼來源:RegistrationController.php

示例13: run

 public function run()
 {
     \App\Profile::create(array('userid' => 1, 'about' => 'anurdha is great'));
     \App\Profile::create(array('userid' => 2, 'about' => 'yeah is great'));
     \App\Profile::create(array('userid' => 3, 'about' => 'ret is weak'));
     \App\Profile::create(array('userid' => 4, 'about' => 'pep is beek'));
 }
開發者ID:anuradhacse,項目名稱:UOM-RESOURCE-MANAGER,代碼行數:7,代碼來源:ProfileSeeder.php

示例14: index

 public function index(Request $request)
 {
     $miss = Profile::online()->miss()->orderByVotes()->get();
     $mister = Profile::online()->mister()->orderByVotes()->get();
     $profiles = ['miss' => $miss, 'mister' => $mister];
     return view('guest.home')->with('profiles', $profiles);
 }
開發者ID:antonioiradukunda,項目名稱:missbelge,代碼行數:7,代碼來源:HomeController.php

示例15: noAnggota

 public function noAnggota()
 {
     $profiles = Profile::where('no_gaji', Request::get('no_gaji'))->get();
     if ($profiles->isEmpty()) {
         Session::flash('error', 'Gagal. No Gaji * ' . Request::get('no_gaji') . ' * tidak berdaftar sebagai ahli KOMADA.');
         return Redirect::route('members.index');
     }
     $yurans = Yuran::where('no_gaji', Request::get('no_gaji'))->where('bulan_tahun', 'like', '%' . Carbon::now()->format('Y'))->orderBy('bulan_tahun', 'asc')->get();
     $yuranTambahan = [];
     for ($i = 1; $i <= 12; $i++) {
         if ($i < 10) {
             $bulan = '0' . $i;
         } else {
             $bulan = $i;
         }
         $yuranTambahans = Yurantambahan::where('created_at', 'like', Carbon::now()->format('Y') . '-' . $bulan . '%')->orderBy('created_at', 'asc')->get();
         if ($yuranTambahans->isEmpty()) {
             $yuranTambahan = 0.0;
         } else {
             foreach ($yuranTambahans as $tambahan) {
                 array_push($yuranTambahan, ['bulan' => $bulan, 'no_gaji' => $tambahan->no_gaji, 'nama' => $tambahan->profileName($tambahan->no_gaji), 'catatan' => $tambahan->sumbangan->nama, 'penerima' => $tambahan->penerima, 'tarikh' => $tambahan->tarikh, 'jumlah' => $tambahan->jumlah]);
             }
         }
         if ($i == Carbon::now()->format('m')) {
             $i = 13;
         }
     }
     $bil = 1;
     $biasas = AkaunPotongan::where('no_gaji', Request::get('no_gaji'))->get();
     return View('members.profile', compact('bil', 'profiles', 'yurans', 'yuranTambahan', 'biasas'));
 }
開發者ID:suhairi,項目名稱:komada,代碼行數:31,代碼來源:CarianController.php


注:本文中的app\Profile類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。