@section('title', 'My Forms') @extends('layouts.app') @section('content')

My Forms

@include('partials.alert', ['name' => 'index'])
@if ($forms->isEmpty())
You are yet to create any form
@else @php $symbols = App\Form::getStatusSymbols() @endphp @foreach ($forms as $form) @php $symbol = $symbols[$form->status]; $role_symbol = ($form->user_id === $current_user->id) ? ['role' => 'Owner', 'color' => 'success'] : ['role' => 'Collaborator', 'color' => 'primary']; @endphp @endforeach
Form Title Date Created Role Status Actions
{{ $form->title }} {{ $form->created_at->format('jS F, Y') }} {{ $role_symbol['role'] }} {{ $symbol['label'] }} View Edit Delete
@endif
@endsection @section('plugin-scripts') @endsection @section('page-script') @endsection