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


PHP Profile::all方法代码示例

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


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

示例1: management

 public function management()
 {
     if (Auth::user()) {
         $profiles = Profile::all();
         return view('profile.management', compact('profiles'));
     }
 }
开发者ID:rereyossi,项目名称:hairstuation,代码行数:7,代码来源:ProfileController.php

示例2: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     ProfileCategory::create(['id' => 1, 'nama' => 'AHLI BIASA', 'catatan' => '']);
     ProfileCategory::create(['id' => 2, 'nama' => 'PPK', 'catatan' => '']);
     ProfileCategory::create(['id' => 3, 'nama' => 'YPPPM', 'catatan' => 'Y']);
     ProfileCategory::create(['id' => 4, 'nama' => 'SPPM', 'catatan' => 'S']);
     ProfileCategory::create(['id' => 5, 'nama' => 'KOMADA', 'catatan' => '']);
     ProfileCategory::create(['id' => 6, 'nama' => 'PELADANG MART', 'catatan' => 'PM']);
     $profiles = Profile::all();
     foreach ($profiles as $profile) {
         $no_anggota = (int) $profile->no_anggota;
         if ($no_anggota != 0) {
             $profile->profile_category_id = 1;
             $profile->save();
         }
         if (strpos($profile->no_anggota, 'Y') !== false) {
             $profile->profile_category_id = 3;
             $profile->save();
         }
         if (strpos($profile->no_anggota, 'S') !== false) {
             $profile->profile_category_id = 4;
             $profile->save();
         }
         if (strpos($profile->no_anggota, 'PM') !== false) {
             $profile->profile_category_id = 6;
             $profile->save();
         }
         if (strpos($profile->no_anggota, 'A') !== false || strpos($profile->no_anggota, 'B') !== false || strpos($profile->no_anggota, 'C') !== false || strpos($profile->no_anggota, 'F') !== false) {
             $profile->profile_category_id = 2;
             $profile->save();
         }
     }
 }
开发者ID:suhairi,项目名称:komada,代码行数:38,代码来源:UserTableSeeder3.php

示例3: index

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     if (Gate::denies('admin')) {
         abort(403);
     }
     $profiles = Profile::all();
     return view('profiles.index', ['profiles' => $profiles]);
 }
开发者ID:diit,项目名称:e74-alpha,代码行数:13,代码来源:ProfileController.php

示例4: index

 public function index()
 {
     $yuranTambahans = Yurantambahan::where('created_at', 'like', Carbon::now()->format('Y') . '%')->orderBy('created_at', 'asc')->get();
     $yuranBulanans = Yuran::where('bulan_tahun', 'like', Carbon::now()->format('m-Y') . '%')->get();
     $sumbangan = Sumbangan::lists('nama', 'id');
     $totalAnggota = Profile::all()->count();
     $totalAnggotaAktif = Profile::where('status', 1)->count();
     $totalAnggotaXAktif = Profile::where('status', 0)->count();
     $totalAnggotaBaru = Profile::where('status', 1)->where('tarikh_ahli', 'like', Carbon::now()->format('Y-m') . '%')->count();
     $totalYuran = Yuran::where('bulan_tahun', 'like', Carbon::now()->format('m-Y') . '%')->count();
     $count = ['totalAnggota' => $totalAnggota, 'totalAnggotaAktif' => $totalAnggotaAktif, 'totalAnggotaXAktif' => $totalAnggotaXAktif, 'totalAnggotaBaru' => $totalAnggotaBaru, 'totalYuran' => $totalYuran];
     $totalTambahan = 0.0;
     return View('members.yuran', compact('yuranTambahans', 'yuranBulanans', 'count', 'totalTambahan', 'sumbangan'));
 }
开发者ID:suhairi,项目名称:komada,代码行数:14,代码来源:YuranController.php

示例5: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     User::create(array('name' => 'Suhairi Abdul Hamid', 'email' => 'suhairi81@gmail.com', 'password' => Hash::make('suhairi')));
     User::create(array('name' => 'Nona Azizah', 'email' => 'azizah@gmail.com', 'password' => Hash::make('azizah')));
     Perkhidmatan::create(array("nama" => "WANG TUNAI"));
     Perkhidmatan::create(array("nama" => "BUKU SEKOLAH"));
     Perkhidmatan::create(array("nama" => "CUKAI JALAN"));
     Perkhidmatan::create(array("nama" => "INSURANS"));
     Perkhidmatan::create(array("nama" => "TAYAR / BATERI"));
     Perkhidmatan::create(array("nama" => "KECEMASAN"));
     Startup::create(['id' => 1, 'nama' => 'YURAN', 'nilai' => '4184963.80', 'created_at' => \Carbon\Carbon::now(), 'updated_at' => \Carbon\Carbon::now()]);
     Startup::create(['id' => 2, 'nama' => 'TKA', 'nilai' => '90721.52', 'created_at' => \Carbon\Carbon::now(), 'updated_at' => \Carbon\Carbon::now()]);
     Startup::create(['id' => 3, 'nama' => 'BIASA', 'nilai' => '00.00', 'created_at' => \Carbon\Carbon::now(), 'updated_at' => \Carbon\Carbon::now()]);
     Startup::create(['id' => 4, 'nama' => 'PERTARUHAN', 'nilai' => '00.00', 'created_at' => \Carbon\Carbon::now(), 'updated_at' => \Carbon\Carbon::now()]);
     Startup::create(['id' => 5, 'nama' => 'TAYAR / BATERI', 'nilai' => '00.00', 'created_at' => \Carbon\Carbon::now(), 'updated_at' => \Carbon\Carbon::now()]);
     Startup::create(['id' => 6, 'nama' => 'INSURANS', 'nilai' => '00.00', 'created_at' => \Carbon\Carbon::now(), 'updated_at' => \Carbon\Carbon::now()]);
     Tka::create(['id' => 1, 'jumlah' => 6.0, 'status' => 1, 'created_at' => \Carbon\Carbon::now(), 'updated_at' => \Carbon\Carbon::now()]);
     Sumbangan::create(['id' => 1, 'nama' => 'Sumbangan Kematian']);
     Sumbangan::create(['id' => 2, 'nama' => 'Sumbangan IPTA']);
     Sumbangan::create(['id' => 3, 'nama' => 'Sumbangan Bencana']);
     Zon::create(['kod' => '01', 'nama' => 'BAHAGIAN KHIDMAT PENGURUSAN']);
     Zon::create(['kod' => '02', 'nama' => 'BAHAGIAN INDUSTRI PADI']);
     Zon::create(['kod' => '03', 'nama' => 'BAHAGIAN INDUSTRI PADI DAN BUKAN PADI']);
     Zon::create(['kod' => '04', 'nama' => 'BAHAGIAN PENGURUSAN INSTITUSI LADANG']);
     Zon::create(['kod' => '05', 'nama' => 'BAHAGIAN PERANCANGAN DAN TEKNOLOGI MAKLUMAT']);
     Zon::create(['kod' => '06', 'nama' => 'BAHAGIAN PENGURUSAN EMPANGAN DAN SUMBER AIR']);
     Zon::create(['kod' => '07', 'nama' => 'BAHAGIAN PENGAIRAN DAN SALIRAN']);
     Zon::create(['kod' => '08', 'nama' => 'BAHAGIAN KHIDMAT MEKANIKAL DAN INFRASTRUKTUR']);
     Zon::create(['kod' => '09', 'nama' => 'PERKHIDMATAN MEKANIKAL']);
     Zon::create(['kod' => '10', 'nama' => 'BAHAGIAN PENGURUSAN WILAYAH']);
     Zon::create(['kod' => '11', 'nama' => 'WILAYAH 1']);
     Zon::create(['kod' => '12', 'nama' => 'WILAYAH 2']);
     Zon::create(['kod' => '13', 'nama' => 'WILAYAH 3']);
     Zon::create(['kod' => '14', 'nama' => 'WILAYAH 4']);
     Zon::create(['kod' => '20', 'nama' => 'BAYARAN SENDIRI']);
     Jantina::create(['nama' => 'LELAKI']);
     Jantina::create(['nama' => 'PEREMPUAN']);
     Status::create(['nama' => 'AKTIF']);
     Status::create(['nama' => 'PENCEN']);
     Status::create(['nama' => 'TIDAK AKTIF']);
     Status::where('id', 3)->update(['id' => 0]);
     Takaful::create(['jumlah' => '10.00', 'status' => 1]);
     ProfileCategory::create(['id' => 1, 'nama' => 'AHLI BIASA', 'catatan' => '']);
     ProfileCategory::create(['id' => 2, 'nama' => 'PPK', 'catatan' => '']);
     ProfileCategory::create(['id' => 3, 'nama' => 'YPPPM', 'catatan' => 'Y']);
     ProfileCategory::create(['id' => 4, 'nama' => 'SPPM', 'catatan' => 'S']);
     ProfileCategory::create(['id' => 5, 'nama' => 'KOMADA', 'catatan' => '']);
     ProfileCategory::create(['id' => 6, 'nama' => 'PELADANG MART', 'catatan' => 'PM']);
     $profiles = Profile::all();
     foreach ($profiles as $profile) {
         $no_anggota = (int) $profile->no_anggota;
         if ($no_anggota != 0) {
             $profile->profile_category_id = 1;
             $profile->save();
         }
         if (strpos($profile->no_anggota, 'Y') !== false) {
             $profile->profile_category_id = 3;
             $profile->save();
         }
         if (strpos($profile->no_anggota, 'S') !== false) {
             $profile->profile_category_id = 4;
             $profile->save();
         }
         if (strpos($profile->no_anggota, 'PM') !== false) {
             $profile->profile_category_id = 6;
             $profile->save();
         }
         if (strpos($profile->no_anggota, 'A') !== false || strpos($profile->no_anggota, 'B') !== false || strpos($profile->no_anggota, 'C') !== false || strpos($profile->no_anggota, 'F') !== false) {
             $profile->profile_category_id = 2;
             $profile->save();
         }
     }
 }
开发者ID:suhairi,项目名称:komada,代码行数:78,代码来源:UserTableSeeder.php

示例6: editTeam

 public function editTeam($id)
 {
     $expedition = Expedition::findOrFail($id);
     $profiles = Profile::all();
     return view('admin.expeditions.team')->with(compact('expedition', 'profiles'));
 }
开发者ID:michaeljoyner,项目名称:expeditionists,代码行数:6,代码来源:ExpeditionsController.php

示例7: index

 public function index()
 {
     $profiles = Profile::all();
     return $profiles;
 }
开发者ID:sheldonnofer,项目名称:laravel-angular,代码行数:5,代码来源:ProfileController.php

示例8: index

 public function index()
 {
     return Profile::all();
 }
开发者ID:joseferrao,项目名称:15-hangout-laravel-brasil,代码行数:4,代码来源:ProfileRepository.php

示例9: edit

 public function edit($id)
 {
     $anggota = [];
     // $anggota['aktif']
     $profiles = Profile::where('status', 1)->count();
     $active = $profiles;
     // $anggota['inactive']
     $inactive = Inactive::where('updated_at', 'like', Carbon::now()->format('Y') . '%')->where('status', 1)->count();
     // $anggota['keseluruhan']
     $profiles = Profile::all();
     $keseluruhan = $profiles->count();
     $max = 0;
     foreach ($profiles as $profile) {
         $profile->no_anggota = (int) $profile->no_anggota;
         if ($profile->no_anggota != 0 && $profile->no_anggota > $max) {
             $max = $profile->no_anggota;
         }
     }
     $anggota = ['keseluruhan' => $keseluruhan, 'aktif' => $active, 'inactive' => $inactive, 'no_akhir' => $max];
     $profile = Profile::where('no_gaji', $id)->first();
     $status = ['1' => 'AKTIF', '0' => 'TIDAK AKTIF', '2' => 'PENCEN'];
     $zon = Zon::lists('nama', 'kod');
     $jantina = Jantina::lists('nama', 'id');
     return View('members.profile.edit', compact('profile', 'status', 'anggota', 'zon', 'jantina'));
 }
开发者ID:suhairi,项目名称:komada,代码行数:25,代码来源:ProfileController.php

示例10: showProfile

 public function showProfile()
 {
     $profile = Profile::all();
     return view('MaintenanceProfile', array('profiles' => $profile));
 }
开发者ID:JordanRodriguezU,项目名称:classroom_management,代码行数:5,代码来源:UserController.php


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