Skip to content

Commit 8f843b1

Browse files
committed
Updated readme
1 parent a785e2a commit 8f843b1

File tree

1 file changed

+15
-18
lines changed

1 file changed

+15
-18
lines changed

README.md

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ This package is a blogging database with maxed out models, migrations and seeder
1111
Here are some code examples:
1212

1313
```php
14+
// Alias namespace path:
15+
// Chriscreates\Blog\Post
16+
// Chriscreates\Blog\Category
17+
// Chriscreates\Blog\Tag
18+
// Chriscreates\Blog\Comment
19+
1420
// Search by the short whereCategories method OR use whereCategory() and specify the field
1521
$results = Post::whereCategories($categories = null)->get();
1622
$results = Post::whereCategory($field, $operator, $value)->get();
@@ -77,19 +83,14 @@ composer require chrisjk123/laravel-blogger
7783
You can publish the migrations with:
7884

7985
```bash
80-
php artisan vendor:publish --provider="Chriscreate\Blog\BloggerServiceProvider" --tag="migrations"
81-
```
82-
83-
Publish the migrations:
84-
85-
```bash
86+
php artisan vendor:publish --provider="Chriscreates\Blog\BloggerServiceProvider" --tag="migrations"
8687
php artisan migrate
8788
```
8889

8990
You can optionally publish the config file with:
9091

9192
```bash
92-
php artisan vendor:publish --provider="Chriscreate\Blog\BloggerServiceProvider" --tag="config"
93+
php artisan vendor:publish --provider="Chriscreates\Blog\BloggerServiceProvider" --tag="config"
9394
```
9495

9596
This is the contents of the published config file, if your `User` class is
@@ -103,29 +104,25 @@ return [
103104
'user_class' => \App\User::class,
104105
'user_key_name' => 'id',
105106
];
106-
107107
```
108108

109-
You can publish the factories with:
109+
## Local testing
110110

111-
```bash
112-
php artisan vendor:publish --provider="Chriscreate\Blog\BloggerServiceProvider" --tag="factories"
113-
```
114-
115-
You can publish the seeder with:
111+
You can publish the factories with:
116112

117113
```bash
118-
php artisan vendor:publish --provider="Chriscreate\Blog\BloggerServiceProvider" --tag="seeders"
114+
php artisan vendor:publish --provider="Chriscreates\Blog\BloggerServiceProvider" --tag="factories"
115+
php artisan vendor:publish --provider="Chriscreates\Blog\BloggerServiceProvider" --tag="seeders"
119116
```
120117

121-
## Documentation
118+
## Usage
122119

123120
All you have to do is add the `HasPosts` to your User model to get started.
124121

125122
``` php
126123
namespace App;
127124

128-
use Chriscreate\Blog\Traits\User\HasPosts;
125+
use Chriscreates\Blog\Traits\User\HasPosts;
129126
use Illuminate\Foundation\Auth\User as Authenticatable;
130127
use Illuminate\Notifications\Notifiable;
131128

@@ -136,13 +133,13 @@ class User extends Authenticatable
136133
// ...
137134
}
138135

139-
140136
// Retrieve the posts created by the user(s)
141137
$user->posts;
142138

143139
// Retrieve the comments created by the user(s)
144140
$user->comments;
145141
```
142+
146143
### Changelog
147144

148145
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

0 commit comments

Comments
 (0)