Skip to content

Commit

Permalink
Fixes to User class #106
Browse files Browse the repository at this point in the history
  • Loading branch information
egorsmkv committed Aug 20, 2024
1 parent 7508c8f commit b00c4b2
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,8 @@ task validate-and-format-caddyfile
```bash
docker run --rm -v .:/code -it node:20-alpine sh

npm -g install npm-check-updates

npm-check-updates --format group -i
$ npm -g install npm-check-updates
$ npm-check-updates --format group -i
```

### Misc
Expand Down
7 changes: 6 additions & 1 deletion apps/frontend/app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@

class User extends Authenticatable
{
use HasFactory, Notifiable;
/** @use HasFactory<UserFactory> */
use HasFactory;

use Notifiable;

protected static string $factory = UserFactory::class;

/**
* The attributes that are mass assignable.
Expand Down
17 changes: 17 additions & 0 deletions apps/frontend/app/Models/UserFactory.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Foundation\Auth\User;

/** @extends Factory<User> */
class UserFactory extends Factory
{
protected $model = User::class;

public function definition(): array
{
return [];
}
}

0 comments on commit b00c4b2

Please sign in to comment.