Questions tagged [dingo-api]

A RESTful API package for the Laravel framework.

197 questions
0
votes
1 answer

Dingo APi error message

I am trying to render my mailable in the browser in order to check the content. However I'm getting this message {"message":"sha1() expects parameter 1 to be string, object given","status_code":500} My code snippet I am running Dingo/Api on my page…
Vojta
  • 379
  • 1
  • 4
  • 15
0
votes
2 answers

Laravel 5.1 + Dingo API + JWT token

I use Laravel 5.1 + Dingo API + JWT token. My route is: $api = app('Dingo\Api\Routing\Router'); $api->version('v1', function($api) { $api->post('authenticate', 'App\Http\Controllers\AuthenticateController@authenticate'); $api->post('logout',…
Aleks Per
  • 1,549
  • 7
  • 33
  • 68
0
votes
3 answers

dingo api validator rule need to fix

public function store(Request $request) { $response = array('response' => '', 'success'=>false); $rules = [ 'email' => 'required|email', 'password' => 'required' ]; $validator =…
user9110461
0
votes
1 answer

Your requirements could not be resolved to an installable set of packages Dingo/api does not install on laravel v5.5.24

I want install Dingo package on my project and when I do composer require dingo/api:"2.0.0-alpha1" I have a lot of errors How can I resolve this ?
Goms
  • 2,424
  • 4
  • 19
  • 36
0
votes
1 answer

Dingo API transformer

I have below transformer which works but there is unnecessary array in the response. class NamedayTransformer extends TransformerAbstract { public function transform(Nameday $nameday) { return [ 'nameday' =>…
Vojta
  • 379
  • 1
  • 4
  • 15
0
votes
1 answer

Error on API Routes in Laravel

I am getting error on API Routes in Laravel. I have used Dingo package. Installed it successfully, added in app.php, generated api.php by artisan. In router file, the code is :- use Dingo\Api\Routing\Helpers; $api =…
Deepak Kumar
  • 221
  • 3
  • 17
0
votes
1 answer

Dingo API routing does not pass in GET parameters when routing to controller

I have a Laravel Application and it uses Dingo Router: $api->get('/cash-flow', 'App\Http\Controllers\ReportController@cashFlowReport'); When my front-end calls this api, it gets 200 responses from OPTIONS & GET. However, it does not successfully…
Kenta Goto
  • 305
  • 3
  • 18
0
votes
2 answers

Laravel Dingo API - Only log 500 error, never send error details via api?

I made the below controller to demonstrate the issue of handling 500 errors I am having with dingo api in laravel. I want to be able to detect when a 500 error will be thrown so it never makes it to the client (as it is too much details to share…
Wonka
  • 8,244
  • 21
  • 73
  • 121
0
votes
1 answer

Eloquent delete and MySQL foreign key cascade

I have these tables in MySQL database: users['id', 'name'], roles['id', 'title'] and user_role ['user_id', 'role_id'] where both are foreign keys, CASCADE. When it catches an exception the user remains in the table as wanted, while the row from…
Gantman94
  • 3
  • 3
0
votes
1 answer

Laravel 5.4 Dingo Route Binding

I'm attempting to bind a function to the routing so it takes effect globally. Basically I'm using Hashids to obfuscate the IDs, and want to be able to decode the ID on the route level so I don't need to do it everywhere the ID is uses in different…
Seán McCabe
  • 893
  • 4
  • 23
  • 47
0
votes
1 answer

laravel-apidoc-generator + dingo api error "The token could not be parsed from the request"

Trying to generate API documentation via laravel-apidoc-generator, and get the following error: I tried to use actAsUserId and header options and got the same error.
0
votes
1 answer

Laravel 5.4 + Dingo Api can't get array of post form-data

everybody. I building Laravel api application with DingoApi and I can't get data from postman with "form-data" format. I trying to retreive data with DingoApi functionality, and with Laravel's Route::post('/test', function…
0
votes
1 answer

Laravel 5.4 Dingo/JWT API: Failed to authenticate for valid token

I've implemented Dingo REST API with Laravel 5.4. I'm able to fetch the token from the server. As well as the toke is successfully received by the server. But it is throwing 401 exception and this is the debug stack trace: I've already tried to pass…
Leap Hawk
  • 622
  • 1
  • 6
  • 25
0
votes
1 answer

Lumen Dingo php artisan command error

I have installed Lumen, Dingo to test the JWT integration. On terminal when I try to run unit test case using php artisan command it throws following error PHP Fatal error: Call to undefined function Dingo\Api\Provider\config_path() in…
user269867
  • 3,266
  • 9
  • 45
  • 65
0
votes
1 answer

Route error in rest api using dingo pakckage in laravel 5.1

I am creating a restful api using laravel dingo package.When i am giving url localhost:8000/hello.it is showing error NotFoundHttpException in RouteCollection.php line 161: Here is my…