{"id":15282355,"url":"https://github.com/yidas/yii2-bootstrap","last_synced_at":"2025-04-12T22:55:01.371Z","repository":{"id":57086805,"uuid":"147545511","full_name":"yidas/yii2-bootstrap","owner":"yidas","description":"Bootstrap Asset Bundle for Yii2 framework with official Composer","archived":false,"fork":false,"pushed_at":"2018-09-30T14:35:43.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T22:54:58.834Z","etag":null,"topics":["asset-bundle","bootstrap","bootstrap4","yii2","yii2-asset","yii2-extension"],"latest_commit_sha":null,"homepage":"https://getbootstrap.com/","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/yidas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-05T16:09:13.000Z","updated_at":"2021-01-12T17:46:55.000Z","dependencies_parsed_at":"2022-08-25T00:50:35.241Z","dependency_job_id":null,"html_url":"https://github.com/yidas/yii2-bootstrap","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yidas%2Fyii2-bootstrap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yidas%2Fyii2-bootstrap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yidas%2Fyii2-bootstrap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yidas%2Fyii2-bootstrap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yidas","download_url":"https://codeload.github.com/yidas/yii2-bootstrap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248643048,"owners_count":21138353,"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":["asset-bundle","bootstrap","bootstrap4","yii2","yii2-asset","yii2-extension"],"created_at":"2024-09-30T14:25:18.307Z","updated_at":"2025-04-12T22:55:01.342Z","avatar_url":"https://github.com/yidas.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/yiisoft\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://avatars0.githubusercontent.com/u/993323\" height=\"85px\"\u003e\n    \u003c/a\u003e \u0026nbsp; \n    \u003ca href=\"https://getbootstrap.com/\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://camo.githubusercontent.com/eada7452c242d40867df5f978be99825c9ead3a8/68747470733a2f2f76342d616c7068612e676574626f6f7473747261702e636f6d2f6173736574732f6272616e642f626f6f7473747261702d736f6c69642e737667\" height=\"80px\"\u003e\n    \u003c/a\u003e\n    \u003c!--\n    \u003ca href=\"https://github.com/yiisoft\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://avatars0.githubusercontent.com/u/993323\" height=\"100px\"\u003e\n    \u003c/a\u003e \n    --\u003e\n    \u003ch1 align=\"center\"\u003eBootstrap Extension for Yii 2 \u003c/h1\u003e\n    \u003cbr\u003e\n\u003c/p\u003e\n\nBootstrap Asset Bundle extension for Yii2 framework with official Composer\n\n[![Latest Stable Version](https://poser.pugx.org/yidas/yii2-bootstrap/v/stable?format=flat-square)](https://packagist.org/packages/yidas/yii2-bootstrap)\n[![Latest Unstable Version](https://poser.pugx.org/yidas/yii2-bootstrap/v/unstable?format=flat-square)](https://packagist.org/packages/yidas/yii2-bootstrap)\n[![License](https://poser.pugx.org/yidas/yii2-bootstrap/license?format=flat-square)](https://packagist.org/packages/yidas/yii2-bootstrap)\n\nThis is the [Bootstrap](https://getbootstrap.com/) extension for [Yii framework 2.0](http://www.yiiframework.com/). It encapsulates [Bootstrap](https://github.com/twbs/bootstrap) distribution assets and thus makes using Bootstrap in Yii applications extremely easy.\n\n\nFEATURES\n--------\n\n- ***No Bower**, Composer installation only*\n\n- ***CDN \u0026 Official** assets source provided*\n\n- ***Version Controll** refers to jQuery*\n\n\n---\n\nREQUIREMENTS\n------------\n\nThis library requires the following:\n\n- PHP 5.4.0+\n- yiisoft/yii2 2.0.6+\n- twbs/bootstrap 4.0+\n- yidas/yii2-jquery 2.0+\n\n---\n\n\nINSTALLATION\n------------\n\nThe preferred install way is through [Composer](http://getcomposer.org/download/):\n\n```\ncomposer require yidas/yii2-bootstrap\n```\n\nVersion options refered Bootstrap release:\n\n```\ncomposer require yidas/yii2-bootstrap ~3.0\ncomposer require yidas/yii2-bootstrap ~4.0\n```\n\nOr you could edit `composer.json` with adding package in require section then run `composer update`.\n\n```\n\"yidas/yii2-bootstrap\": \"*\"\n```\n\n---\n\nCONFIGURATION\n-------------\n\nRegister or depend Asset into your application:\n\n```php\nyidas\\yii\\bootstrap\\BootstrapAsset\n```\n    \nFor example, to register Bootstrap assets in view :\n\n```php\n\\yidas\\yii\\bootstrap\\BootstrapAsset::register($this);\n```\n    \nOr as dependency in your app asset bundle :    \n\n```php\nnamespace app\\assets;\nuse yii\\web\\AssetBundle;\nclass AppAsset extends AssetBundle\n{\n    public $basePath = '@webroot';\n    public $baseUrl = '@web';\n    public $css = [\n        'css/site.css',\n    ];\n    public $js = [\n    ];\n    public $depends = [\n        'yii\\web\\YiiAsset',\n        'yidas\\yii\\bootstrap\\BootstrapAsset'\n    ];\n}\n```\n\n\n### CDN Asset Mode\n\nYou could switch Asset to use CDN distribution by configuring `config` file:\n\n```php\n'components' =\u003e [\n    'assetManager' =\u003e [\n        'bundles' =\u003e [\n            'yidas\\yii\\bootstrap\\BootstrapAsset' =\u003e [\n                'cdn' =\u003e true,\n                // 'cdnVersion' =\u003e '4.1.3',\n            ],\n        ],\n    ],\n],\n```\n\n#### Specify a CDN source\n\nYou could also specify CDN source you like:\n\n```php\n'assetManager' =\u003e [\n    'bundles' =\u003e [\n        'yidas\\yii\\fontawesome\\FontawesomeAsset' =\u003e [\n            'cdn' =\u003e true,\n            'cdnCSS' =\u003e ['https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css'],\n            'cdnJS' =\u003e ['https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js'],\n        ],\n    ],\n],\n```\n\n\n### jQuery Dependency\n\nThis Bootstrap extension required [jQuery](https://github.com/jquery/jquery) Javascript library, you could set `yii\\web\\JqueryAsset` in `$depends`, or simplly depends a asset included your own jQuery JS file whether is CDN or not.\n\n```php\n    public $depends = [\n        //'yii\\web\\JqueryAsset',\n        'yidas\\yii\\jquery\\JqueryAsset',\n        'yidas\\yii\\bootstrap\\BootstrapAsset'\n    ];\n```\n\nAnother way, you could easliy enable jquery dependency by setting `jquery` property form `BootstrapAsset`:\n\n```php\n'components' =\u003e [\n    'assetManager' =\u003e [\n        'bundles' =\u003e [\n            'yidas\\yii\\bootstrap\\BootstrapAsset' =\u003e [\n                'jquery' =\u003e true,\n                // 'cdn' =\u003e true,\n            ],\n            'yidas\\yii\\jquery\\JqueryAsset' =\u003e [\n                // 'cdn' =\u003e true,\n            ],\n        ],\n    ],   \n],\n```\n\n---\n\nUSAGE\n-----\n\n### Version Control\n\n#### Update dependent packages\n\n    composer update yidas/yii2-bootstrap\n\n#### Update newest Bootstrap version\n\n    composer update twbs/bootstrap\n\n#### Specify a Bootstrap version\n\n    composer require twbs/bootstrap 4.1.3\n    \n    \n    \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyidas%2Fyii2-bootstrap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyidas%2Fyii2-bootstrap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyidas%2Fyii2-bootstrap/lists"}