Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. {!! Form::model($user, ['method' => 'PATCH','enctype'=>'multipart/form-data','route' => ['user.update', $user->id]]) !!}
  2. //.....
  3. <div class="form-group">
  4. <label for="profil_id">Profile</label>
  5. <input type="text" name="profil_id" class="form-control" value="{{$user->profil->name}}">
  6. <select>
  7. <option></option>
  8. </select>
  9. </div>
  10. <div class="form-group">
  11. <input type="submit" value="Edit" class="btn btn-info">
  12. <a href="{{ route('user.index') }}" class="btn btn-default">Cancel</a>
  13. </div>
  14. {!! Form::close() !!}
  15.  
  16. public function update(UsersRequest $request, $id)
  17. {
  18. $user = Auth::user()->update($request->all());
  19. return redirect()->route('user.index');
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement