mirror of
https://github.com/10h30/Test-Eloquent-Relationships.git
synced 2026-06-05 15:07:42 +09:00
Merge pull request #45 from thinkverse/fix-countries-test
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()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -106,6 +106,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