Closed shanedaugherty closed 6 years ago
Yes it is 100% possible. If you look closely, Controllers
, Models
and almost everything is an IoC container namespace, it does not matter where the file for that namespace is, it can be inside your own project or inside a package. For example
class MyController {
profile () {
}
}
ioc.bind('MyController', function () {
return new MyController()
})
Inside your routes.
Route.get('me', '@provider:MyController.profile')
I had a feeling that was the case. Thank you for taking the time to reply.
Hello,
It would be great to be able to add Routes, Models, Controllers, and Migrations through a service provider.
Perhaps this is already possible but I could not find anything in the documentation about it.