README.md 1.17 KB
Newer Older
Marcello Pivanti's avatar
Marcello Pivanti committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# amos-favorites

Extension for add a content, like news, events, etc..., in the favorites.

## Installation

### 1. Add module to your application

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```bash
composer require elitedivision/amos-favorites
```

or add this row

```
"elitedivision/amos-favorites": "dev-master"
```

to the require section of your `composer.json` file.

### 2. Add module configuration

Add module to your main config in backend like this:
	
```php
<?php
'modules' => [
    'favorites' => [
        'class' => 'elitedivision\amos\favorites\AmosFavorites',
        'modelsEnabled' => [
            /**
             * Add here the classnames of the models where you want the comments
             * (i.e. 'elitedivision\amos\news\models\News')
             */
        ]
    ],
],
```

### 3. Apply migrations

To apply migrations you can launch this command:

```bash
php yii migrate/up --migrationPath=@vendor/elitedivision/amos-favorites/src/migrations
```

or add this row to your migrations config in console:

```php
<?php
return [
    '@vendor/elitedivision/amos-favorites/src/migrations',
];
```