Tuesday, April 11, 2017

How to let laravel tinker make a request?

I want to visit my api in tinker just as below in PHPUnit

public function testBasicExample()
{
    // like that,visit my api and get a response
    $response = $this->json('POST', '/user', ['name' => 'Sally']);

    ...
}

But i don't know how to do that, I can just found this in the doc about tinker.

Please Help

Thanks



via Nutto

Advertisement