<?php
namespace App\Http\Controllers\API;
use Illuminate\Http\Request; 
use App\Http\Controllers\Controller; 
use Illuminate\Support\Facades\Auth; 
use App\Models\TermCondition;

class TermsConditionsController extends Controller {
    
    public function index(Request $request)
    {
        $type = request('type');
        
        $termCondition   = TermCondition::select('title', 'description')->where('type', $type)->first();
        $termCondition->title = '';
        
        $termCondition->description .= '<style>
        li {
            display:inline-block;
            border:1px solid red !important;
        }
        </style>';
        
        return response()->json([
            'success' => 1,
            'data' => $termCondition
        ], 200);
    }
    
}