Commit 6372fe2a authored by Reinol Simangunsong's avatar Reinol Simangunsong
Browse files
No related merge requests found
Showing with 892 additions and 109 deletions
+892 -109
<?php
namespace App\Http\Controllers;
use App\Models\Brosur;
use Illuminate\Http\Request;
class BrosurController extends Controller
{
public function index()
{
// Menggunakan paginate agar links() bisa digunakan di view
$brosurs = Brosur::paginate(10); // Menampilkan 10 data per halaman
return view('brosur.usulan', compact('brosurs'));
}
}
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('draft_katalog', function (Blueprint $table) {
$table->id();
$table->string('nama');
$table->integer('no_telp');
$table->integer('no_hp');
$table->text('alamat');
$table->enum('status_ajuan',['sudah','belum']);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('draft_katalog');
}
};
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up()
{
Schema::create('admin', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('email')->unique();
$table->string('password');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('admin');
}
};
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration {
/**
* Run the migrations.
*/
public function up()
{
Schema::create('brosurs', function (Blueprint $table) {
$table->id();
$table->string('nama_penyelenggara');
$table->string('alamat');
$table->string('no_telepon');
$table->string('no_hp');
$table->string('status_ajuan');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('brosurs');
}
};
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateDiklatsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('diklats', function (Blueprint $table) {
$table->id();
$table->string('jenis_diklat');
$table->string('nama_diklat');
$table->string('rumpun');
$table->string('kode_jabatan');
$table->string('penyelenggara');
$table->date('tanggal_pelaksanaan'); // Kolom tanggal_pelaksanaan
$table->string('tempat_pelaksanaan'); // Kolom tempat_pelaksanaan
$table->string('metode_pelaksanaan'); // Kolom metode_pelaksanaan
$table->string('jenis_biaya'); // Kolom jenis_biaya
$table->decimal('biaya_per_orang', 10, 2); // Kolom biaya_per_orang
$table->string('link_katalog')->nullable(); // Kolom link_katalog
$table->timestamps(); // Menambahkan kolom created_at dan updated_at
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('diklats');
}
}
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateUsulanLaporanDiklatTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('usulan_laporan_diklat', function (Blueprint $table) {
$table->id(); // Auto incrementing primary key (corresponds to No.)
$table->string('nip'); // NIP
$table->string('nama_penulis'); // Corresponds to Nama Penulis
$table->string('jabatan'); // Position
$table->string('golongan'); // Rank
$table->string('judul_laporan'); // Corresponds to Judul Laporan
$table->string('jenis_pelatihan'); // Type of training
$table->string('nama_pelatihan'); // Corresponds to Nama Pelatihan
$table->year('tahun_pelatihan'); // Year of training
$table->string('pelaksanaan'); // Implementation
$table->string('mode_pelatihan'); // Mode of training (e.g., online, offline)
$table->string('waktu_pelaksanaan'); // Execution time
$table->text('latar_belakang'); // Background
$table->string('unit_kerja'); // Corresponds to Unit Kerja
$table->string('unggah_laporan')->nullable(); // Uploaded report file path
$table->enum('status', ['Approved', 'In Progress']);
$table->timestamps(); // Created_at and updated_at fields
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('usulan_laporan_diklat');
}
}
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up()
{
Schema::table('admin', function (Blueprint $table) {
$table->boolean('is_admin')->default(0); // 0 untuk bukan admin, 1 untuk admin
});
}
public function down()
{
Schema::table('admin', function (Blueprint $table) {
$table->dropColumn('is_admin');
});
}
};
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateDiklatReportsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('diklat_reports', function (Blueprint $table) {
$table->id();
$table->string('nip')->nullable(); // Nomor Induk Pegawai
$table->string('nama_penulis')->nullable();
$table->string('jabatan')->nullable();
$table->string('golongan')->nullable();
$table->string('unit_kerja')->nullable();
$table->string('jenis_pelatihan')->nullable();
$table->string('nama_pelatihan')->nullable();
$table->year('tahun_pelatihan')->nullable();
$table->string('metode_pelatihan')->nullable();
$table->date('tanggal_pelaksanaan')->nullable();
$table->string('tempat_pelaksanaan')->nullable(); // Tambahkan kolom tempat pelaksanaan
$table->string('judul_laporan')->nullable();
$table->text('latar_belakang')->nullable();
$table->decimal('biaya_per_orang', 10, 2); // Kolom biaya_per_orang
$table->string('link_katalog')->nullable(); // Kolom link_katalog
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('diklat_reports');
}
}
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('admin', function (Blueprint $table) {
$table->id(); // Bigint auto-increment
$table->string('name');
$table->string('email')->unique(); // Add unique constraint
$table->string('password');
$table->tinyInteger('is_admin')->default(0); // 0: Non-admin, 1: Admin
$table->timestamps(); // Includes created_at and updated_at
});
DB::table('admin')->insert([
'name' => 'Admin',
'email' => 'admin@gmail.com',
'password' => Hash::make('12345678'), // Hash the password
'is_admin' => 1,
'created_at' => now(),
'updated_at' => now(),
]);
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('admin');
}
};
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateUsulanLaporanDiklatTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('usulan_laporan_diklat', function (Blueprint $table) {
$table->id();
$table->string('nip')->nullable();
$table->string('nama_penulis');
$table->string('jabatan')->nullable();
$table->string('golongan')->nullable();
$table->string('unit_kerja');
$table->string('jenis_pelatihan')->nullable();
$table->string('nama_pelatihan');
$table->year('tahun_pelatihan')->nullable(); // Assuming 'tahun_pelatihan' is a year
$table->string('tempat_pelaksanaan')->nullable(); // Added column
$table->string('pelaksanaan')->nullable(); // Adjust type if necessary
$table->string('mode_pelatihan')->nullable();
$table->date('waktu_pelaksanaan'); // Kolom tanggal_pelaksanaanAdjust type if necessary
$table->string('judul_laporan');
$table->decimal('biaya_per_orang', 10, 2)->nullable(); // Kolom biaya_per_orang
$table->text('latar_belakang')->nullable();
$table->string('link_katalog')->nullable(); // Kolom link_katalog
$table->string('unggah_laporan')->nullable(); // Path to uploaded report file
$table->enum('status', ['Approved', 'Pending', 'Rejected'])->default('Pending');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('usulan_laporan_diklat');
}
}
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateLaporanArsipTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('laporan_arsip', function (Blueprint $table) {
$table->id();
$table->string('nip')->nullable();
$table->string('nama_penulis');
$table->string('jabatan')->nullable();
$table->string('golongan')->nullable();
$table->string('unit_kerja');
$table->string('jenis_pelatihan')->nullable();
$table->string('nama_pelatihan');
$table->year('tahun_pelatihan')->nullable(); // Assuming 'tahun_pelatihan' is a year
$table->string('tempat_pelaksanaan')->nullable(); // Added column
$table->string('pelaksanaan')->nullable(); // Adjust type if necessary
$table->string('mode_pelatihan')->nullable();
$table->date('waktu_pelaksanaan'); // Adjust type if necessary
$table->string('judul_laporan');
$table->decimal('biaya_per_orang', 10, 2)->nullable(); // Kolom biaya_per_orang
$table->text('latar_belakang')->nullable();
$table->string('link_katalog')->nullable(); // Kolom link_katalog
$table->string('unggah_laporan')->nullable(); // Path to uploaded report file
$table->enum('status', ['Approved', 'Pending', 'Rejected'])->default('Pending');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('laporan_arsip');
}
}
.sidebar {
width: 250px;
background-color: #e7dcc2;
margin-right: -250px;
margin-top: 60px;
height: 100vh;
}
.sidebar-header {
display: flex;
justify-content: center;
align-items: center;
padding: 10px 0;
}
.sidebar-logo {
max-width: 30px;
}
.sidebar-menu {
list-style-type: none;
padding: 0;
margin-top: 20px;
}
.sidebar-menu .menu-item {
padding: 15px 20px;
font-size: 16px;
display: flex;
align-items: center;
cursor: pointer;
color: #000;
position: relative;
margin-bottom: 10px;
}
.sidebar-menu .menu-item i {
margin-right: 20px;
}
.sidebar-menu .menu-item .nav-link {
display: block;
width: 100%;
height: 100%;
text-decoration: none;
color: #000000;
}
.sidebar-menu .menu-item.active::before {
content: '';
position: absolute;
left: 10px;
width: 15px;
height: 100%;
background-color: #A09172;
}
.sidebar-menu .menu-item:hover,
.menu-item.active {
background-color: #FCF7EE;
border-radius: 0 15px 15px 0;
margin-right: 35px;
transition: margin-left 0.2s, width 0.2s;
}
.sidebar-menu .menu-header {
padding: 10px 20px;
font-size: 16px;
color: #ffffff;
text-transform: uppercase;
margin-top : 10px;
margin-bottom: 10px;
background-color: #A09172;
border-radius: 0 15px 15px 0;
margin-right: 15px;
}
.main-content {
margin-left: 270px;
padding: 20px;
background-color: #f9f4e6;
}
.main-content h2 {
font-size: 18px;
margin-bottom: 10px;
}
.content-box {
background-color: #d3b897;
color: #fff;
padding: 10px;
margin-bottom: 20px;
font-size: 24px;
text-align: right;
border-radius: 5px;
}
\ No newline at end of file
@extends('layouts.app')
@section('content')
<div class="dashboard-content">
<div class="draft-item">
<span>Draft Katalog Masuk:</span>
<span>{{ $data['draftKatalogMasuk'] }}</span>
</div>
<div class="draft-item">
<span>Draft Laporan Masuk:</span>
<span>{{ $data['draftLaporanMasuk'] }}</span>
</div>
</div>
@endsection
@extends('layouts.app')
@section('content')
<div class="container mt-5">
<div class="card shadow-sm">
<div class="card-header bg-primary text-white">
<h3 class="mb-0">Tambah Usulan Brosur</h3>
</div>
<div class="card-body">
<form action="{{ route('brosur.storearsip') }}" method="POST">
@csrf
<!-- Nama Penulis -->
<div class="mb-3">
<label for="nama_penyelenggara" class="form-label">Nama Penyelenggara</label>
<input
type="text"
class="form-control"
id="nama_penyelenggara"
name="nama_penyelenggara"
placeholder="Masukkan nama penyelenggara"
value="{{ old('nama_penyelenggara') }}"
required
>
</div>
<!-- Judul Laporan -->
<div class="mb-3">
<label for="alamat" class="form-label">Alamat</label>
<input
type="text"
class="form-control"
id="alamat"
name="alamat"
placeholder="Masukkan alamat"
value="{{ old('alamat') }}"
required
>
</div>
<!-- Nama Pelatihan -->
<div class="mb-3">
<label for="no_hp" class="form-label">No HP</label>
<input
type="text"
class="form-control"
id="no_hp"
name="no_hp"
placeholder="Masukkan no hp"
value="{{ old('no_hp') }}"
required
>
</div>
<!-- Unit Kerja -->
<div class="mb-3">
<label for="no_telepon" class="form-label">No Telepon</label>
<input
type="text"
class="form-control"
id="no_telepon"
name="no_telepon"
placeholder="Masukkan no_telepon"
value="{{ old('no_telepon') }}"
required
>
</div>
<!-- Status Ajuan -->
<div class="mb-3">
<label for="status_ajuan" class="form-label">Status Ajuan</label>
<select
class="form-select"
id="status_ajuan"
name="status_ajuan"
required
>
<option value="Approved" {{ old('status_ajuan') == 'Approved' ? 'selected' : '' }}>Approved</option>
<option value="Rejected" {{ old('status_ajuan') == 'Rejected' ? 'selected' : '' }}>Rejected</option>
</select>
</div>
<!-- Tombol Submit dan Kembali -->
<div class="d-flex justify-content-between mt-4">
<a href="{{ route('brosur.usulan') }}" class="btn btn-secondary">
<i class="fa fa-arrow-left me-1"></i> Kembali
</a>
<button type="submit" class="btn btn-success">
<i class="fa fa-save me-1"></i> Simpan
</button>
</div>
</form>
</div>
</div>
</div>
@endsection
<link rel="stylesheet" href="{{ asset('css/style.css') }}">
<div class="sidebar">
<ul class="sidebar-menu">
<li class="menu-item {{ Route::currentRouteName() === 'dashboard' ? 'active' : '' }}">
<li class="menu-item {{ request()->routeIs('dashboard') ? 'active' : '' }}">
<a href="{{ route('dashboard') }}" class="nav-link">
<i class="fa fa-th-large"></i> Dashboard
</a>
</li>
<li class="menu-header">BROSUR</li>
<li class="menu-item {{ Route::currentRouteName() === 'brosur.usulan' ? 'active' : '' }}">
<li class="menu-item {{ request()->routeIs('brosur.usulan') ? 'active' : '' }}">
<a href="{{ route('brosur.usulan') }}" class="nav-link">
Usulan Brosur
<i class="fas fa-file"></i> Usulan Brosur
</a>
</li>
<li class="menu-item {{ Route::currentRouteName() === 'brosur.arsip' ? 'active' : '' }}">
<li class="menu-item {{ request()->routeIs('brosur.arsip') ? 'active' : '' }}">
<a href="{{ route('brosur.arsip') }}" class="nav-link">
Arsip Brosur
<i class="fas fa-file"></i> Arsip Brosur
</a>
</li>
<li class="menu-header">DATABASE E-KATALOG</li>
<li class="menu-item {{ Route::currentRouteName() === 'ekatalog.pelatihan' ? 'active' : '' }}">
<li class="menu-item {{ request()->routeIs('ekatalog.pelatihan') ? 'active' : '' }}">
<a href="{{ route('ekatalog.pelatihan') }}" class="nav-link">
Nama Pelatihan
<i class="fas fa-file"></i> Nama Pelatihan
</a>
</li>
<li class="menu-item {{ Route::currentRouteName() === 'ekatalog.diklat' ? 'active' : '' }}">
<li class="menu-item {{ request()->routeIs('ekatalog.diklat') ? 'active' : '' }}">
<a href="{{ route('ekatalog.diklat') }}" class="nav-link">
E-Katalog Diklat
<i class="fas fa-file"></i> E-Katalog Diklat
</a>
</li>
<li class="menu-header">LAPORAN DIKLAT</li>
<li class="menu-item {{ Route::currentRouteName() === 'laporan.usulan' ? 'active' : '' }}">
<li class="menu-item {{ request()->routeIs('laporan.usulan') ? 'active' : '' }}">
<a href="{{ route('laporan.usulan') }}" class="nav-link">
Usulan Laporan
<i class="fas fa-file"></i> Usulan Laporan
</a>
</li>
<li class="menu-item {{ Route::currentRouteName() === 'laporan.arsip' ? 'active' : '' }}">
<li class="menu-item {{ request()->routeIs('laporan.arsip') ? 'active' : '' }}">
<a href="{{ route('laporan.arsip') }}" class="nav-link">
Arsip Laporan
<i class="fas fa-file"></i> Arsip Laporan
</a>
</li>
<li class="menu-item {{ Route::currentRouteName() === 'laporan.rekap' ? 'active' : '' }}">
<li class="menu-item {{ request()->routeIs('laporan.rekap') ? 'active' : '' }}">
<a href="{{ route('laporan.rekap') }}" class="nav-link">
Rekap Pelatihan
<i class="fas fa-file"></i> Rekap Pelatihan
</a>
</li>
</ul>
</div>
<style>
/* Gaya untuk sidebar */
.sidebar {
width: 250px;
background-color: #e7dcc2; /* Warna latar sidebar */
margin-left: -100px;
margin-right: 0px;
margin-top: 60px; /* Sidebar dimulai 80px di bawah, sama dengan tinggi header */
height: 100vh; /* Full height view */
}
.sidebar-header {
display: flex;
justify-content: center;
align-items: center;
padding: 10px 0;
}
.sidebar-logo {
max-width: 30px;
}
.sidebar-menu {
list-style-type: none;
padding: 0;
margin: 0;
}
.sidebar-menu .menu-item {
padding: 15px 20px;
font-size: 16px;
display: flex;
align-items: center;
cursor: pointer;
color: #000;
}
.sidebar-menu .menu-item i {
margin-right: 10px;
}
.sidebar-menu .menu-item:hover,
.menu-item.active {
background-color: #d3b897; /* Warna saat hover atau aktif */
}
.sidebar-menu .menu-header {
padding: 10px 20px;
font-size: 14px;
color: #6d6d6d;
text-transform: uppercase;
margin-top: 20px;
}
/* Gaya untuk konten utama */
.main-content {
margin-left: 270px; /* Memberikan ruang untuk sidebar */
padding: 20px;
background-color: #f9f4e6; /* Warna latar konten */
}
.main-content h2 {
font-size: 18px;
margin-bottom: 10px;
}
.content-box {
background-color: #d3b897;
color: #fff;
padding: 10px;
margin-bottom: 20px;
font-size: 24px;
text-align: right;
border-radius: 5px;
}
</style>
</div>
\ No newline at end of file
@if ($paginator->hasPages())
<nav>
<ul class="pagination">
{{-- Previous Page Link --}}
@if ($paginator->onFirstPage())
<li class="page-item disabled" aria-disabled="true" aria-label="@lang('pagination.previous')">
<span class="page-link" aria-hidden="true">&lsaquo;</span>
</li>
@else
<li class="page-item">
<a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev" aria-label="@lang('pagination.previous')">&lsaquo;</a>
</li>
@endif
{{-- Pagination Elements --}}
@foreach ($elements as $element)
{{-- "Three Dots" Separator --}}
@if (is_string($element))
<li class="page-item disabled" aria-disabled="true"><span class="page-link">{{ $element }}</span></li>
@endif
{{-- Array Of Links --}}
@if (is_array($element))
@foreach ($element as $page => $url)
@if ($page == $paginator->currentPage())
<li class="page-item active" aria-current="page"><span class="page-link">{{ $page }}</span></li>
@else
<li class="page-item"><a class="page-link" href="{{ $url }}">{{ $page }}</a></li>
@endif
@endforeach
@endif
@endforeach
{{-- Next Page Link --}}
@if ($paginator->hasMorePages())
<li class="page-item">
<a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next" aria-label="@lang('pagination.next')">&rsaquo;</a>
</li>
@else
<li class="page-item disabled" aria-disabled="true" aria-label="@lang('pagination.next')">
<span class="page-link" aria-hidden="true">&rsaquo;</span>
</li>
@endif
</ul>
</nav>
@endif
@if ($paginator->hasPages())
<nav class="d-flex justify-items-center justify-content-between">
<div class="d-flex justify-content-between flex-fill d-sm-none">
<ul class="pagination">
{{-- Previous Page Link --}}
@if ($paginator->onFirstPage())
<li class="page-item disabled" aria-disabled="true">
<span class="page-link">@lang('pagination.previous')</span>
</li>
@else
<li class="page-item">
<a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev">@lang('pagination.previous')</a>
</li>
@endif
{{-- Next Page Link --}}
@if ($paginator->hasMorePages())
<li class="page-item">
<a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next">@lang('pagination.next')</a>
</li>
@else
<li class="page-item disabled" aria-disabled="true">
<span class="page-link">@lang('pagination.next')</span>
</li>
@endif
</ul>
</div>
<div class="d-none flex-sm-fill d-sm-flex align-items-sm-center justify-content-sm-between">
<div>
<p class="small text-muted">
{!! __('Showing') !!}
<span class="fw-semibold">{{ $paginator->firstItem() }}</span>
{!! __('to') !!}
<span class="fw-semibold">{{ $paginator->lastItem() }}</span>
{!! __('of') !!}
<span class="fw-semibold">{{ $paginator->total() }}</span>
{!! __('results') !!}
</p>
</div>
<div>
<ul class="pagination">
{{-- Previous Page Link --}}
@if ($paginator->onFirstPage())
<li class="page-item disabled" aria-disabled="true" aria-label="@lang('pagination.previous')">
<span class="page-link" aria-hidden="true">&lsaquo;</span>
</li>
@else
<li class="page-item">
<a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev" aria-label="@lang('pagination.previous')">&lsaquo;</a>
</li>
@endif
{{-- Pagination Elements --}}
@foreach ($elements as $element)
{{-- "Three Dots" Separator --}}
@if (is_string($element))
<li class="page-item disabled" aria-disabled="true"><span class="page-link">{{ $element }}</span></li>
@endif
{{-- Array Of Links --}}
@if (is_array($element))
@foreach ($element as $page => $url)
@if ($page == $paginator->currentPage())
<li class="page-item active" aria-current="page"><span class="page-link">{{ $page }}</span></li>
@else
<li class="page-item"><a class="page-link" href="{{ $url }}">{{ $page }}</a></li>
@endif
@endforeach
@endif
@endforeach
{{-- Next Page Link --}}
@if ($paginator->hasMorePages())
<li class="page-item">
<a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next" aria-label="@lang('pagination.next')">&rsaquo;</a>
</li>
@else
<li class="page-item disabled" aria-disabled="true" aria-label="@lang('pagination.next')">
<span class="page-link" aria-hidden="true">&rsaquo;</span>
</li>
@endif
</ul>
</div>
</div>
</nav>
@endif
@if ($paginator->hasPages())
<nav>
<ul class="pagination">
{{-- Previous Page Link --}}
@if ($paginator->onFirstPage())
<li class="disabled" aria-disabled="true" aria-label="@lang('pagination.previous')">
<span aria-hidden="true">;</span>
</li>
@else
<li>
<a href="{{ $paginator->previousPageUrl() }}" rel="prev" aria-label="@lang('pagination.previous')">;</a>
</li>
@endif
{{-- Pagination Elements --}}
@foreach ($elements as $element)
{{-- "Three Dots" Separator --}}
@if (is_string($element))
<li class="disabled" aria-disabled="true"><span>{{ $element }}</span></li>
@endif
{{-- Array Of Links --}}
@if (is_array($element))
@foreach ($element as $page => $url)
@if ($page == $paginator->currentPage())
<li class="active" aria-current="page"><span>{{ $page }}</span></li>
@else
<li><a href="{{ $url }}">{{ $page }}</a></li>
@endif
@endforeach
@endif
@endforeach
{{-- Next Page Link --}}
@if ($paginator->hasMorePages())
<li>
<a href="{{ $paginator->nextPageUrl() }}" rel="next" aria-label="@lang('pagination.next')">;</a>
</li>
@else
<li class="disabled" aria-disabled="true" aria-label="@lang('pagination.next')">
<span aria-hidden="true">;</span>
</li>
@endif
</ul>
</nav>
@endif
@if ($paginator->hasPages())
<div class="ui pagination menu" role="navigation">
{{-- Previous Page Link --}}
@if ($paginator->onFirstPage())
<a class="icon item disabled" aria-disabled="true" aria-label="@lang('pagination.previous')"> <i class="left chevron icon"></i> </a>
@else
<a class="icon item" href="{{ $paginator->previousPageUrl() }}" rel="prev" aria-label="@lang('pagination.previous')"> <i class="left chevron icon"></i> </a>
@endif
{{-- Pagination Elements --}}
@foreach ($elements as $element)
{{-- "Three Dots" Separator --}}
@if (is_string($element))
<a class="icon item disabled" aria-disabled="true">{{ $element }}</a>
@endif
{{-- Array Of Links --}}
@if (is_array($element))
@foreach ($element as $page => $url)
@if ($page == $paginator->currentPage())
<a class="item active" href="{{ $url }}" aria-current="page">{{ $page }}</a>
@else
<a class="item" href="{{ $url }}">{{ $page }}</a>
@endif
@endforeach
@endif
@endforeach
{{-- Next Page Link --}}
@if ($paginator->hasMorePages())
<a class="icon item" href="{{ $paginator->nextPageUrl() }}" rel="next" aria-label="@lang('pagination.next')"> <i class="right chevron icon"></i> </a>
@else
<a class="icon item disabled" aria-disabled="true" aria-label="@lang('pagination.next')"> <i class="right chevron icon"></i> </a>
@endif
</div>
@endif
@if ($paginator->hasPages())
<nav>
<ul class="pagination">
{{-- Previous Page Link --}}
@if ($paginator->onFirstPage())
<li class="page-item disabled" aria-disabled="true">
<span class="page-link">@lang('pagination.previous')</span>
</li>
@else
<li class="page-item">
<a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev">@lang('pagination.previous')</a>
</li>
@endif
{{-- Next Page Link --}}
@if ($paginator->hasMorePages())
<li class="page-item">
<a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next">@lang('pagination.next')</a>
</li>
@else
<li class="page-item disabled" aria-disabled="true">
<span class="page-link">@lang('pagination.next')</span>
</li>
@endif
</ul>
</nav>
@endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment