Support the ongoing development of →
IOC Packages
Last updated 2 years ago.

I got the answer to this question here:

You are missing one key component. The Application class needs to be bound to the container. The Facade is looking for a class to be bound to 'app' but nothing is, hence your error. You can fix the problem by binding the Illuminate\Container\Container class to 'app':

function setup_App(){
    $container = new Illuminate\Container\Container();
    $container->singleton('app', 'Illuminate\Container\Container');
    class_alias('Illuminate\Support\Facades\App', 'App');

Sign in to participate in this thread!


Your banner here too?


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.