I am trying to make a post request to the example url endpoint but I keeping running into this weird error "The GET method is not supported for this route. Supported methods: POST." Bellow is my code route and controller code:
Route Snippet:
Route::post('/posts', 'PostController@store')->name('store');
Controller Snippet:
public function store(){
$client = new \GuzzleHttp\Client();
$url = "https://cdc-npin.lndo.site/api/nhtd-event/json";
$response = $client->post($url, [
'form_params' => [
'key1' => 'value1',
'key2' => 'value2',
'key3' => 'value3',
'key4' => 'value4',
]
]);
dd($response
What am I not doing correctly??
dd($response);and notdd($response