Skip to content
Yii2 plugin for a document model
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
controllers
migrations
.gitignore
Document.php
README.md
composer.json

README.md

Yii2 plugin for a document model

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist sateler/yii2-document "^1.0"

or add

"sateler/yii2-document": "^1.0"

to the require section of your composer.json file.

Once the extension is installed, add namespace to console config:

return [
    'controllerMap' => [
        'migrate' => [
            'class' => 'yii\console\controllers\MigrateController',
            'migrationNamespaces' => [
                'sateler\document\migrations',
            ],
        ],
    ],
];

And controller to web config:

return [
    'controllerMap' => [
        'documents' => [
            'class' => 'sateler\document\controllers\DocumentController',
        ]
    ],
];

Usage

Once installed, you can now use sateler\document\Document in your relations, and redirect to ['documents/view', 'id' => $docId] to view or download.

You can’t perform that action at this time.