public function testGetListWineryErrorNoWinery() { $winery_destroy = Winery::destroy(1); $response = $this->call('GET', 'api/winery'); $winery_infor = Winery::all(); $this->assertEquals(array("code" => ApiResponse::OK, "data" => $winery_infor->toArray()), json_decode($response->getContent(), true)); }
public static function getListWinery() { $winery = Winery::all(); $error_code = ApiResponse::OK; $data = $winery->toArray(); return array("code" => $error_code, "data" => $data); }