Support the ongoing development of Laravel.io →
Input Database Eloquent
Last updated 2 years ago.
0

What does the User model look like?

0
<?php use Illuminate\Auth\UserTrait; use Illuminate\Auth\UserInterface; use Illuminate\Auth\Reminders\RemindableTrait; use Illuminate\Auth\Reminders\RemindableInterface; class User extends Eloquent implements UserInterface, RemindableInterface { protected $fillable = array('email', 'username', 'password', 'password_temp', 'code', 'active'); use UserTrait, RemindableTrait; /** * The database table used by the model. * * @var string */ protected $table = 'users'; /** * The attributes excluded from the model's JSON form. * * @var array */ protected $hidden = array('password', 'remember_token'); } ?>
Last updated 9 years ago.
0

Your code looks ok for me. You could use

 Auth::id() 

as an shorter way to get the current User ID by the way.

Your written code does not produce any SQL. So please show your "update" code. I cannot understand what you mean with "if I try to submit ... "

0

iwen65 said:

Your code looks ok for me. You could use

Auth::id() 

as an shorter way to get the current User ID by the way.

Your written code does not produce any SQL. So please show your "update" code. I cannot understand what you mean with "if I try to submit ... "

I meant submitting with the 'submit' input type, in this code

@extends('layout.main')

@section('content')

<form action={{URL::route('account-confirm-change-email-post')}} method='post'> <div class='field'> <p> New Email Adress: <input type='text' name='new_email'></p> @if($errors->has('new_email')) {{$errors->first('new_email')}} @endif </div> <input type='submit' value='Set Email'> {{Form::token()}} </form>

@stop

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.