A RESTful API package for the Laravel framework.
Questions tagged [dingo-api]
197 questions
1
vote
1 answer
Config oauth2 for dingo/api Laravel 4.2 has an error Argument 1 passed to
I am BeanNguyen.
I am a beginer with Laravel framework. So i want to build a webservice RestAPI (laravel 4.2).
I use https://github.com/dingo/api and oauth2 lucadegasperi/oauth2-server-laravel to protect my api. But when i complete all config files…

Bean Nguyen
- 11
- 1
0
votes
1 answer
How to fix `There is currently no session available` after an API request call to Laravel 9
After Laravel project upgrade to PHP8 and laravel 9 on the all API endpoints started getting: There is currently no session available.
Upgrade was made from laravel 8 to laravel 9.
PHP was upgraded from 7.4 to 8.1
Full backtrace:
{
"message":…

Tadis
- 41
- 1
- 8
0
votes
1 answer
How I can mock `Dingo\Api\Auth\Provider\JWT` so I can bypass the Authentication overhwad whilst I am unit testing my endpoints?
I am using dingo/api in my api and I want to unit test the endpoint:
class MyApiTest extends TestCase
{
public function testEndpoint()
{
$dispatcher = app('Dingo\Api\Dispatcher');
$fake_token = 'cndksjonsdcnsod';
…

Dimitrios Desyllas
- 9,082
- 15
- 74
- 164
0
votes
0 answers
Laravel Dingo API always response "Not Found"
here's my code:
// api.php
$api = app('Dingo\Api\Routing\Router');
$api->version('v1', function ($api) {
$api->get('test', function (Request $request) {
return "test";
});
}
// request
http://localhost:8000/api/test
i…

sb0321
- 53
- 1
- 8
0
votes
1 answer
how to fix cURL error 60 problem unable to get local issuer certificate
I used dingo/API library and i have problem with third API provider, the error is curl error 60 SSL certificate unable to get local issuer certificate.
Note that i used Debian 9 OS.
I tried to solve it by using cacert.pem but still not working with…
user6580267
0
votes
1 answer
Laravel Dingo class does not exist
I have code on api.php thats using a Dingo function and I am having trouble calling the controller because it always state that Controller is not found even though in their documentation it clearly has specified that I have to put the full path of…

Shulz
- 508
- 3
- 12
- 27
0
votes
1 answer
Merging laravel dingo with laravel-modules and caching config
Here is the problem.
I started a dingo project and am using laravel-modules in it. Every module has its own routing files. Using the project in development environment, everything works fine.
But when I run php artisan config:cache, when a request…

Mohsen Saberi
- 19
- 1
- 7
0
votes
1 answer
api resource returns 404 Not Found
these are my api:
$api = app('Dingo\Api\Routing\Router');
$api->version('v1', ['as' => 'admin',
'middleware' => 'api.auth',
'namespace' => 'Modules\OrgUnit\Http\Controllers'], function ($api) {
…

S.M_Emamian
- 17,005
- 37
- 135
- 254
0
votes
1 answer
Is there a way to act as a user inside of Laravel without hitting the database?
I'm writing unit tests for an API using PHPUnit and Laravel. Most functions I'm testing require that the user is authenticated before the function can be ran. The user data is stored in one table, and their permissions are stored inside of another…

Evan Horsley
- 32
- 6
0
votes
1 answer
The browser overwrites the content of the message after receiving the response
I have a little problem with DingoAPI and Vue.js when I'm trying to get my error message from response. I think the browser is replacing my custom message by the default one. Here is my code:
PHP script
if($request->readerId){
Return succes…

Marshall
- 65
- 1
- 6
0
votes
1 answer
Laravel Dingo API returns 404 error on Apache VHosts
I've build a Laravel Rest API with Dingo\API following a tutorial. I've set this up as virtual host at http://site.test
Vhosts are set up in httpd.conf and /etc/hosts files.
But, when I go to http://site.test, it shows the full project directory.…

partap
- 35
- 6
0
votes
1 answer
How to fix implementation jwt with dingo in lumen 5.8.*? Target [Dingo\Api\Contract\Routing\Adapter] is not instantiable
I have implemented tymon/jwt-auth version 1.0.0-rc4.1 as third-party in my Lumen(5.8.4) application and now when I continue with implementing Authetication with Dingo following https://github.com/dingo/api/wiki/Authentication at step where I need to…

Dach0
- 309
- 4
- 11
0
votes
0 answers
Laravel Dingo API is not returing UTF8 encoded characters
I've just inherited a project in Laravel and it's using Dingo API.
The API is returning strings like Federaci\u00f3ninstead of Federación.
All strings are correctly UTF-8 encoded in the database, so the problem is in the server.
The controller is…

Rosana Rufer
- 599
- 8
- 15
0
votes
1 answer
Class api does not exist Reflection Exception on laravel
I removed Dingo/api from my laravel 5.4 project.
Removed from composer.
created new Routes file
removed References for Dingo in RouteServiceProvider
Removed Dingo Service Provider from config/app.php
However when I call an endpoint, getting…

Garine
- 574
- 5
- 21
0
votes
1 answer
Conflict in routing between Laravel Nova and Dingo API
I have a Laravel API server which only has one web route (test page), everything else is controlled via dingo/api package and all is working correctly.
In config/api.php I've set 'prefix' => env('API_PREFIX', '/') as it's only an API server.
I've…

Jack Barham
- 3,197
- 10
- 41
- 62