Level 1
It should not be in the trait but above.
1 like
Hi,
I created a Trait in the test directory which is used by multiple tests.
In the Trait I try to import the User model: use App\User;
<?php
trait TestPrepareQuestionnaire
{
use App\User;
...
public function create_user_team_and_members()
{
....
}
}
This gives the error: Tests\TestPrepareQuestionnaire cannot use App\User - it is not a trait in /project/tests/TestPrepareQuestionnaire.php on line 6
Any idea how to solve this issue?
Thanks in advance!
Please or to participate in this conversation.