-
Notifications
You must be signed in to change notification settings - Fork 400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error + looking for Examples of how to implement a slightly more complicated auth #204
Comments
sorry, looks like I am receiving this error even on the posts example, let me double check your tutorial |
For more info - my initial post test is passing, So I would guess I am good to get some data in from the forms. |
Hi @iannazzi |
hi @jadjourban, I am using post. I am currently writing a test using get to see what is going on there. Next Ill move on to postman. Its weird that the phpunit test i wrote passes... |
ohh, I changed the error. I don't think I can use dd('message') to debug... it looks like dingo/api wants me to return a more specific response.... like return $this->response->noContent(); |
hmm keep in mind you can also use so does it work now? |
I am verifying the posted dated using this:
|
You can use the |
It shows "{"message":"405 Method Not Allowed","status_code":405,"debug":" to me, $api->post('users/{user_id}/roles/{role_name}','App\Http\Controllers\HomeController@attachUserRole'); |
same here |
Hi @rajatahirqaiser |
@jadjoubran , have a Look |
And Here is my Code
|
@rajatahirqaiser Can you please post the following:
|
Instead of |
@iannazzi , It still shows the same .. Here you go :
|
@rajatahirqaiser when you visit the URL in your browser, it means you're performing a |
@rajatahirqaiser any updates on this? |
@jadjoubran Sometimes, when I try to scrap pages it says failed to open stream HTTP request failed 404 Not found EVEN URL IS WORKING AND TRUE .. sometimes it says URL (503 - Service Unavilable ), How to fix i t |
Hi @rajatahirqaiser |
First off, awesome work on this project!
I have two additional auth fields: 'company' and 'active' that I need to check... I was looking through docs and couldn't find a solution/explanation to help me get passed an error.
I am erring between the route and controller, and looking at the error message I am not finding where to go next.
$api->group([], function ($api) {
});
class LoginController extends Controller
{
public function login(Request $request)
{
dd('here'); //not getting here....
$credentials = $request->only('company', 'username', 'password');
dd($credentials);
with the json message/error being returned:
{"message":"405 Method Not Allowed","status_code":405,"debug":{"line":8468,"file":"/Users/embrasse-moi/Code/anglar/bootstrap/cache/compiled.php","class":"Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException","trace":["#0 /Users/embrasse-moi/Code/anglar/bootstrap/cache/compiled.php(8464): Illuminate\Routing\RouteCollection->methodNotAllowed(Array)","#1 /Users/embrasse-moi/Code/anglar/bootstrap/cache/compiled.php(8442): Illuminate\Routing\RouteCollection->getRouteForMethods(Object(Dingo\Api\Http\Request), Array)","#2 /Users/embrasse-moi/Code/anglar/bootstrap/cache/compiled.php(7809): Illuminate\Routing\RouteCollection->match(Object(Dingo\Api\Http\Request))","#3 /Users/embrasse-moi/Code/anglar/bootstrap/cache/compiled.php(7757): Illuminate\Routing\Router->findRoute(Object(Dingo\Api\Http\Request))","#4 /Users/embrasse-moi/Code/anglar/bootstrap/cache/compiled.php(7752): Illuminate\Routing\Router->dispatchToRoute(Object(Dingo\Api\Http\Request))","#5 /Users/embrasse-moi/Code/anglar/vendor/dingo/api/src/Routing/Adapter/Laravel.php(65): Illuminate\Routing\Router->dispatch(Object(Dingo\Api\Http\Request))","#6 /Users/embrasse-moi/Code/anglar/vendor/dingo/api/src/Routing/Router.php(558): Dingo\Api\Routing\Adapter\Laravel->dispatch(Object(Dingo\Api\Http\Request), 'v1')","#7 /Users/embrasse-moi/Code/anglar/vendor/dingo/api/src/Http/Middleware/Request.php(112): Dingo\Api\Routing\Router->dispatch(Object(Dingo\Api\Http\Request))","#8 [internal function]: Dingo\Api\Http\Middleware\Request->Dingo\Api\Http\Middleware{closure}(Object(Dingo\Api\Http\Request))","#9 /Users/embrasse-moi/Code/anglar/bootstrap/cache/compiled.php(9487): call_user_func(Object(Closure), Object(Dingo\Api\Http\Request))","#10 /Users/embrasse-moi/Code/anglar/bootstrap/cache/compiled.php(3214): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Dingo\Api\Http\Request))","#11 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Dingo\Api\Http\Request), Object(Closure))","#12 /Users/embrasse-moi/Code/anglar/bootstrap/cache/compiled.php(9479): call_user_func_array(Array, Array)","#13 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Dingo\Api\Http\Request))","#14 /Users/embrasse-moi/Code/anglar/bootstrap/cache/compiled.php(9469): call_user_func(Object(Closure), Object(Dingo\Api\Http\Request))","#15 /Users/embrasse-moi/Code/anglar/vendor/dingo/api/src/Http/Middleware/Request.php(113): Illuminate\Pipeline\Pipeline->then(Object(Closure))","#16 /Users/embrasse-moi/Code/anglar/vendor/dingo/api/src/Http/Middleware/Request.php(89): Dingo\Api\Http\Middleware\Request->sendRequestThroughRouter(Object(Dingo\Api\Http\Request))","#17 [internal function]: Dingo\Api\Http\Middleware\Request->handle(Object(Illuminate\Http\Request), Object(Closure))","#18 /Users/embrasse-moi/Code/anglar/bootstrap/cache/compiled.php(9479): call_user_func_array(Array, Array)","#19 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline{closure}(Object(Illuminate\Http\Request))","#20 /Users/embrasse-moi/Code/anglar/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\Http\Request))","#21 [internal function]: Illuminate\Routing\Pipeline->Illuminate\Routing{closure}(Object(Illuminate\Http\Request))","#22 /Users/embrasse-moi/Code/anglar/bootstrap/cache/compiled.php(9469): call_user_func(Object(Closure), Object(Illuminate\Http\Request))","#23 /Users/embrasse-moi/Code/anglar/bootstrap/cache/compiled.php(2328): Illuminate\Pipeline\Pipeline->then(Object(Closure))","#24 /Users/embrasse-moi/Code/anglar/bootstrap/cache/compiled.php(2312): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))","#25 /Users/embrasse-moi/Code/anglar/public/index.php(53): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))","#26 /Users/embrasse-moi/Code/anglar/server.php(19): require_once('/Users/embrasse...')","#27 {main}"]}}
The text was updated successfully, but these errors were encountered: