diff --git a/modules/application/config/auth.php b/modules/application/config/auth.php new file mode 100644 index 00000000..7c3ee766 --- /dev/null +++ b/modules/application/config/auth.php @@ -0,0 +1,44 @@ + function($id) + { + return User::find($id); + }, + + /* + |-------------------------------------------------------------------------- + | Retrieve Users By Username + |-------------------------------------------------------------------------- + | + | This method is called by the Auth::check() method when attempting to + | retrieve a user by their username, such as when checking credentials + | received from a login form. + | + | You are free to change this method for your application however you wish. + | + | Note: This method must return an object that has "id" and "password" + | properties. The type of object returned does not matter. + | + */ + + 'by_username' => function($username) + { + return User::where_email($username)->first(); + }, + +); \ No newline at end of file diff --git a/modules/application/config/cache.php b/modules/application/config/cache.php new file mode 100644 index 00000000..7c6bf32e --- /dev/null +++ b/modules/application/config/cache.php @@ -0,0 +1,52 @@ + 'file', + + /* + |-------------------------------------------------------------------------- + | Cache Key + |-------------------------------------------------------------------------- + | + | This key will be prepended to item keys stored using Memcached and APC to + | prevent collisions with other applications on the server. + | + */ + + 'key' => 'laravel', + + /* + |-------------------------------------------------------------------------- + | Memcached Servers + |-------------------------------------------------------------------------- + | + | The Memcached servers used by your application. + | + | Memcached is a free and open source, high-performance, distributed memory + | object caching system, generic in nature, but intended for use in speeding + | up dynamic web applications by alleviating database load. + | + | For more information about Memcached, check out: http://memcached.org + | + */ + + 'servers' => array( + array('host' => '127.0.0.1', 'port' => 11211, 'weight' => 100), + ), + +); \ No newline at end of file diff --git a/modules/application/config/db.php b/modules/application/config/db.php new file mode 100644 index 00000000..d8109118 --- /dev/null +++ b/modules/application/config/db.php @@ -0,0 +1,73 @@ + 'sqlite', + + /* + |-------------------------------------------------------------------------- + | Database Connections + |-------------------------------------------------------------------------- + | + | All of the database connections used by your application. + | + | Supported Drivers: 'mysql', 'pgsql', 'sqlite'. + | + | Note: When using the SQLite driver, the path and "sqlite" extention will + | be added automatically. You only need to specify the database name. + | + | Using a driver that isn't supported? You can still establish a PDO + | connection. Simply specify a driver and DSN option: + | + | 'odbc' => array( + | 'driver' => 'odbc', + | 'dsn' => 'your-dsn', + | 'username' => 'username', + | 'password' => 'password', + | ) + | + | Note: When using an unsupported driver, Eloquent and the fluent query + | builder may not work as expected. + | + */ + + 'connections' => array( + + 'sqlite' => array( + 'driver' => 'sqlite', + 'database' => 'application', + ), + + 'mysql' => array( + 'driver' => 'mysql', + 'host' => 'localhost', + 'database' => 'database', + 'username' => 'root', + 'password' => 'password', + 'charset' => 'utf8', + ), + + 'pgsql' => array( + 'driver' => 'pgsql', + 'host' => 'localhost', + 'database' => 'database', + 'username' => 'root', + 'password' => 'password', + 'charset' => 'utf8', + ), + + ), + +); \ No newline at end of file diff --git a/modules/application/config/error.php b/modules/application/config/error.php new file mode 100644 index 00000000..885e95c1 --- /dev/null +++ b/modules/application/config/error.php @@ -0,0 +1,58 @@ + true, + + /* + |-------------------------------------------------------------------------- + | Error Logging + |-------------------------------------------------------------------------- + | + | Error Logging will use the "logger" function defined below to log error + | messages, which gives you complete freedom to determine how error + | messages are logged. Enjoy the flexibility. + | + */ + + 'log' => false, + + /* + |-------------------------------------------------------------------------- + | Error Logger + |-------------------------------------------------------------------------- + | + | Because of the various ways of managing error logging, you get complete + | flexibility to manage error logging as you see fit. + | + | This function will be called when an error occurs in your application. + | You can log the error however you like. + | + | The error "severity" passed to the method is a human-readable severity + | level such as "Parsing Error" or "Fatal Error". + | + | A simple logging system has been setup for you. By default, all errors + | will be logged to the storage/log.txt file. + | + */ + + 'logger' => function($severity, $message, $trace) + { + File::append(STORAGE_PATH.'log.txt', date('Y-m-d H:i:s').' '.$severity.' - '.$message.PHP_EOL); + }, + +); \ No newline at end of file diff --git a/modules/application/config/session.php b/modules/application/config/session.php new file mode 100644 index 00000000..12ccb6ff --- /dev/null +++ b/modules/application/config/session.php @@ -0,0 +1,104 @@ + '', + + /* + |-------------------------------------------------------------------------- + | Session Database + |-------------------------------------------------------------------------- + | + | The database table on which the session should be stored. + | + | This option is only relevant when using the "db" session driver. + | + */ + + 'table' => 'sessions', + + /* + |-------------------------------------------------------------------------- + | Session Lifetime + |-------------------------------------------------------------------------- + | + | The number of minutes a session can be idle before expiring. + | + */ + + 'lifetime' => 60, + + /* + |-------------------------------------------------------------------------- + | Session Expiration On Close + |-------------------------------------------------------------------------- + | + | Determines if the session should expire when the user's web browser closes. + | + */ + + 'expire_on_close' => false, + + /* + |-------------------------------------------------------------------------- + | Session Cookie Path + |-------------------------------------------------------------------------- + | + | The path for which the session cookie is available. + | + */ + + 'path' => '/', + + /* + |-------------------------------------------------------------------------- + | Session Cookie Domain + |-------------------------------------------------------------------------- + | + | The domain for which the session cookie is available. + | + */ + + 'domain' => null, + + /* + |-------------------------------------------------------------------------- + | Session Cookie HTTPS + |-------------------------------------------------------------------------- + | + | Determines if the session cookie should only be transported over HTTPS. + | + */ + + 'https' => false, + + /* + |-------------------------------------------------------------------------- + | HTTP Only Session Cookie + |-------------------------------------------------------------------------- + | + | Determines if the session cookie should only be accessible over HTTP. + | + | Note: The intention of the "HTTP Only" option is to keep cookies from + | being accessed by client-side scripting languages. However, this + | setting should not be viewed as providing total XSS protection. + | + */ + + 'http_only' => false, + +); \ No newline at end of file