Skip to content

Commit

Permalink
Fixes user_id in post update form
Browse files Browse the repository at this point in the history
  • Loading branch information
austintoddj committed Nov 10, 2016
1 parent f1d0dd4 commit be88701
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion resources/views/backend/post/partials/form.blade.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
@if(Request::is('admin/post/create'))
<form class="keyboard-save" role="form" method="POST" id="postCreate" action="{{ route('admin.post.store') }}">
<input type="hidden" name="user_id" value="{{ Auth::user()->id }}">
@else
<form class="keyboard-save" role="form" method="POST" id="postUpdate" action="{{ route('admin.post.update', $id) }}">
<input type="hidden" name="_method" value="PUT">
<input type="hidden" name="user_id" value="{{ $user_id }}">
@endif
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<input type="hidden" name="user_id" value="{{ Auth::user()->id }}">
<div class="row">
<div class="col-md-8">
<div class="card">
Expand Down

0 comments on commit be88701

Please sign in to comment.