fix(master-land): add user in data land
This commit is contained in:
parent
810e7d1dc5
commit
9a424d3420
|
@ -15,7 +15,7 @@ class LandController extends Controller
|
|||
{
|
||||
public function index()
|
||||
{
|
||||
$lands = Land::with('province', 'regency')->orderBy('created_at', 'desc')->get();
|
||||
$lands = Land::with('province', 'regency', 'user')->orderBy('created_at', 'desc')->get();
|
||||
return view('master-data.lahan.index', compact('lands'));
|
||||
}
|
||||
|
||||
|
|
|
@ -31,4 +31,9 @@ public function district()
|
|||
{
|
||||
return $this->belongsTo(District::class, 'district_code', 'id');
|
||||
}
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,14 @@ checkAll &&
|
|||
});
|
||||
var perPage = 10,
|
||||
options = {
|
||||
valueNames: ["id", "land_name", "owner", "rental_price", "status"],
|
||||
valueNames: [
|
||||
"id",
|
||||
"land_name",
|
||||
"owner",
|
||||
"rental_price",
|
||||
"user",
|
||||
"status",
|
||||
],
|
||||
page: perPage,
|
||||
pagination: !0,
|
||||
plugins: [ListPagination({ left: 2, right: 2 })],
|
||||
|
|
|
@ -49,6 +49,7 @@ class="ri-add-line align-bottom me-1"></i>
|
|||
<th class="sort" data-sort="no">No</th>
|
||||
<th class="sort" data-sort="owner">Pemilik</th>
|
||||
<th class="sort" data-sort="address">Alamat</th>
|
||||
<th class="sort" data-sort="user">Petugas</th>
|
||||
<th class="sort" data-sort="action">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -66,6 +67,7 @@ class="fw-medium link-primary">#VZ2101</a></td>
|
|||
{{ ucwords(strtolower($land->regency->name)) }}, Provinsi
|
||||
{{ ucwords(strtolower($land->province->name)) }}</span>
|
||||
</td>
|
||||
<td class="user">{{ $land->user->username }}</td>
|
||||
<td>
|
||||
<div class="d-flex gap-2 justify-content-center">
|
||||
<div class="edit">
|
||||
|
|
Loading…
Reference in New Issue