Download the PHP package yogameleniawan/realtime-job-batching without Composer
On this page you can find all versions of the php package yogameleniawan/realtime-job-batching. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download yogameleniawan/realtime-job-batching
More information about yogameleniawan/realtime-job-batching
Files in yogameleniawan/realtime-job-batching
Package realtime-job-batching
Short Description Job Batching with Realtime Progress using Pusher for Laravel
License MIT
Informations about the package realtime-job-batching
🚀 Laravel Job Batching with Realtime Progress
🌐 Language / Bahasa
Choose your preferred language for documentation:
🇺🇸 English | View English Documentation |
🇮🇩 Bahasa Indonesia | Lihat Dokumentasi Bahasa Indonesia |
Quick Navigation
- 🚀 Memulai
- 📖 Referensi API
- 💡 Contoh
📖 English Documentation
🎯 Overview
Laravel Job Batching with Realtime Progress is a powerful package that allows you to execute batch jobs with real-time progress tracking. Monitor your job execution progress live using WebSocket technology powered by Pusher.
🎬 Live Demo
📑 Table of Contents
- ✨ Features
- 📋 Requirements
- ⚙️ Installation
- 🔧 Configuration
- 🛠️ Implementation
- 📊 JavaScript Setup
- 📈 API Response
- 🤝 Contributing
- 📝 Changelog
- 👥 Credits
- 📄 License
✨ Features
- 🔄 Real-time Progress Tracking - Monitor job execution progress in real-time
- 📡 WebSocket Integration - Uses Pusher for instant updates
- 🎯 Batch Processing - Handle multiple jobs efficiently
- 🔌 Easy Integration - Simple setup with Laravel projects
- 📊 Progress Metrics - Get detailed progress information
- 🎨 Customizable - Flexible implementation for various use cases
📋 Requirements
⚙️ Installation
Step 1: Database Setup
Create necessary migration tables:
Step 2: Install Package
Step 3: Pusher Setup
Install Pusher PHP SDK:
🔧 Configuration
Pusher Configuration
-
Create Pusher App: Visit Pusher Dashboard to create a new Channels app
- Environment Variables: Add these variables to your
.env
file:
🛠️ Implementation
Create Service Repository
-
Create Repository Directory: Create folder
app/Repositories
in your project -
Create Repository Class: For example,
VerificationRepository.php
- Implement Interface: Your repository must implement
RealtimeJobBatchInterface
Create Controller Method
Create a controller method to handle your job process:
Method Explanation
setRepository(RealtimeJobBatchInterface $repository)
: Sets the repository class to useexecute(string $name)
: Executes the job batch with a custom name
📊 JavaScript Setup
For Laravel Blade Views
Add this script to your blade template:
For Other Frameworks
For React, Vue, or other JavaScript frameworks, check the Pusher documentation.
📈 API Response
The WebSocket will send progress updates in this format:
Response Fields
finished
: Boolean indicating if the batch is completeprogress
: Number of completed jobspending
: Number of remaining jobstotal
: Total number of jobs in the batchdata
: Additional batch information
🤝 Contributing
We welcome contributions! Please see our Contributing Guidelines for details.
📝 Changelog
Please see CHANGELOG for more information about recent changes.
👥 Credits
- Yoga Meleniawan Pamungkas - Original Author
- All Contributors - Community Contributors
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
📖 Dokumentasi Bahasa Indonesia
🎯 Ringkasan
Laravel Job Batching with Realtime Progress adalah package yang memungkinkan Anda menjalankan batch job dengan pelacakan progres real-time. Pantau eksekusi job Anda secara langsung menggunakan teknologi WebSocket yang didukung oleh Pusher.
🎬 Demo Langsung
📑 Daftar Isi
- ✨ Fitur
- 📋 Persyaratan
- ⚙️ Instalasi
- 🔧 Konfigurasi
- 🛠️ Implementasi
- 📊 Setup JavaScript
- 📈 Response API
- 🤝 Kontribusi
- 📝 Changelog
- 👥 Kredit
- 📄 Lisensi
✨ Fitur
- 🔄 Pelacakan Progres Real-time - Pantau progres eksekusi job secara real-time
- 📡 Integrasi WebSocket - Menggunakan Pusher untuk update instan
- 🎯 Pemrosesan Batch - Menangani multiple job secara efisien
- 🔌 Integrasi Mudah - Setup sederhana dengan proyek Laravel
- 📊 Metrik Progres - Dapatkan informasi progres yang detail
- 🎨 Dapat Dikustomisasi - Implementasi fleksibel untuk berbagai kasus penggunaan
📋 Persyaratan
⚙️ Instalasi
Langkah 1: Setup Database
Buat tabel migrasi yang diperlukan:
Langkah 2: Install Package
Langkah 3: Setup Pusher
Install Pusher PHP SDK:
🔧 Konfigurasi
Konfigurasi Pusher
-
Buat Aplikasi Pusher: Kunjungi Dashboard Pusher untuk membuat aplikasi Channels baru
- Variabel Environment: Tambahkan variabel ini ke file
.env
Anda:
🛠️ Implementasi
Buat Service Repository
-
Buat Direktori Repository: Buat folder
app/Repositories
di proyek Anda -
Buat Class Repository: Misalnya,
VerificationRepository.php
- Implement Interface: Repository Anda harus mengimplementasikan
RealtimeJobBatchInterface
Buat Method Controller
Buat method controller untuk menangani proses job Anda:
Penjelasan Method
setRepository(RealtimeJobBatchInterface $repository)
: Mengatur class repository yang akan digunakanexecute(string $name)
: Menjalankan job batch dengan nama kustom
📊 Setup JavaScript
Untuk Laravel Blade Views
Tambahkan script ini ke template blade Anda:
Untuk Framework Lain
Untuk React, Vue, atau framework JavaScript lainnya, periksa dokumentasi Pusher.
📈 Response API
WebSocket akan mengirim update progres dalam format ini:
Field Response
finished
: Boolean yang menunjukkan apakah batch sudah selesaiprogress
: Jumlah job yang sudah selesaipending
: Jumlah job yang tersisatotal
: Total jumlah job dalam batchdata
: Informasi tambahan batch
🤝 Kontribusi
Kami menyambut kontribusi! Silakan lihat Panduan Kontribusi kami untuk detail.
📝 Changelog
Silakan lihat CHANGELOG untuk informasi lebih lanjut tentang perubahan terbaru.
👥 Kredit
- Yoga Meleniawan Pamungkas - Penulis Asli
- Semua Kontributor - Kontributor Komunitas
📄 Lisensi
Proyek ini dilisensikan di bawah Lisensi MIT - lihat file LICENSE untuk detail.