A RESTful API package for the Laravel framework.
Questions tagged [dingo-api]
197 questions
1
vote
1 answer
Create object with form-encoded dot-path properties
In laravel/dingo you may create new objects by POSTing the data either as application/x-www-form-urlencoded or as application/json:
$ curl -XPOST --data name=foo http://example.org/user
JSON:
$ curl -XPOST -H 'Content-type: application/json' --data…

cweiske
- 30,033
- 14
- 133
- 194
1
vote
0 answers
Authenticate with username only Laravel 5.2
I'm trying to let user login with thier national_id only.All I need is to log/signup users with thier national_id, if exists then return JSON true if not then release token to save user in mobile so he doesn't need to login again.here the…

AlmoDev
- 969
- 2
- 18
- 46
1
vote
1 answer
Laravel: Deny empty PUT requests in validation
Laravel 5.3's $api->resource() routes map PUT requests to the controller's update method.
I fail to trigger a validation error when an empty HTTP PUT request is made. My $this->validate() rules are all optional, since no field is required in an…

cweiske
- 30,033
- 14
- 133
- 194
1
vote
0 answers
How to upload file from a REST API with laravel5
i am new to laravel and having an issue regarding REST API over file processing,and i am using dingo laravel api
Here what i have done so for
$user = User::findOrFail($request->user_id);
$user->first_name = $request->first_name;
…

Khirad Zahra
- 843
- 2
- 17
- 42
1
vote
3 answers
Unable to authenticate with invalid token error in dingo/api with jwt-auth
I'm using dingo/api (that has built-in support for jwt-auth) to make an API.
Suppose this is my routes :
$api->group(['prefix' => 'auth', 'namespace' => 'Auth'], function ($api) {
$api->post('checkPhone',…

Ahmad Badpey
- 6,348
- 16
- 93
- 159
1
vote
2 answers
Redis NOAUTH Authentication required. [tcp://127.0.0.1:6379] Laravel
I am working on a Laravel project that uses dingo package to manage some APIs. I changed CACHE_DRIVER=array variable in my .env file to CACHE_DRIVER=redis because dingo no longer support array for CACHE_DRIVER. I therefore installed redis on my…

Awa Melvine
- 3,797
- 8
- 34
- 47
1
vote
1 answer
How does jwt api authentication work (with dingo-laravel)
I know the question is kind of broad but let me narrow down. I have built a small social network with laravel and I am looking forward to building the api with dingo my problem is I will like to know the developers using my api(Developer…

Fenn-CS
- 863
- 1
- 13
- 30
1
vote
0 answers
dingo api laravel 5.1 reflection exception error
I got the error immediately I added the route group to the following group
version('v1', function ($api) {
$api->post('auth/login', 'App\Api\V1\Controllers\AuthController@login');
…

itsdenty
- 33
- 7
1
vote
1 answer
Dingo Api response->created | location and content example
I am creating API with Laravel 5.2 and Dingo API package. When a user is created, I want to return 201 response with the new $user->id.
My Code
return $this->response->created();
As per Dingo documentatio, I can provide a location and $content as…

Ariful Haque
- 3,662
- 5
- 37
- 59
1
vote
0 answers
How to use token refresh in ranm8/requestify?
I have my api with dingo/laravel. Normally works without problems for mobile (android).
My AuthController@token in dingo/laravel:
public function tokenRefresh()
{
$token = JWTAuth::getToken(); // Header:Auth..Baerer ...
if…

Kvlknctk
- 634
- 12
- 27
1
vote
1 answer
Laravel dingo api not recognizing the method giving error Method [testing] does not exist
i have two routes
1. $api->get('usersInfo','App\Http\Controllers\ApiController@usersInfo');
2. $api->get("checkboxbriefs/tbbid/{tbbid}","App\Http\Controllers\
ApiController@testing");
which i am using like this.
$api =…

Kumar Ravi Singh
- 181
- 1
- 16
1
vote
2 answers
Target [Dingo\Api\Contract\Routing\Adapter] is not instantiable while building [Dingo\Api\Routing\Router] error on Lumen
I was trying ti use Dingo package with Lumen.
But unfortunately while setting up routes ,
its showing following error.
Target [Dingo\Api\Contract\Routing\Adapter] is not instantiable while building [Dingo\Api\Routing\Router] error on Lumen
Please…

Lakin Mohapatra
- 1,097
- 11
- 22
1
vote
2 answers
Internal request from Laravel to Lumen Api
I'm currently creating an API for my website with Lumen (http://api.example.com). The API handles CRUD: like changing/reading user data, updating articles, adding comments, user auth and so on.
The API is necessary because I'm calling it from my…

Jordy
- 4,719
- 11
- 47
- 81
1
vote
2 answers
Dingo Api Transformer not working properly. Return array instead of the transformer
This is my first Dingo Api implementation. This is my
RoleTransformer class
namespace App\Api\V1\Transformers;
use League\Fractal\TransformerAbstract;
use App\Role;
class RoleTransformer extends TransformerAbstract
{
public function…

Ariful Haque
- 3,662
- 5
- 37
- 59
1
vote
1 answer
Laravel php artisan shows error of JWT
I am getting the following errors for any of the php artisan commands. I am using laravel/dingo package.
Did the following steps which resulted in the error
Loading composer repositories with package information
Updating dependencies (including…

Ajeesh
- 5,650
- 8
- 30
- 52