Skip to content

Commit

Permalink
Merge pull request #2 from jcc/master
Browse files Browse the repository at this point in the history
Rename the file name
  • Loading branch information
overtrue authored Apr 12, 2017
2 parents f3c5cb0 + 47cb4ef commit a955d45
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ Publish the migrations file:
$ php artisan vendor:publish --provider="Overtrue\LaravelFollow\FollowServiceProvider" --tag="migrations"
```

Finally, use FollowTrait and FollowerTrait in User model
Finally, use CanFollow and CanBeFollowed in User model

```php
use Overtrue\LaravelFollow\FollowTrait;
use Overtrue\LaravelFollow\FollowerTrait;
use Overtrue\LaravelFollow\CanFollow;
use Overtrue\LaravelFollow\CanBeFollowed;

class User extends Model
{
use FollowTrait, FollowerTrait;
use CanFollow, CanBeFollowed;
}
```

Expand Down
4 changes: 2 additions & 2 deletions src/FollowerTrait.php → src/CanBeFollowed.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
namespace Overtrue\LaravelFollow;

/**
* Trait FollowerTrait.
* Trait CanBeFollowed.
*/
trait FollowerTrait
trait CanBeFollowed
{
/**
* Check if user is followed by given user.
Expand Down
4 changes: 2 additions & 2 deletions src/FollowTrait.php → src/CanFollow.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
namespace Overtrue\LaravelFollow;

/**
* Trait FollowTrait.
* Trait CanFollow.
*/
trait FollowTrait
trait CanFollow
{
protected $class = __CLASS__;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use Illuminate\Database\Eloquent\ModelNotFoundException;

class FollowerTraitTest extends TestCase
class CanBeFollowedTest extends TestCase
{
public function test_user_can_follow_by_id()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/FollowTraitTest.php → tests/CanFollowTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use Illuminate\Database\Eloquent\ModelNotFoundException;

class FollowTraitTest extends TestCase
class CanFollowTest extends TestCase
{
public function test_user_can_follow_by_id()
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Other.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
namespace Overtrue\LaravelFollow\Test;

use Illuminate\Database\Eloquent\Model;
use Overtrue\LaravelFollow\FollowerTrait;
use Overtrue\LaravelFollow\CanBeFollowed;

class Other extends Model
{
use FollowerTrait;
use CanBeFollowed;

protected $follow = User::class;

Expand Down
6 changes: 3 additions & 3 deletions tests/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
namespace Overtrue\LaravelFollow\Test;

use Illuminate\Database\Eloquent\Model;
use Overtrue\LaravelFollow\FollowTrait;
use Overtrue\LaravelFollow\FollowerTrait;
use Overtrue\LaravelFollow\CanFollow;
use Overtrue\LaravelFollow\CanBeFollowed;

class User extends Model
{
use FollowTrait, FollowerTrait;
use CanFollow, CanBeFollowed;

protected $table = 'users';

Expand Down

0 comments on commit a955d45

Please sign in to comment.