Download the PHP package abdullahozcan/liveigniter without Composer
On this page you can find all versions of the php package abdullahozcan/liveigniter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download abdullahozcan/liveigniter
More information about abdullahozcan/liveigniter
Files in abdullahozcan/liveigniter
Package liveigniter
Short Description A Livewire-like reactive component system for CodeIgniter 4
License MIT
Homepage https://github.com/abdullahozcan/LiveIgniter
Informations about the package liveigniter
LiveIgniter
🚀 A Livewire-like reactive component system for CodeIgniter 4
LiveIgniter brings the power of reactive components to CodeIgniter 4, allowing you to build dynamic, interactive web applications with minimal JavaScript. Inspired by Laravel Livewire, LiveIgniter provides a seamless way to create reactive components that automatically sync with the server.
✨ Features
- 🔄 Reactive Components - Build interactive UI components with automatic server synchronization
- ⚡ Real-time Updates - Components update automatically without page refreshes
- 🎯 HTML Directives - Use familiar
x-igniter-click,x-igniter-modelsyntax directly in your HTML - 🎯 Alpine.js Integration - Built on top of Alpine.js for client-side reactivity
- 🛡️ CSRF Protection - Built-in security features
- 📱 Offline Support - Graceful handling of offline states
- 🎨 Flexible Styling - Use any CSS framework or custom styles
- 🔧 Easy Integration - Simple installation and setup process
- 🛠️ Spark Commands - Generate components with built-in CLI tools
- 📊 Debug Tools - Development tools for debugging components
📋 Requirements
- PHP 7.4 or higher
- CodeIgniter 4.0 or higher
- Alpine.js (automatically loaded if not present)
🚀 Installation
Via Composer (Recommended)
Install LiveIgniter via Composer:
Via Git Clone
You can also clone the repository directly:
Quick Setup
Run the install command to set up LiveIgniter automatically:
This will:
- Publish configuration files
- Copy JavaScript assets
- Set up routes
- Create an example Counter component
Manual Installation
- Clone this repository into your CodeIgniter 4 project
-
Add the namespace to your
app/Config/Autoload.php: -
Include the routes in your
app/Config/Routes.php: - Publish assets and config:
🎯 Quick Start
1. Create a Component
Create a new component by extending the LiveComponent class:
2. Create a View
Create a view file in app/Views/components/counter.php:
3. Include in Your View
Use the component in any CodeIgniter view:
📚 Documentation
Component Lifecycle
Components go through several lifecycle hooks:
mount()- Called when the component is first createdrender()- Called to render the component HTML- Method calls - Handle user interactions
Helper Functions
LiveIgniter provides several helper functions for your views:
Primary Functions
live_igniter('method')- Generate x-igniter-click directivelive_model('property')- Generate x-igniter-model directivelive_loading('method')- Generate x-igniter-loading directivelive_component_data(array)- Generate x-data from component properties
Usage Examples
Direct HTML Usage
You can also use directives directly in your HTML:
Legacy Support
live_wire('method')- Alias for live_igniter() (deprecated)
Events
Components can communicate with each other using events:
Property Types
LiveIgniter supports various property types:
🎯 Spark Commands
LiveIgniter provides several Spark commands to help you develop faster:
Create Components
Install & Setup
Management Commands
🔧 Configuration
Create a configuration file at app/Config/LiveIgniter.php:
🛠️ Advanced Usage
Custom Component Methods
Real-time Updates
🔐 Security
LiveIgniter includes several security features:
- CSRF protection for all AJAX requests
- Input sanitization
- Method validation
- Rate limiting
- Origin validation
🐛 Debugging
Enable debug mode in your configuration:
Access debug endpoints (development only):
/liveigniter/debug/components- View active components/liveigniter/debug/sessions- View session data
📝 Contributing
We welcome contributions! Please see our Contributing Guide for details.
How to Contribute
- Fork the repository on GitHub
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Development Setup
📄 License
LiveIgniter is open-sourced software licensed under the MIT license.
🙏 Credits
- Inspired by Laravel Livewire
- Built for CodeIgniter 4
- Powered by Alpine.js
🔗 Quick Links
📞 Support
- 📧 Email: [email protected]
- 🐛 Issues: GitHub Issues
- 💬 Discussions: GitHub Discussions
Made with ❤️ by the LiveIgniter Team