mirror of
https://github.com/10h30/Test-Eloquent-Relationships.git
synced 2026-07-11 18:56:11 +09:00
Fix Task 6 - average of the field
This commit is contained in:
+1
-1
@@ -9,7 +9,7 @@ class Team extends Model
|
|||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
|
||||||
protected $fillable = ['name', 'size'];
|
protected $fillable = ['name', 'size', 'country_id'];
|
||||||
|
|
||||||
public function users()
|
public function users()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ class RelationshipsTest extends TestCase
|
|||||||
|
|
||||||
$response = $this->get('/countries');
|
$response = $this->get('/countries');
|
||||||
$response->assertSee('avg team size 4');
|
$response->assertSee('avg team size 4');
|
||||||
|
$response->assertStatus(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TASK: polymorphic relations
|
// TASK: polymorphic relations
|
||||||
|
|||||||
Reference in New Issue
Block a user