Laravel 5 BindingResolutionException in Container.php line 827

Error: [caption id=“attachment_248” align=“aligncenter” width=“300”] laravel-ioc-binding-exception[/caption] Context that caused this eror [caption id=“attachment_249” align=“aligncenter” width=“300”] test controller[/caption] [caption id=“attachment_250” align=“aligncenter” width=“300”] foo service with php primitive type[/caption] When working with laravel 5, have you ever ask yourself that how** Laravel IOC** work, how **Laravel IOC** can handle concrete class binding instead of defining in somewhere (for laravel in Service providers). Basically, if you inject a concrete class to another class, it will automatically bind to that class by laravel Container...

January 18, 2016 · 2 min · longka