@extends('layouts.app') @section('title', $communaute->name) @section('content')
@include('communauty.nav')
{!! Form::open([ 'url' => route('post.communaute', $communaute), 'method' => 'post', 'enctype' => 'multipart/form-data' ] ) !!}
{!! Form::hidden('user_id', Auth::id(), []) !!} {!! Form::hidden('communauty_id', $communaute->id, []) !!}
{!! Form::close() !!}
@forelse($posts as $key => $post)
Avatar
@can('admin-post-communauty', $post) {!! Form::open([ 'url' => route('supprimer-post', $post), 'method' => 'delete', 'id' => 'delete'.$key ]) !!} {{ csrf_field() }} {!! Form::close() !!} @endcan {{ $post->user->prenom }} {{ $post->user->nom }}
{{ \Carbon\Carbon::createFromTimeStamp(strtotime($post->created_at))->diffForHumans() }}
{{ $post->contenu }}
@if($post->photo)
Card image cap
@endif
Avatar
@foreach($post->comments as $key1 => $comment)
Avatar
{{ $comment->user->prenom }} {{ $comment->user->nom }} {{$comment->comment}}
{{ \Carbon\Carbon::createFromTimeStamp(strtotime($comment->created_at))->diffForHumans() }}
@can('admin-communauty-comment', $comment) {!! Form::open([ 'url' => route('supprimer-commentaire', $comment), 'method' => 'delete', 'id' => 'deletec'.$comment->id ]) !!} {{ csrf_field() }} {!! Form::close() !!} @endcan
@endforeach
@empty

Soyez le premier à publier dans cette communauté !

@endforelse @if($posts)
{{ $posts->links() }}
@endif
@include('communauty.details') {{-- Informations de la communauté --}}
@endsection @section('script') @endsection