{"id":14987303,"url":"https://github.com/yassinedoghri/codeigniter-icons","last_synced_at":"2025-04-11T23:52:51.274Z","repository":{"id":230025845,"uuid":"777340005","full_name":"yassinedoghri/codeigniter-icons","owner":"yassinedoghri","description":"A CodeIgniter4 library with convenient helper functions to render svg icons using https://github.com/yassinedoghri/php-icons.","archived":false,"fork":false,"pushed_at":"2024-10-20T16:07:49.000Z","size":212,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-04-11T23:52:46.529Z","etag":null,"topics":["codeigniter-library","codeigniter4","iconify","icons","svg-icons"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yassinedoghri.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-25T17:04:25.000Z","updated_at":"2024-10-30T21:51:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"4eb10073-9ea9-4d2e-a92a-546fcc440354","html_url":"https://github.com/yassinedoghri/codeigniter-icons","commit_stats":{"total_commits":8,"total_committers":1,"mean_commits":8.0,"dds":0.0,"last_synced_commit":"76526f22734df74651e784de6633962a05dcbd97"},"previous_names":["yassinedoghri/codeigniter-iconify","yassinedoghri/codeigniter-icons"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yassinedoghri%2Fcodeigniter-icons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yassinedoghri%2Fcodeigniter-icons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yassinedoghri%2Fcodeigniter-icons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yassinedoghri%2Fcodeigniter-icons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yassinedoghri","download_url":"https://codeload.github.com/yassinedoghri/codeigniter-icons/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248497851,"owners_count":21113984,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["codeigniter-library","codeigniter4","iconify","icons","svg-icons"],"created_at":"2024-09-24T14:14:24.980Z","updated_at":"2025-04-11T23:52:51.239Z","avatar_url":"https://github.com/yassinedoghri.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# CodeIgniter Icons 🔥 🙂\n\nA [CodeIgniter4](https://codeigniter.com/) library with convenient helper\nfunctions to render svg icons using\n[php-icons](https://github.com/yassinedoghri/php-icons).\n\n[![Latest Stable Version](https://poser.pugx.org/yassinedoghri/codeigniter-icons/v)](https://packagist.org/packages/yassinedoghri/codeigniter-icons)\n[![Total Downloads](https://poser.pugx.org/yassinedoghri/codeigniter-icons/downloads)](https://packagist.org/packages/yassinedoghri/codeigniter-icons)\n[![License](https://img.shields.io/github/license/yassinedoghri/codeigniter-icons?color=green)](https://packagist.org/packages/yassinedoghri/codeigniter-icons)\n[![PHP Version Require](https://poser.pugx.org/yassinedoghri/codeigniter-icons/require/php)](https://packagist.org/packages/yassinedoghri/codeigniter-icons)\n\n\u003c/div\u003e\n\n## 🚀 Getting started\n\n### 0. Prerequisites\n\nUsage of CodeIgniter Icons requires the following:\n\n- A CodeIgniter 4.3.5+ based project\n- Composer for package management\n- PHP 8.1+\n\n### 1. Install via composer\n\n```sh\ncomposer require yassinedoghri/codeigniter-icons\n```\n\n### 2. Setup\n\n1. [init and configure PHPIcons](https://github.com/yassinedoghri/php-icons),\n   ie. create the PHPIcons config file.\n\n2. add icons helper to your `app/Config/Autoload.php` file:\n\n```php\npublic $helpers = [/*...other helpers...*/, 'icons'];\n```\n\n### 3. Usage\n\nUse the `icon(string $iconKey, array $attributes)` helper function in your View\nfiles to render svg icons:\n\n```php\n\u003c?= icon('material-symbols:bolt') ?\u003e\n// \u003csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"1em\" height=\"1em\" viewBox=\"0 0 24 24\"\u003e\n//      \u003cpath fill=\"currentColor\" d=\"m8 22l1-7H4l9-13h2l-1 8h6L10 22z\"/\u003e\n// \u003c/svg\u003e\n\n\u003c?= icon('material-symbols:bolt', ['class' =\u003e 'text-2xl', \"style\" =\u003e \"color: yellow;\"]) ?\u003e\n// \u003csvg class=\"text-2xl\" style=\"color: yellow;\" [...]\u003e...\u003c/svg\u003e\n\n\u003c?= icon('material-symbols:bolt')\n        -\u003eattr('class', 'text-2xl')\n        -\u003eattr('style', 'color: yellow;') ?\u003e\n// \u003csvg class=\"text-2xl\" style=\"color: yellow;\" [...]\u003e...\u003c/svg\u003e\n```\n\nFor more usage info, see\n[php icons docs](https://github.com/yassinedoghri/php-icons).\n\n## ⚙️ Configuration\n\nCheckout PHPIcons config reference to tweak things as you please.\n\n```php\n// new file - app/Config/Icons.php\n\u003c?php\n\ndeclare(strict_types=1);\n\nnamespace Config;\n\n// ...\nuse CodeIgniterIcons\\Config\\Icons as CodeIgniterIcons;\n\nclass Icons extends CodeIgniterIcons\n{\n    public string $phpIconsConfigPath = ROOTPATH . 'php-icons.php';\n}\n```\n\n## 📜 License\n\nCode released under the [MIT License](https://choosealicense.com/licenses/mit/).\n\nCopyright (c) 2024-present, Yassine Doghri\n([@yassinedoghri](https://yassinedoghri.com/)).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyassinedoghri%2Fcodeigniter-icons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyassinedoghri%2Fcodeigniter-icons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyassinedoghri%2Fcodeigniter-icons/lists"}