Slick 3 how can I get the default configuration in the application file
<p>I have seem many examples on the web that has slick 3 configuration as follows</p>

<pre><code>slick.dbs.default.driver="slick_driver"
slick.dbs.default.db.driver="db_driver"
slick.dbs.default.db.url="URL_file
slick.dbs.default.db.user="user"
slick.dbs.default.db.password="password"
</code></pre>

<p>My question is how can you connect to that inside a Scala controller ? I am using play framework version 2.4.6 . I have tried this</p>

<pre><code>def db: Database = Database.forDataSource(DB.getDataSource())
</code></pre>

<p>but I get an error</p>

<pre><code>Error:(5, 17) Play 2 Compiler: 
 C:\Users\nemer\mycontroller\app\controllers\Application.scala:5:
  object db is not a member of package play.api
 import play.api.db.DB
                 ^
</code></pre>

<p>My Controller looks like this</p>

<pre><code>package controllers


import org.mindrot.jbcrypt.BCrypt
import play.api.db.DB

import play.api.libs.json.{Json, JsValue}
import play.api.mvc._
import slick.driver.PostgresDriver.api._
import scala.concurrent.duration._
import scala.concurrent.Await
import play.api.libs.concurrent.Execution.Implicits._


class Application extends Controller {


 // I am trying to get the Slick config settings in here
 def db: Database = Database.forDataSource(DB.getDataSource())

  def mypage = Action {



    val json: JsValue = Json.parse("""
{
  "name" : "Watership Down",
  "location" : {
    "lat" : 51.235685,
    "long" : -1.309197
  },
  "residents" : [ {
    "name" : "Fiver",
    "age" : 4,
    "role" : null
  }, {
    "name" : "Bigwig",
    "age" : 6,
    "role" : "Owsla"

  } ]
}
                                   """)
    Ok(json).as("text/json")
  }

}
</code></pre>