Commit d56faf0d authored by Wudtichai Chumsangchotsagun's avatar Wudtichai Chumsangchotsagun
Browse files

test

No related merge requests found
Showing with 5 additions and 2 deletions
+5 -2
......@@ -41,6 +41,9 @@ class PostController extends Controller
*/
public function store(StorePostRequest $request)
{
$data = $request->all();
$post = Post::create($data);
if ($request->hasFile('image') && $request->file('image')->isValid()) {
$path = $request->file('image')->getRealPath();
$mime_type = $request->file('image')->getClientOriginalExtension();
......
......@@ -39,13 +39,13 @@
<div class="panel-heading panel-feed">
<div class="col-xs-1 clear-padding">
<div class="feed-profile">
<img src="{{ $post->user->image }}" alt="profile image {{ $post->user->firstname }}" class="img-circle">
</div>
</div>
<div class="col-xs-6 feed-username">
<p class="text-left">
{{ $post->user->firstname . ' ' . $post->user->lastname }}
</p>
<small class="text-left date">{{ $post->updated_at->diffForHumans() }}</small>
</div>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment