You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-55
Original file line number
Diff line number
Diff line change
@@ -16,44 +16,22 @@ There are no real limits on what characters can be used in a tag. It uses a slug
16
16
#### Composer Install (for Laravel 5+/Lumen 5)
17
17
18
18
```shell
19
-
composer require rtconner/laravel-tagging "~3.1"
19
+
composer require rtconner/laravel-tagging "~3.2"
20
20
```
21
21
22
22
#### Install and then Run the migrations
23
23
24
-
The service provider does not load on every page load, so it should not slow down your app. In `config/app.php` You may add the `TaggingServiceProvider` in the providers array as follows:
24
+
The package should auto-discover when you composer update. Then publish the tagging.php and run the database migrations with these commands.
25
25
26
-
> If you're using Laravel 5.5+ let the package auto discovery make this for you.
Lumen does not have a vendor:publish command, so you will need to create or copy the provided migrations and config file into their respective directory.
After these two steps are done, you can edit config/tagging.php with your prefered settings.
53
-
54
31
#### Setup your models
55
32
```php
56
-
class Article extends \Illuminate\Database\Eloquent\Model {
33
+
class Article extends \Illuminate\Database\Eloquent\Model
34
+
{
57
35
use \Conner\Tagging\Taggable;
58
36
}
59
37
```
@@ -87,43 +65,21 @@ Conner\Tagging\Model\Tag::where('count', '>', 2)->get(); // return all tags used
87
65
Article::existingTags(); // return collection of all existing tags on any articles
88
66
```
89
67
90
-
[More examples in the documentation](docs/usage-examples.md)
91
-
92
-
93
-
### Tag Groups
94
-
95
-
You can create groups with the following artisan command
96
-
97
-
```php
98
-
php artisan tagging:create-group MyTagGroup
99
-
```
100
-
101
-
Set the tag group for a tag
102
-
103
-
```php
104
-
$tag->setGroup('MyTagGroup');
105
-
```
68
+
[Documentation: More Usage Examples](docs/usage-examples.md)
106
69
107
-
To get all the tags in a certain group
70
+
[Documentation: Tag Groups](docs/tag-groups.md)
108
71
109
-
```php
110
-
Tag::inGroup('MyTagGroup')->get()
111
-
```
112
-
113
-
Check if a tag is in a group
114
-
115
-
```php
116
-
$tag->isInGroup('MyTagGroup');
117
-
```
72
+
[Documentation: Tagging Events](docs/events.md)
118
73
74
+
[Documentation: Tag Suggesting](docs/suggesting.md)
119
75
120
76
### Configure
121
77
122
78
[See config/tagging.php](config/tagging.php) for configuration options.
123
79
124
-
###Further Documentation
80
+
###### Lumen Installation
125
81
126
-
[See the docs/ folder](docs) for more documentation.
82
+
[Documentation: Lumen](docs/lumen.md)
127
83
128
84
#### Upgrading Laravel 4 to 5
129
85
@@ -135,5 +91,5 @@ Alternatively you can override Model::$morphClass on your model class to match t
135
91
- Robert Conner - http://smartersoftware.net
136
92
137
93
#### Further Reading
138
-
-[Laravel News article on tagging with this library](https://laravel-news.com/2015/10/how-to-add-tagging-to-your-laravel-app/)
94
+
-[Laravel News article on tagging with this library](https://laravel-news.com/how-to-add-tagging-to-your-laravel-app)
139
95
-[3rd Party Posting on installation with Twitter Bootstrap 2.3](http://blog.stickyrice.net/archives/2015/laravel-tagging-bootstrap-tags-input-rtconner)
Lumen does not have a vendor:publish command, so you will need to create or copy the provided migrations and config file into their respective directory.
0 commit comments