cloner icon indicating copy to clipboard operation
cloner copied to clipboard

Application::make() should not be called statically

Open krokovicsmate opened this issue 5 years ago • 2 comments

In Laravel 7 when i call the duplicate method the error happen:

Non-static method Illuminate\Foundation\Application::make() should not be called statically

The error happen because the App used note the Facade

Need to replace this line in Cloneable trait:

// Deps
use App;

With this

// Deps
use Illuminate\Support\Facades\App;

krokovicsmate avatar Jul 31 '20 11:07 krokovicsmate

Make sure you have this line in your Laravel application.

denisdulici avatar Jul 31 '20 12:07 denisdulici

Of course i have alias for the App. Else where in project working like charm, only in here has a problem with it.

krokovicsmate avatar Jul 31 '20 13:07 krokovicsmate