@extends('layouts.master') @section('page_header') Patients @endsection @section('content')
{{--Success Message--}} @if(session()->has('success'))

Success!

{{session('success')}}

@endif {{--Error Message--}} @if(session()->has('error'))

Error!

{{session('error')}}
@endif {{-- Rows below will now be printed with data tables server side processing --}} @forelse($patients as $patient) @empty @endforelse
ID Name Contact No. Address Age
{{$patient->id}} $patient->id])}}'"> {{$patient->first_name}} {{$patient->last_name?:''}} $patient->id])}}'"> {{$patient->phone}} $patient->id])}}'"> {{$patient->address}} $patient->id])}}'"> {{Utils::getAge($patient->dob)}} @can('delete',$patient) {{-- A modal is used to confirm the delete action. One the modal popup, the url in the form changes according to the patient's id --}} @endcan
@include('patients.modals.addPatient') @include('patients.modals.confirmDelete') {{--Data Tables Scripts--}} {{--//Data Tables--}} @endsection