getherbert / herbert

The WordPress Plugin Framework:
http://getherbert.com/
634 stars 95 forks source link

Herbert-Laravel Model Error #162

Open muubpon opened 7 years ago

muubpon commented 7 years ago

What is the cause of this error message? What should I do?

Fatal error: Uncaught exception 'Illuminate\Contracts\Container\BindingResolutionException' with message 'Target [Illuminate\Contracts\Debug\ExceptionHandler] is not instantiable.'

OS: Windows PHP: 5.6.24 Herbert: current version

ken-bem commented 7 years ago

Can you post the code where you used the Exception Handler?

muubpon commented 7 years ago

This is the code, actually, I already used this code last August and it was successful. But now, it has an error.

<?php

namespace Websiteria\Controllers;

use Herbert\Framework\Models\Post;

/**
 * Class DefaultController.
 */
class DefaultController {

    public function index() {
        $a = Post::find(86);
    }

}
anatree commented 7 years ago

Not sure if it's the right direction but please try to add to your composer.json dependencies:

"illuminate/container": "~5.1.0",

Then remove vendor directory and composer.lock and re-run composer-install

lucas-viewup commented 7 years ago

Works fine, @anatree! it's working fine in Windows 10, but I didn't understand the approach to develop outside of plugins directory. I didn't achieve the symbolic link like in Linux or Mac OSX.