ellipsesynergie / api-response

Simple package to handle response properly in your API.
MIT License
377 stars 53 forks source link

Call to undefined method Illuminate\Foundation\Application::middleware() #47

Open solarsoft0 opened 6 years ago

solarsoft0 commented 6 years ago

Steps to reproduce

  1. include the middleware in app/http/kernel.php

Expected behaviour

i expect the middleware to be registered as described in the readme

Tell us what should happen

Actual behaviour

middleware not recognise

Server configuration

Operating system:

*Web server:apache*

*Database:php*

*PHP version:7.2*

Client configuration

*Browser:chrome*

*Operating system:windows*

Logs

Web server error log


Fatal error: Uncaught Error: Call to undefined method Illuminate\Foundation\Application::middleware() in C:\Users\SOLARSOFT\PhpstormProjects\lifetv\bootstrap\app.php:44
Stack trace:
#0 C:\Users\#####\PhpstormProjects\###\artisan(20): require_once()
#1 {main}
  thrown in C:\Users\#########\PhpstormProjects\####\bootstrap\app.php on line 44
joelcollyer commented 6 years ago

Instead of adding middleware to bootstrap/app.php, have you tried adding EllipseSynergie\ApiResponse\Laravel\ResponseServiceProvider::class, to the array of providers in your config/app.php file?