@extends('layouts.student.studentlayout') @section('content')

{{$title}}

{!! $thread->subject !!}

@foreach($thread->messages as $message)
{!! $message->user->name !!}
{!! $message->user->name !!}

{!! $message->body !!}

Posted {!! $message->created_at->diffForHumans() !!}
@endforeach

Add a new message

{!! Form::open(['route' => ['messages.update', $thread->id], 'method' => 'PUT']) !!}
{!! Form::textarea('message', null, ['class' => 'form-control']) !!}
@if($users->count() > 0)
@foreach($users as $user) {!! $user->name !!} @endforeach
@endif
{!! Form::submit('Submit', ['class' => 'btn btn-primary form-control']) !!}
{!! Form::close() !!}
@stop