<?php

namespace App\Controllers\Client;

use App\Controllers\BaseController;
use App\Models\ServiceModel;

class ServiceController extends BaseController
{
    public function index()
    {
        $model = new ServiceModel();
        $services = $model->where('client_id', session()->get('client_id'))
            ->orderBy('renewal_date', 'ASC')->paginate(15);

        return view('client/services/index', ['services' => $services, 'pager' => $model->pager]);
    }
}
