PHPackages                             abdullahozcan/liveigniter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. abdullahozcan/liveigniter

ActiveLibrary[Framework](/categories/framework)

abdullahozcan/liveigniter
=========================

A Livewire-like reactive component system for CodeIgniter 4

v1.0.7(9mo ago)09MITPHPPHP ^7.4|^8.0

Since Jul 29Pushed 9mo agoCompare

[ Source](https://github.com/abdullahozcan/LiveIgniter)[ Packagist](https://packagist.org/packages/abdullahozcan/liveigniter)[ Docs](https://github.com/abdullahozcan/LiveIgniter)[ RSS](/packages/abdullahozcan-liveigniter/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (8)Used By (0)

LiveIgniter
===========

[](#liveigniter)

[![GitHub](https://camo.githubusercontent.com/373210781d017faa2c77ec72032a8d9e9c9c6fccad10e29396bc1de6573ee3c3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f616264756c6c61686f7a63616e2f4c69766549676e69746572)](https://github.com/abdullahozcan/LiveIgniter/blob/main/LICENSE)[![GitHub stars](https://camo.githubusercontent.com/d36abc98080b439f91fda60de965469ecc9be5cd8fcc3744a45075ee7ea54712/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f616264756c6c61686f7a63616e2f4c69766549676e69746572)](https://github.com/abdullahozcan/LiveIgniter/stargazers)[![GitHub forks](https://camo.githubusercontent.com/77c423052a30c6d553cbfd1f493808cbd3bc6ede31909023fca813ff0560c8ec/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f616264756c6c61686f7a63616e2f4c69766549676e69746572)](https://github.com/abdullahozcan/LiveIgniter/network)[![GitHub issues](https://camo.githubusercontent.com/fa9fcdcb43b9543a2c453f21d7e26a294ab3060abb61fb5208cdc29fc28a1466/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f616264756c6c61686f7a63616e2f4c69766549676e69746572)](https://github.com/abdullahozcan/LiveIgniter/issues)[![PHP Version](https://camo.githubusercontent.com/16027caa081f6009944968c597a4d37ed2d3fd88dd1eb4e7cbb2b8d5e4b77c4b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6c69766569676e697465722f6c69766569676e69746572)](https://packagist.org/packages/liveigniter/liveigniter)[![Packagist Version](https://camo.githubusercontent.com/23f333f38b9bcfdf63158d4a53b20a0a585eea570f342815658732ad79098484/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c69766569676e697465722f6c69766569676e69746572)](https://packagist.org/packages/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
----------

[](#-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-model` syntax 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
--------------

[](#-requirements)

- PHP 7.4 or higher
- CodeIgniter 4.0 or higher
- Alpine.js (automatically loaded if not present)

🚀 Installation
--------------

[](#-installation)

### Via Composer (Recommended)

[](#via-composer-recommended)

Install LiveIgniter via Composer:

```
composer require liveigniter/liveigniter
```

### Via Git Clone

[](#via-git-clone)

You can also clone the repository directly:

```
git clone https://github.com/abdullahozcan/LiveIgniter.git
```

### Quick Setup

[](#quick-setup)

Run the install command to set up LiveIgniter automatically:

```
php spark liveigniter:install
```

This will:

- Publish configuration files
- Copy JavaScript assets
- Set up routes
- Create an example Counter component

### Manual Installation

[](#manual-installation)

1. Clone this repository into your CodeIgniter 4 project
2. Add the namespace to your `app/Config/Autoload.php`:

```
$psr4 = [
    'LiveIgniter' => ROOTPATH . 'vendor/liveigniter/liveigniter/src',
];
```

3. Include the routes in your `app/Config/Routes.php`:

```
$routes->group('', ['namespace' => 'LiveIgniter\Controllers'], function($routes) {
    require_once ROOTPATH . 'vendor/liveigniter/liveigniter/routes/LiveIgniterRoutes.php';
});
```

4. Publish assets and config:

```
php spark liveigniter:publish
```

🎯 Quick Start
-------------

[](#-quick-start)

### 1. Create a Component

[](#1-create-a-component)

Create a new component by extending the `LiveComponent` class:

```

    +
    -
    Reset

        Update

        Press Enter to increment

    Auto-refreshes every minute
    Loads when visible

    You are offline

```

### 3. Include in Your View

[](#3-include-in-your-view)

Use the component in any CodeIgniter view:

```
DOCTYPE html>

    LiveIgniter Example
