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

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();
    Illuminate\Support\Facades\Facade::setFacadeApplication($container);
    $container->singleton('app', 'Illuminate\Container\Container');
    class_alias('Illuminate\Support\Facades\App', 'App');
}
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

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

Your logo here?

Laravel.io

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

© 2024 Laravel.io - All rights reserved.