Showing
2 changed files
with
1 additions
and
6 deletions
... | @@ -24,7 +24,7 @@ class UserController extends Controller | ... | @@ -24,7 +24,7 @@ class UserController extends Controller |
24 | 24 | ||
25 | public function store(StoreRequest $request): array | 25 | public function store(StoreRequest $request): array |
26 | { | 26 | { |
27 | - $user = $this->user->register($request->validated()['user']); | 27 | + $user = $this->user->create($request->validated()['user']); |
28 | 28 | ||
29 | auth()->login($user); | 29 | auth()->login($user); |
30 | 30 | ... | ... |
... | @@ -41,11 +41,6 @@ class User extends Authenticatable implements JWTSubject | ... | @@ -41,11 +41,6 @@ class User extends Authenticatable implements JWTSubject |
41 | return $this->belongsToMany(User::class, 'followers', 'follower_id', 'following_id'); | 41 | return $this->belongsToMany(User::class, 'followers', 'follower_id', 'following_id'); |
42 | } | 42 | } |
43 | 43 | ||
44 | - public function register(array $userRequestData): self | ||
45 | - { | ||
46 | - return $this->create($userRequestData); | ||
47 | - } | ||
48 | - | ||
49 | public function doesUserFollowAnotherUser(int $followerId, int $followingId): bool | 44 | public function doesUserFollowAnotherUser(int $followerId, int $followingId): bool |
50 | { | 45 | { |
51 | return $this->where('id', $followerId)->whereRelation('following', 'id', $followingId)->exists(); | 46 | return $this->where('id', $followerId)->whereRelation('following', 'id', $followingId)->exists(); | ... | ... |
-
Please register or login to post a comment