Skip to content

Commit

Permalink
Laravel 11
Browse files Browse the repository at this point in the history
  • Loading branch information
spawnia committed Nov 13, 2024
1 parent 871aa29 commit 97d6bc1
Show file tree
Hide file tree
Showing 10 changed files with 655 additions and 909 deletions.
2 changes: 1 addition & 1 deletion app/Models/Comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
final class Comment extends Model
{
/** @return \Illuminate\Database\Eloquent\Relations\BelongsTo<\App\Models\Post, self> */
/** @return \Illuminate\Database\Eloquent\Relations\BelongsTo<\App\Models\Post, $this> */
public function post(): BelongsTo
{
return $this->belongsTo(Post::class);
Expand Down
4 changes: 2 additions & 2 deletions app/Models/Post.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ protected static function booted(): void
});
}

/** @return \Illuminate\Database\Eloquent\Relations\BelongsTo<\App\Models\User, self> */
/** @return \Illuminate\Database\Eloquent\Relations\BelongsTo<\App\Models\User, $this> */
public function author(): BelongsTo
{
return $this->belongsTo(User::class);
}

/** @return \Illuminate\Database\Eloquent\Relations\HasMany<\App\Models\Comment> */
/** @return \Illuminate\Database\Eloquent\Relations\HasMany<\App\Models\Comment, $this> */
public function comments(): HasMany
{
return $this->hasMany(Comment::class);
Expand Down
2 changes: 1 addition & 1 deletion app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ final class User extends Authenticatable
'email_verified_at' => 'datetime',
];

/** @return \Illuminate\Database\Eloquent\Relations\HasMany<\App\Models\Post> */
/** @return \Illuminate\Database\Eloquent\Relations\HasMany<\App\Models\Post, $this> */
public function posts(): HasMany
{
return $this->hasMany(Post::class, 'author_id');
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"require": {
"php": "^8.2",
"laravel/framework": "^11",
"laravel/sanctum": "^2.15",
"laravel/sanctum": "^4",
"laravel/tinker": "^2.9",
"mll-lab/laravel-graphiql": "^3",
"nuwave/lighthouse": "^6"
Expand Down
Loading

0 comments on commit 97d6bc1

Please sign in to comment.