Closed masumetc closed 3 years ago
Sorry but none of the above makes any sense to me. I'm not sure what you're trying to do.
That error message means you haven't defined a JSON API set of configuration called 'default'. You can read all about that here: https://laravel-json-api.readthedocs.io/en/latest/basics/api/
If you've generated an API but called it something different to 'default', you'll need to follow the instructions in that chapter about setting the name of the default API.
@masumetc Do you have a configuration file json-api-default.php
in your configuration folder?
You are using $client = json_api()->client($guzzleClient);
. Because you are calling json_api()
without a parameter, you it will use json-api-default.php
. If you are calling json_api('myApiName')
, then it will use json-api-myApiName.php
.
Closing this due to lack of response; believe the answers above probably solved the problem!
I am trying to send a http request to remote server
` $guzzleClient = new Client(['base_uri' => 'https://eu.api.tokengateway.io/getToken']); $client = json_api()->client($guzzleClient); $response = $client->query('data', [ 'contractaddress' => '0x5b86a33f0c232fe909eb4602a9d039072869d915', 'apikey' => 'q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m', ]);
Here is my ajaz code
`$(function(){ $("#CheckApi").on("submit", function(e){ e.preventDefault(); var form = $(this); var url = form.attr("action"); var type = form.attr("method"); var data = form.serialize();
Here is my api.php route
Route::get('api','App\Http\Controllers\Api\ApiController@api')->name('api');
I have got this(JSON API 'default' does not exist) error