framework
framework copied to clipboard
Type hinted dependencies on admin pages
Provide support for container auto-resolution of dependencies with type-hinted parameters on administration page controllers.
$page = Page::make('slug', 'Title)
->set();
$page->route('/', 'PageController@index');
Then we calling the index
method to render the page, its depencies should be auto-injected. So we can define code like with the router:
public function index(Filesystem $files, Customer $customer)
{
// Code here... with an instance of Filesystem and Customer model.
}
Early exploration may leverage the service container call
method.