lundi 24 avril 2017

InvalidArgumentException: Unable to locate factory with name [default] [App\Routedata]

This is my function

public function create($alias, $profileId)
    {
        $this->setClientAndClientProfile($alias, $profileId);

        return view('client.data.map')->with('client', $this->client)->with('clientProfile', $this->clientProfile);
    }

and this is test that i write it

public function createTest()
    {
        $this->Data = factory(App\Data::class)->create([
            'id' => '1',
            'client' => 'first',
            ' name' => 'name1',
            'Status' => ''

        ]);
       $this->be($this->$RouteForecast);
       $this->visit('/backend/data')

        ->seePageIs('/backend/data');

    }

when i run i got this error

InvalidArgumentException: Unable to locate factory with name [default] [App\Data].

how i can solve this problem ?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire