@extends('layouts.master') @section('title') Campaign Management @endsection @section('css') @endsection @section('content') @component('common-components.breadcrumb') @slot('title') @endslot @slot('add_btn')

@can('Campaign Create') {{-- @canany(['Admin-Users Edit','Admin-Users View','Admin-Users Delete']) --}} Add Campaign @endcan

@endslot @endcomponent
@if ($notification = Session::get('error'))
{{ $notification }}
@endif @if ($notification = Session::get('success'))
{{ $notification }}
@endif
@php $rowCount = 1; $numItems = count($facebook_campaign); @endphp @foreach($facebook_campaign as $key => $row) @if($numItems % 2 != 0 && $rowCount == $numItems) @else @endif @if($rowCount != 0 && $rowCount % 2 == 0) @else @endif @endforeach
# #
@if(!empty($row['campaign']->cover_photo)) @else @php $text = preg_match('@(https?://([-\w\.]+)+(:\d+)?(/([-\w/_\.]*(\?\S+)?)?)?)@', $row['campaign']->facebook_image_url); @endphp @if($text == 1) @else @endif @endif
{{ $row['campaign']->title != "" ? $row['campaign']->title : implode(' ', array_slice(str_word_count($row['campaign']->facebook_post_title,2),0,7))}}

{!! $row['campaign']->description !!}

@if (Auth::user()->role == 1)

Campaign created by - {!! $row['campaign']->name !!}

@endif @php $j = 0; @endphp
@foreach ( $row['donor'] as $donor) @if($j == 5) @php break; @endphp @endif @if(!$donor->profile_pic) @else @endif @php $j++; @endphp @endforeach
  • @if (!$row['campaign']->title || $row['campaign']->facebook_post_title) Posted @else @php $now = Carbon::now(); $event_date = $row['campaign']->event_datetime; if($event_date == ''){ $event_date = $row['campaign']->created_at; } $today_dt = new DateTime($now); $expire_dt = new DateTime($event_date); if($expire_dt > $today_dt){ echo 'Pending'; }else{ echo 'Completed'; } @endphp @endif
  • {{date('m-d-Y h:m A', strtotime($row['campaign']->created_at))}}
  • 0
@php $rowCount1 = 1; $numItems1 = count($instagram_campaign); @endphp @foreach($instagram_campaign as $key1 => $row1) @if($key1+1 == $numItems1) @else @endif @if($rowCount1 != 0 && $rowCount1 % 2 == 0) @else @endif @endforeach
# #
@if(empty($row1['campaign']->image_url)) @else @endif
@if (!$row1['campaign']->title)
Instagram Post

{!! $row1['campaign']->caption !!}

@endif
@foreach ( $row1['donor'] as $donor) @if(!$donor->profile_pic) @else @endif @endforeach
  • @if (!$row1['campaign']->title) Posted @else @endif
  • {{date('m-d-Y h:m A', strtotime($row1['campaign']->created_at))}}
  • 0
@endsection @section('script') @endsection