The application is actually a facade for the Laravel IoC container, which is commonly used for automatic resolution. Understanding the concept of IoC is vital for integrated application development, but small projects will likely benefit from a well-designed architecture. I would recommend first diving into the Laravel documentation and trying out a few examples for service providers, bindings, and automatic resolution.
Speaking of your example:
namespace My; class NewClass { function __construct($id, $title) { $this->id = $id; $this->title = $title; } } $newClass = App::make('My\NewClass', [1, 'test']);
source share