当前位置: 首页>>代码示例>>PHP>>正文


PHP Profile::where方法代码示例

本文整理汇总了PHP中app\Profile::where方法的典型用法代码示例。如果您正苦于以下问题:PHP Profile::where方法的具体用法?PHP Profile::where怎么用?PHP Profile::where使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在app\Profile的用法示例。


在下文中一共展示了Profile::where方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: 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

示例2: 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

示例3: get

 public function get($userId)
 {
     //        $profiles = Profile::find($userId);
     $profiles = Profile::where('userId', $userId)->first();
     return $profiles;
     //        return array('name' => 'Sheldon Nofer');
 }
开发者ID:sheldonnofer,项目名称:laravel-angular,代码行数:7,代码来源:ProfileController.php

示例4: 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

示例5: update

 public function update()
 {
     $profile = Profile::where('user_id', Auth::user()->id)->first();
     $profile->fill(Input::all());
     $profile->save();
     return Redirect::to("/edit_profile");
 }
开发者ID:Volkan61,项目名称:begreat,代码行数:7,代码来源:ProfileController.php

示例6: store

 /**
  * Returns a JSON response of a requested user.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     $user = \App\User::where(['name' => $request['name']])->get();
     $id = $user[0]['id'];
     $articles = \App\Article::where(['user_id' => $id])->get();
     $profile = \App\Profile::where(['user_id' => $id])->get()->first();
     return response()->json(['error' => false, 'user' => $user, 'articles' => $articles, 'profile' => $profile]);
 }
开发者ID:KevinElberger,项目名称:middle-earth,代码行数:14,代码来源:UrlController.php

示例7: 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

示例8: pwtPost

 public function pwtPost()
 {
     $found = false;
     $info = [];
     $akaunPotongan = AkaunPotongan::where('no_gaji', Request::get('no_gaji'))->where('status', 1)->where('perkhidmatan_id', Request::get('perkhidmatan_id'))->get();
     $info = [];
     $kelayakan = true;
     if (!$akaunPotongan->isEmpty()) {
         // This is true for PWT
         // False for repeatative perkhidmatan id
         $akaun = AkaunPotongan::where('no_gaji', Request::get('no_gaji'))->where('status', 1)->where('perkhidmatan_id', Request::get('perkhidmatan_id'))->first();
         $baki = $akaun->baki;
         // Formula tempoh = ceiling(baki / bulanan)
         $bakiTempoh = ceil(number_format($akaun->baki / $akaun->bulanan, 2));
         // LANGSAI
         // Formula :-
         // Langsai = (baki - lebihan kadar) + 6 bulan kadar
         // Lebihankadar = baki tempoh * kadar sebulan;
         $kadarSebulan = $akaun->jumlah * ($akaun->kadar / 100) / 12;
         $lebihanKadar = $bakiTempoh * $kadarSebulan;
         $langsai = $baki - $lebihanKadar + $kadarSebulan * 6;
         // LAYAK
         // Formula :-
         // layak = ???
         $layak = $this->getJumlahLayak(Request::get('no_gaji'));
         $info = [$baki, $bakiTempoh, $langsai, $layak];
         if ($layak < $langsai) {
             $kelayakan = false;
         }
         $found = true;
     }
     //###########################################################################################
     // check if the no_gaji one of ahli komada
     $profile = Profile::where('no_gaji', Request::get('no_gaji'))->get();
     if ($profile->isEmpty()) {
         Session::flash('error', 'Gagal. No Gaji *' . Request::get('no_gaji') . '* tidak didaftarkan sebagai anggota KOMADA.');
         return Redirect::back()->withInput();
     }
     // check wether if the no_gaji active or inactive
     $profile = Profile::where('no_gaji', Request::get('no_gaji'))->where('status', 0)->get();
     // dd('here');
     //###########################################################################################
     if (!$profile->isEmpty()) {
         Session::flash('error', 'Gagal. No Gaji *' . Request::get('no_gaji') . '* tidak aktif.');
         return Redirect::back()->withInput();
     }
     // this to pass profile attribute to the view.
     $profile = Profile::where('no_gaji', Request::get('no_gaji'))->first();
     $yuranTerkumpul = $this->getYuranTerkumpul(Request::get('no_gaji'));
     $layakPinjam = $this->getJumlahLayak(Request::get('no_gaji'));
     $pertaruhan = $this->getJumlahPertaruhan(Request::get('no_gaji'));
     if ($yuranTerkumpul <= 0) {
         Session::flash('error', 'Gagal. No Gaji *' . Request::get('no_gaji') . ' mempunyai yuran terkumpul RM 0.00. Tidak Layak membuat pinjaman.');
         return Redirect::back()->withInput();
     }
     Session::put('no_gaji', Request::get('no_gaji'));
     return View('members.calculator.pwt_calculator', compact('profile', 'akaunPotongan', 'found', 'info', 'akaun', 'kelayakan', 'layakPinjam', 'pertaruhan', 'yuranTerkumpul'));
 }
开发者ID:suhairi,项目名称:komada,代码行数:58,代码来源:CalculatorController.php

示例9: showProfileToUser

 public function showProfileToUser()
 {
     $profile = Profile::where('user_id', Auth::id())->first();
     if (!$profile) {
         return Redirect::route('profile.create');
     }
     $user = Auth::user();
     return view('profile.show', compact('profile', 'user'));
 }
开发者ID:sergiu05,项目名称:laravel5-test,代码行数:9,代码来源:ProfileController.php

示例10: userValidation

 /**
  * @param $id
  * @return mixed
  */
 public function userValidation($id)
 {
     Profile::where('user_id', $id)->update(['certified' => 1]);
     $user = User::find($id);
     Mail::send('auth.validated', [], function ($m) use($user) {
         $m->to($user['email'], $user['name'])->subject('Tu cuenta ha sido validada');
     });
     return '<h1>El usuario sera notificado sobre la validación de su cuenta.</h1>';
 }
开发者ID:VictorAvelar,项目名称:semt,代码行数:13,代码来源:FlowController.php

示例11: indexPost

 public function indexPost()
 {
     $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::back()->withInput();
     }
     return Request::all();
 }
开发者ID:suhairi,项目名称:komada,代码行数:9,代码来源:RoadtaxController.php

示例12: getZonGaji

 protected function getZonGaji($no_gaji)
 {
     $profile = Profile::where('no_gaji', $no_gaji)->first();
     if ($profile != null) {
         return $profile->zon_gaji_id;
     } else {
         return '';
     }
 }
开发者ID:suhairi,项目名称:komada,代码行数:9,代码来源:CetakController.php

示例13: daftarPost

 public function daftarPost()
 {
     if (Request::get('jumlah_pertaruhan') != "0.00") {
         $profile = Profile::where('no_gaji', Request::get('no_gaji'))->first();
         $profile->jumlah_pertaruhan = Request::get('jumlah_pertaruhan');
         $profile->save();
         Session::flash('success', 'Berjaya, Wang Pertaruhan berjaya didaftarkan.');
     }
     return Redirect::route('members.pertaruhan.index');
 }
开发者ID:suhairi,项目名称:komada,代码行数:10,代码来源:PertaruhanController.php

示例14: getUserProfile

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function getUserProfile()
 {
     $user = Auth::user();
     $items = Item::all();
     $profileList = Profile::where('user_id', '=', 1)->lists('characterName', 'id');
     // $request = /* where (useSkills = profile_id)
     //               return [item_id => [tier_id], item_id => [tier_id]] */
     $itemList = useSkill::where('profile_id', '=', 1)->join('items', 'items.id', '=', 'item_id')->join('tiers', 'tiers.id', '=', 'tier_id')->groupBy('items.name')->get(['items.name', 'tiers.tier']);
     return view('profile.profile', compact('items', 'profileList', 'itemList'));
 }
开发者ID:MiikroKimiro,项目名称:lchalbion2,代码行数:15,代码来源:ProfileController.php

示例15: indexPost

 public function indexPost()
 {
     $profile = Profile::where('no_gaji', Request::get('no_gaji'))->first();
     if (empty($profile)) {
         Session::flash('error', 'Gagal. No Gaji *' . Request::get('no_gaji') . '* tidak didaftarkan sebagai anggota KOMADA.');
         return Redirect::back()->withInput();
     }
     // 1. check for outstanding payment for buku sekolah
     // 2.
     return View('members.bukusekolah.form', compact('profile'));
 }
开发者ID:suhairi,项目名称:komada,代码行数:11,代码来源:BukusekolahController.php


注:本文中的app\Profile::where方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。