1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
@extends('master')
@section('content')
<div class="row">
<div class="col-md-12">
<h1>Table of Data</h1>
</div>
<form url="blog" role="search" method="GET">
<div class="col-md-6">
<div class="input-group custom-search-form">
<input type="text" name="search" class="form-control" placeholder="Search ....">
<span class="input-group-btn">
<button type="submit" class="btn btn-default">Search</button>
</span>
</div>
</div>
</form>
</div>
<div class="row">
<table class="table table-striped">
<tr>
<th>No.</th>
<th>Image</th>
<th>Fullname</th>
<th>Sex</th>
<th>ID Number</th>
<th>Birth Date</th>
<th>Province</th>
<th>District</th>
<th>Sector</th>
<th>Actions</th>
</tr>
<a href="{{route('blog.create')}}" class="btn btn-info pull-right">Add new Data</a><br><br>
<?php $no=1; ?>
@foreach($blogs as $blog)
<tr>
<td>{{$no++}}</td>
<td>{{$blog->full_name}}</td>
<td>
<img src="\image\{{$blog->image}}" style="width:100px;height:100px;"></td>
<td>{{$blog->sex}}</td>
<td>{{$blog->id_number}}</td>
<td>{{$blog->birth_date}}</td>
<td>{{$blog->province}}</td>
<td>{{$blog->district}}</td>
<td>{{$blog->sector}}</td>
<td>
<form class="" action="{{route('blog.destroy',$blog->id)}}" method="post">
<input type="hidden" name="_method" value="delete">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<a href="{{route('blog.edit',$blog->id)}}" class="btn btn-primary">Edit</a>
<input type="submit" class="btn btn-danger" onclick="return confirm('Are you sure to delete this data');" name="name" value="delete">
</form>
</td>
</tr>
@endforeach
</table>
</div>
@stop