@extends('admin.layouts.master')
@section('content')
@if(session()->has('success'))
{{ session()->get('success') }}
@endif
@if(session()->has('error'))
{{ session()->get('error') }}
@endif
| Plan Id |
Package |
Name |
Price |
Type |
Period |
Action |
@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)
| {{$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 ) }} |
|
@endforeach
@endsection