i am getting the error message Unresolvable dependency resolving [Parameter #0 [ $app ]] in class IlluminateSupportServiceProvider on the route to the news index function. i ahave set up the API keys and the service providers but still getting the error above
my newscontroller is as follows:
class NewsController extends Controller
{
protected $mediastackService;
public function __construct(MediastackService $mediastackService)
{
$this->mediastackService = $mediastackService;
}
public function index(Request $request)
{
$parameters = $request->get();
$news = $this->mediastackService->getNews($parameters);
return response()->json($news);
}
}
my mediastackservice.php is as follows:
baseUrl . ‘/news’, array_merge([
‘access_key’ => config(‘services.mediastack.key’),
], $parameters));
if ($response->successful()) {
return $response->json();
}
return null;
}
}
kindly help out
collins Mutugi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.