Questions tagged [dingo-api]

A RESTful API package for the Laravel framework.

197 questions
1
vote
2 answers

Laravel 5.2 & Dingo api.auth middleware group

I try to GET result of "testing" from the API with Authorization as header but I don't know why it doesn't work. It works for "hello" but not works for "testing". It doesn't produce any error and it redirect me to the main page of Laravel.…
Rick
  • 541
  • 1
  • 8
  • 22
1
vote
0 answers

Laravel PHPUnit Testing with Internal Http Request

I am new to laravel and I am trying to build a PHPUnit testing using phpunit command. However, the test keeps saying Expected status code 200 but received 400. And when I test same uri on Postman, it works perfectly fine. When I use phpunit command,…
smchae
  • 1,035
  • 3
  • 17
  • 39
1
vote
1 answer

Laravel JWT Authentication without User Model

I'm trying to build a laravel application and API for mobile users in the same project. The main web is actually a backend of a website and require proper authentication that I have already implemented. And the api also need to authenticate but with…
AHSAN
  • 101
  • 1
  • 3
  • 10
1
vote
1 answer

Registering Dingo route

I'm bit confused. Where do I register the router? Inside routes/api.php? Or elsewhere? To avoid complications with your main application routes this package utilizes its own router. As such we must first get an instance of the API router to create…
Vojta
  • 379
  • 1
  • 4
  • 15
1
vote
1 answer

php convert Object to legible array

I have this variable: $token = $resource->getToken(); This represent a Dingo\OAuth2\Entity\Token Object: Dingo\OAuth2\Entity\Token Object ( [attributes:protected] => Array ( [token] =>…
Jonathan Nuñez
  • 432
  • 6
  • 19
1
vote
1 answer

All Dingo routes return 404 when phpunit testing

original posted at https://github.com/dingo/api/issues/1472 I'm using Lumen 5.1 and DingoApi 1.0.x to do my api development, and now I'm trying to do some acceptance testing. Following the documentation of Lumen, here is how I do it: Here is a…
unifreak
  • 773
  • 6
  • 17
1
vote
1 answer

dingo error while get method with parameter

$api->version('v1', ['middleware' => 'api.auth'], function($api){ $api->get('auth/user', 'App\Http\Controllers\Api\ApiUserController@getAuthUser'); $api->get('auth/getInfo',…
Amy
  • 163
  • 1
  • 11
1
vote
1 answer

Laravel Dingo API Route 404 for @show

Im using Dingo to build out an API and up until this point I've had no problems with the routes, until trying to add show into the controller, I'm just getting a 404. Details here: { "error": { "message": "404 Not Found", …
Seán McCabe
  • 893
  • 4
  • 23
  • 47
1
vote
1 answer

Error (405) Method Not Allowed when using POST

I am using Laravel 5.4 with JWTAuth & Dingo and for some reason I am now no longer able to make POST requests with Postman. This was working when I first set it up, but not I get the response 405 Method Not Allowed This seems to have been raised a…
Seán McCabe
  • 893
  • 4
  • 23
  • 47
1
vote
1 answer

Lumen with Dingo API Helpers returns wrong status code for response

I'm using Lumen with Dingo API for building an API. My registration function checks to see if the email specified already exists. Using Dingo API Helpers to return an error response if the email already exists in the…
AP 2022
  • 738
  • 1
  • 5
  • 20
1
vote
0 answers

Lumen + Dingo + JWT = Error 401

I'm using this package for my project : https://github.com/krisanalfa/lumen-jwt My project was working perfectly on my local server but not when i make it online. I can login successfully, the token is generated but after that, each request receive…
TheShun
  • 1,128
  • 6
  • 15
  • 21
1
vote
1 answer

Internal request does not send parameter when testing

I am using Dingo to manage the API of my application. It has a feature to dispatch an internal request (https://github.com/dingo/api/wiki/Internal-Requests), in the end it calls the Laravel internal request dispatcher. I am facing the following…
fred00
  • 571
  • 2
  • 8
  • 23
1
vote
1 answer

Laravel JWT Auth Returning False

I have followed the tutorial below but when I get the current user it always returns false. I am able to sign in and get my token in postman. I then create the url and hit send. However the following function always returns false. $currentUser =…
Matt
  • 383
  • 1
  • 5
  • 20
1
vote
0 answers

Dingo API pagination with illuminate builder not eloquent

I am in the process of starting to learn Laravel 5.3 and Dingo API to build a basic REST API. I am trying to return the paginated JSON representation of a report query result. I can get pagination to work using Eloquent models, however not when…
Cody Mays
  • 127
  • 1
  • 9
1
vote
1 answer

Authenticate users without email in Laravel

I'm trying to make email optional when user signs up. Here is package. So I removed email' => 'required|email|unique:users', in this function: public function signup(Request $request) { $credentials = $request->all(); $validator =…
AlmoDev
  • 969
  • 2
  • 18
  • 46