本文整理汇总了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('/');
}
示例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'));
}
示例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();
}
示例4: getInsert
public function getInsert()
{
//インスタンス生成
$profile = new Profile();
$profile->name = "fujimon";
$profile->age = 23;
$profile->detail = "ikemen";
//保存
$profile->save();
}
示例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 и пароль.');
}
示例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 и пароль.');
}
示例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");
}
示例8: getProfile
public function getProfile(Request $request)
{
$id = $request->input('id');
$profile = Profile::find($id);
$profile->delete();
return response()->json(['status' => 'valid']);
}
示例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);
}
}
示例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;
}
示例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');
}
示例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);
}
示例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'));
}
示例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);
}
示例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'));
}