@extends('admin.layouts.master') @section('content')

Plans List

@if(session()->has('success'))
{{ session()->get('success') }}
@endif @if(session()->has('error'))
{{ session()->get('error') }}
@endif
@php function yearfm($months, $interval){ if($months == '1' && $interval == 'week'){ return '1 Week'; } $str = ''; if(($y = round(bcdiv($months, 12)))){ $str .= "$y Year".($y-1 ? 's' : null); }if(($m = round($months % 12))){ $str .= ($y ? ' ' : null)."$m Month".($m-1 ? 's' : null); } return empty($str) ? false : $str; } @endphp @foreach($plans as $key=>$row) @endforeach
Plan Id Package Name Price Type Period Action
{{$row->id}} {{($row->package)?$row->package->title:"N/A"}} {{$row->plan_name}} {{$row->price}} {{(($row->plan_type == 0) ? 'Regular' : (($row->plan_type == 1) ? 'Company' : 'Partner') )}} {{ yearfm( $row->plan_period, $row->interval ) }}
{{ method_field('DELETE') }} {{ csrf_field() }}
@endsection