Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/michalsn/codeigniter-tags
Tags functionality for Codeigniter 4 framework
https://github.com/michalsn/codeigniter-tags
codeigniter codeigniter4 php php81 tags
Last synced: 3 months ago
JSON representation
Tags functionality for Codeigniter 4 framework
- Host: GitHub
- URL: https://github.com/michalsn/codeigniter-tags
- Owner: michalsn
- License: mit
- Created: 2023-09-27T16:19:23.000Z (over 1 year ago)
- Default Branch: develop
- Last Pushed: 2024-01-17T17:30:20.000Z (12 months ago)
- Last Synced: 2024-10-01T00:41:08.879Z (3 months ago)
- Topics: codeigniter, codeigniter4, php, php81, tags
- Language: PHP
- Homepage: https://michalsn.github.io/codeigniter-tags/
- Size: 589 KB
- Stars: 7
- Watchers: 5
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# CodeIgniter Tags
A library that helps you build **tags** functionality around your existing models in the CodeIgniter 4 framework.
[![PHPUnit](https://github.com/michalsn/codeigniter-tags/actions/workflows/phpunit.yml/badge.svg)](https://github.com/michalsn/codeigniter-tags/actions/workflows/phpunit.yml)
[![PHPStan](https://github.com/michalsn/codeigniter-tags/actions/workflows/phpstan.yml/badge.svg)](https://github.com/michalsn/codeigniter-tags/actions/workflows/phpstan.yml)
[![Deptrac](https://github.com/michalsn/codeigniter-tags/actions/workflows/deptrac.yml/badge.svg)](https://github.com/michalsn/codeigniter-tags/actions/workflows/deptrac.yml)
[![Coverage Status](https://coveralls.io/repos/github/michalsn/codeigniter-tags/badge.svg?branch=develop)](https://coveralls.io/github/michalsn/codeigniter-tags?branch=develop)![PHP](https://img.shields.io/badge/PHP-%5E8.1-blue)
![CodeIgniter](https://img.shields.io/badge/CodeIgniter-%5E4.3-blue)## Installation
composer require michalsn/codeigniter-tags
Migrate your database:
php spark migrate --all
## Configuration
Add `HasTags` trait to your model and initialize tags with `initTags()` method.
```php
class ExampleModel extends BaseModel
{
use HasTags;// ...
protected function initialize()
{
$this->initTags();
}// ...
}
```And if you use [Entity](https://www.codeigniter.com/user_guide/models/entities.html) class, add `TaggableEntity` trait to it:
```php
class Example extends Entity
{
use TaggableEntity;// ...
}
```## Docs
https://michalsn.github.io/codeigniter-tags/