first commit
This commit is contained in:
118
resources/views/content/notifications/index.blade.php
Normal file
118
resources/views/content/notifications/index.blade.php
Normal file
@@ -0,0 +1,118 @@
|
||||
@extends('layouts/contentLayoutMaster')
|
||||
|
||||
@section('title', 'Application Notifications')
|
||||
|
||||
@section('vendor-style')
|
||||
{{-- vendor css files --}}
|
||||
<link rel="stylesheet" href="{{ asset(mix('vendors/css/extensions/toastr.min.css')) }}">
|
||||
@endsection
|
||||
|
||||
@section('page-style')
|
||||
{{-- Page Css files --}}
|
||||
<link rel="stylesheet" href="{{ asset(mix('css/base/plugins/extensions/ext-component-toastr.css')) }}">
|
||||
@endsection
|
||||
|
||||
|
||||
@section('content')
|
||||
<!-- Responsive Datatable -->
|
||||
<section id="responsive-datatable">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
@if(@$notifications->count() > 0)
|
||||
<div class="card-datatable table-responsive ">
|
||||
<table class="table" style="background-color: #ffff">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">#</th>
|
||||
<th class="text-center">Title</th>
|
||||
<th class="text-center">Body</th>
|
||||
<th class="text-center">Created At</th>
|
||||
|
||||
<th style="width: 95px">
|
||||
Actions
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@php
|
||||
$i = 1;
|
||||
@endphp
|
||||
@foreach(@$notifications as $notification)
|
||||
<tr>
|
||||
|
||||
<td class="text-center">{{ @$i}}</td>
|
||||
<td class="text-center">{{ @$notification->title}}</td>
|
||||
<td class="text-center"> {{@$notification->body}}</td>
|
||||
<td class="text-center"> {{ date('Y-m-d h:i a',strtotime($notification->created_at)) }}</td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-sm dropdown-toggle hide-arrow"
|
||||
data-bs-toggle="dropdown"
|
||||
aria-expanded="false">
|
||||
<i class="fa-solid fa-ellipsis-vertical"
|
||||
style="margin-right:5px;"></i>
|
||||
</a>
|
||||
<div class="dropdown-menu dropdown-menu-end" style="">
|
||||
<a href="{{route('notification.edit',$notification)}}"
|
||||
class="dropdown-item">
|
||||
<i class="fa-solid fa-file-lines" style="margin-right:5px;"></i>
|
||||
Edit</a>
|
||||
<form action="{{ URL::route('notification.destroy', $notification)}}"
|
||||
method="POST">
|
||||
<input type="hidden" name="_method" value="DELETE">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
<button class="dropdown-item" type="submit"><i
|
||||
class="fa-solid fa-square-pen"
|
||||
style="margin-right:5px;"></i> Delete
|
||||
</button>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@php
|
||||
$i++;
|
||||
@endphp
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@else
|
||||
<div class="card-datatable py-2 px-2">
|
||||
<div class="d-flex justify-content-center">
|
||||
<span class="alert alert-danger">
|
||||
No Record Found
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!--/ Responsive Datatable -->
|
||||
@endsection
|
||||
|
||||
|
||||
@section('vendor-script')
|
||||
{{-- vendor files --}}
|
||||
<script src="{{ asset(mix('vendors/js/extensions/toastr.min.js')) }}"></script>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('page-script')
|
||||
{{-- Page js files --}}
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
toastr.options.timeOut = 10000;
|
||||
@if(session()->has('error'))
|
||||
toastr.error('{{ session('error') }}');
|
||||
@elseif(session()->has('success'))
|
||||
toastr.success('{{ session('success') }}');
|
||||
@endif
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user