@extends('layouts.app', ['pageSlug' => 'TodoBoard']) @section('content')
@php $auth = \Auth::user(); @endphp
All Todos
Add Board @if($auth->role->roleName->role == 'admin') All Boards @endif
@if(isset($boards)) @foreach($boards as $item)
{{ucfirst($item->title)}} ({{$item->todos->where('is_complete','1')->count()}}/{{$item->todos->count()}}) @if($item->is_public == 1) Public @endif
@if($item->assigned_to != null) {{ucfirst($item->user->name)}}, {{ucfirst($item->assignedto->name)}} @endif @if($item->is_public == 1) By {{ucfirst($item->user->name)}} @endif
@if($item->created_by == $auth->id || $auth->role->roleName->role == 'admin')
@endif
@foreach($item->todos as $todo)

{{$todo->task}}

@if($todo->created_by == $auth->id || $auth->role->roleName->role == 'admin') @endif
@endforeach
@endforeach @endif