Download the PHP package shiyang/yii2-masonry without Composer
On this page you can find all versions of the php package shiyang/yii2-masonry. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download shiyang/yii2-masonry
More information about shiyang/yii2-masonry
Files in shiyang/yii2-masonry
Download shiyang/yii2-masonry
More information about shiyang/yii2-masonry
Files in shiyang/yii2-masonry
Vendor shiyang
Package yii2-masonry
Short Description Masonry Yii2 Extension width infinitescroll
License MIT
Package yii2-masonry
Short Description Masonry Yii2 Extension width infinitescroll
License MIT
Please rate this library. Is it a good library?
Informations about the package yii2-masonry
yii2-masonry
Masonry Yii2 Extension width infinitescroll
Installation
The preferred way to install this extension is through composer.
Either run
or add
to the require section of your composer.json
file.
Usage
Once the extension is installed, simply use it in your code by :
Controller action:
function actionIndex()
{
$query = Article::find()->where(['status' => 1]);
$countQuery = clone $query;
$pages = new Pagination(['totalCount' => $countQuery->count()]);
$models = $query->offset($pages->offset)
->limit($pages->limit)
->all();
return $this->render('index', [
'models' => $models,
'pages' => $pages,
]);
}
View:
\shiyang\masonry\Masonry::begin([
'options' => [
'id' => 'models'
],
'pagination' => $pages
]);
foreach ($models as $model) {
// display $model here
}
\shiyang\masonry\Masonry::end();
All versions of yii2-masonry with dependencies
PHP Build Version
Package Version
Requires
yiisoft/yii2 Version
*
shiyang/yii2-infinite-scroll Version *
bower-asset/masonry Version ^3.2
bower-asset/imagesloaded Version *
shiyang/yii2-infinite-scroll Version *
bower-asset/masonry Version ^3.2
bower-asset/imagesloaded Version *
The package shiyang/yii2-masonry contains the following files
Loading the files please wait ....