I'm moving on Laravel
soon, I have name, email and password and wanted to know how do I update this data with a form.
<div class="container">
<div class="row">
<div class="col-md-10 col-md-offset-1">
<div class="panel panel-default">
<div class="panel-heading"><h4>{{ Auth::user()->name }}</h4> </div>
<div class="panel-body">
<form>
<div class="form-group">
<label for="exampleInputPassword1">Editar Nome</label>
<input id="name" type="text" class="form-control" name="name" value="">
</div>
<div class="form-group">
<label for="exampleInputEmail1">Novo E-mail</label>
<input id="email" type="email" class="form-control" name="email" value="">
</div>
<div class="form-group">
<label for="exampleInputPassword1">Nova Senha</label>
<input id="password" type="password" class="form-control" name="password">
</div>
<button type="submit" class="btn btn-default">Atualizar dados</button>
<a href="{{ url('/home') }}"><button type="button" class="btn btn-primary">Voltar</button></a>
</form>
</div>
</div>
</div>
</div>
</div>
Controller
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
class ProfileController extends Controller
{
public function editar()
{
return view('editar');
}
}
I can register a user, log in, but I am in doubt as to how to do this part of updating the person's data.