object User {
def login(email: String, password: String)(implicit DB: Database): Option[User] = {
DB.withConnection { implicit c =>
// TODO
}
}
}
class Application @Inject() (implicit DB: Database) extends Controller {
def index = Action { User.login(/**/) }
}