Level 3
Can you call the Activity model in your controllers or anywhere else?
Is it namespaced as App?
I create a model and migration with composer the model name is Activity and all is good
but when I run my test got that error not find App\Activite class why it should looking for that class
this is my test method
public function it_records_activity_when_a_thread_is_created()
{
$this->signIn();
$thread=create('App\Thread');
$this->assertDatabaseHas('activities',[
'type' =>'created_thread',
'user_id' =>auth()->id(),
'subject_id' =>$thread->id,
'subject_type' =>'App\Thread'
]);
$activity=Activity::first();
$this->assertEquals($activity->subject->id,$thread->id);
}
Please or to participate in this conversation.