Postingan lainnya
Cara Pagination laravel
Hi..
Saya sedang mencoba pagination tetapi malah ke pinggir sidebar kenapa ya...
Gambar
.blade
!DOCTYPE html>
<html lang="en">
<head>
@include('Template.header')
</head>
<body class="hold-transition sidebar-mini">
<div class="wrapper">
@include('Template.navbar')
@include('Template.sidebar')
<div class="content-wrapper">
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
</ol>
</div>
</div>
</div>
</section>
<section class="content">
<div class="content">
<div class="card card-info card-outline">
<div class="card-header">
<div class="card-tools">
<a href="{{route('inputpengurus')}}" class="btn btn-success "> <i class=" fas fa-plus-square"></i> Tambah Pengurus </a>
<a href="{{ route('exportpengurus') }}" class="btn btn-info"> <i class="fa fa-file-export"></i> Export </a>
<a href="#" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal"> <i class="fa fa-upload"></i> Import</a>
</div>
</div>
<div class="card-body">
<table class="table table-bordered">
<tr>
<th>No</th>
<th>Nama</th>
<th>Kelas</th>
<th>Jabatan</th>
<th>Aksi</th>
</tr>
@foreach ($pengurus as $item)
<tr>
<td> {{ $loop->iteration }}</td>
<td>{{ $item->nama }}</td>
<td>{{ $item->kelas }}</td>
<td>{{ $item->jabatan }}</td>
<td>
<a href="{{ url('editpengurus',$item->id) }}"><i class="fas fa-edit"></i></a>
|
<a href="{{ url('deletepengurus',$item->id) }}" onclick="return confirm('Yakin mau dihapus?')"><i class="fas fa-trash-alt" style="color: red"></i></a>
</td>
</tr>
@endforeach
</table>
</div>
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Import Data</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<form action="{{ route('importpengurus')}}" method="POST" enctype="multipart/form-data">
<div class="modal-body">
<div classs="form-group">
{{ csrf_field() }}
<input type="file" name="file" required="required" >
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="submit" class="btn btn-primary">Import</button>
</div>
</div>
</form>
</div>
</div>
<div class="card-footer">
{{ $pengurus->links() }}
</div>
</section>
</div>
<aside class="control-sidebar control-sidebar-dark">
<div class="p-3">
<h5>Title</h5>
<p>Sidebar content</p>
</div>
</aside>
<footer class="main-footer">
@include('Template.footer')
</footer>
</div>
@include('Template.script')
@include('sweetalert::alert')
</body>
</html>
1
1 Jawaban:
<div>Halo ini hanya masalah tampilan / CSS<br>atur kode kamu <br><br></div><pre> {{ $pengurus->links() }} <br></pre><div><br>sehingga dia berada di lokasi yang kamu mau<br>COba mainkan div dan classnya</div>
2