Istoric document

@php $history = DB::select('select *, u.name as uname from document_history dh inner join users u on dh.user_id=u.id where document_id='.$record->id.' order by dh.created_at desc'); foreach($history as $h) { $comm = json_decode($h->comments); echo '
'.strtoupper($h->action).' - '.$h->uname.' ('.$h->created_at.'):
'; if($h->action=='adaugat') if(isset($comm->file)) echo 'Fisier nou adaugat'; if($h->action=='updatat') if(isset($comm->msg)) echo $comm->msg; echo '
'; } @endphp