merged skunkworks into develop.
This commit is contained in:
42
application/bundle.php
Normal file
42
application/bundle.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Auto-Loader PSR-0 Directories
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The Laravel auto-loader can search directories for files using the PSR-0
|
||||
| naming convention. This convention basically organizes classes by using
|
||||
| the class namespace to indicate the directory structure.
|
||||
|
|
||||
| So you don't have to manually map all of your models, we've added the
|
||||
| models and libraries directories for you. So, you can model away and
|
||||
| the auto-loader will take care of the rest.
|
||||
|
|
||||
*/
|
||||
|
||||
Autoloader::psr(array(
|
||||
APP_PATH.'models',
|
||||
APP_PATH.'libraries',
|
||||
));
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Auto-Loader Mappings
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Laravel uses a simple array of class to path mappings to drive the class
|
||||
| auto-loader. This simple approach helps avoid the performance problems
|
||||
| of searching through directories by some kind of convention. It also
|
||||
| gives you the freedom to organize your application how you want.
|
||||
|
|
||||
| Registering a mapping couldn't be easier. Just pass an array of class
|
||||
| to path maps into the "map" function of Autoloader. Then, when you
|
||||
| want to use that class, just use it. It's a piece of cake.
|
||||
|
|
||||
*/
|
||||
|
||||
Autoloader::map(array(
|
||||
//'User' => APP_PATH.'models/user.php',
|
||||
//'Role' => APP_PATH.'models/role.php',
|
||||
));
|
||||
@@ -1,47 +0,0 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| View Names & Composers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Named views give you beautiful syntax when working with your views.
|
||||
|
|
||||
| Here's how to define a named view:
|
||||
|
|
||||
| 'home.index' => array('name' => 'home')
|
||||
|
|
||||
| Now, you can create an instance of that view using the very expressive
|
||||
| View::of dynamic method. Take a look at this example:
|
||||
|
|
||||
| return View::of_home();
|
||||
|
|
||||
| View composers provide a convenient way to add common elements to a view
|
||||
| each time it is created. For example, you may wish to bind a header and
|
||||
| footer partial each time the view is created.
|
||||
|
|
||||
| The composer will receive an instance of the view being created, and is
|
||||
| free to modify the view however you wish. Here is how to define one:
|
||||
|
|
||||
| 'home.index' => function($view)
|
||||
| {
|
||||
| //
|
||||
| }
|
||||
|
|
||||
| Of course, you may define a view name and a composer for a single view:
|
||||
|
|
||||
| 'home.index' => array('name' => 'home', function($view)
|
||||
| {
|
||||
| //
|
||||
| })
|
||||
|
|
||||
*/
|
||||
|
||||
'home.index' => array('name' => 'home', function($view)
|
||||
{
|
||||
// This composer is called for the "home.index" view.
|
||||
}),
|
||||
|
||||
);
|
||||
@@ -7,7 +7,9 @@ return array(
|
||||
| Application URL
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The URL used to access your application. No trailing slash.
|
||||
| The URL used to access your application without a trailing slash. The URL
|
||||
| does nto have to be set. If it isn't we'll try our best to guess the URL
|
||||
| of your application.
|
||||
|
|
||||
*/
|
||||
|
||||
@@ -20,8 +22,8 @@ return array(
|
||||
|
|
||||
| If you are including the "index.php" in your URLs, you can ignore this.
|
||||
|
|
||||
| However, if you are using mod_rewrite or something similar to get
|
||||
| cleaner URLs, set this option to an empty string.
|
||||
| However, if you are using mod_rewrite to get cleaner URLs, just set
|
||||
| this option to an empty string and we'll take care of the rest.
|
||||
|
|
||||
*/
|
||||
|
||||
@@ -32,11 +34,10 @@ return array(
|
||||
| Application Key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The application key should be a random, 32 character string.
|
||||
|
|
||||
| This key is used by the encryption and cookie classes to generate secure
|
||||
| encrypted strings and hashes. It is extremely important that this key
|
||||
| remain secret and should not be shared with anyone.
|
||||
| remain secret and should not be shared with anyone. Make it about 32
|
||||
| characters of random gibberish.
|
||||
|
|
||||
*/
|
||||
|
||||
@@ -48,7 +49,8 @@ return array(
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The default character encoding used by your application. This encoding
|
||||
| will be used by the Str, Text, and Form classes.
|
||||
| will be used by the Str, Text, Form, and any other classes that need
|
||||
| to know what type of encoding to use for your awesome application.
|
||||
|
|
||||
*/
|
||||
|
||||
@@ -89,12 +91,28 @@ return array(
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The default timezone of your application. This timezone will be used when
|
||||
| Laravel needs a date, such as when writing to a log file.
|
||||
| Laravel needs a date, such as when writing to a log file or travelling
|
||||
| to a distant star at warp speed.
|
||||
|
|
||||
*/
|
||||
|
||||
'timezone' => 'UTC',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Autoloaded Bundles
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Bundles can provide a ton of awesome drop-in functionality for your web
|
||||
| application. Everything from Twitter integration to an admin backend.
|
||||
|
|
||||
| Here you may specify the bundles that should be automatically started
|
||||
| on every request to your application.
|
||||
|
|
||||
*/
|
||||
|
||||
'bundles' => array(),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Class Aliases
|
||||
@@ -112,26 +130,26 @@ return array(
|
||||
*/
|
||||
|
||||
'aliases' => array(
|
||||
'Arr' => 'Laravel\\Arr',
|
||||
'Asset' => 'Laravel\\Asset',
|
||||
'Auth' => 'Laravel\\Auth',
|
||||
'Asset' => 'Laravel\\Asset',
|
||||
'Autoloader' => 'Laravel\\Autoloader',
|
||||
'Benchmark' => 'Laravel\\Benchmark',
|
||||
'Cache' => 'Laravel\\Cache\\Manager',
|
||||
'Bundle' => 'Laravel\\Bundle',
|
||||
'Cache' => 'Laravel\\Cache',
|
||||
'Config' => 'Laravel\\Config',
|
||||
'Controller' => 'Laravel\\Routing\\Controller',
|
||||
'Cookie' => 'Laravel\\Cookie',
|
||||
'Crypter' => 'Laravel\\Crypter',
|
||||
'DB' => 'Laravel\\Database\\Manager',
|
||||
'Eloquent' => 'Laravel\\Database\\Eloquent\\Model',
|
||||
'DB' => 'Laravel\\Database',
|
||||
'Event' => 'Laravel\\Event',
|
||||
'File' => 'Laravel\\File',
|
||||
'Filter' => 'Laravel\\Routing\\Filter',
|
||||
'Form' => 'Laravel\\Form',
|
||||
'Hash' => 'Laravel\\Hash',
|
||||
'HTML' => 'Laravel\\HTML',
|
||||
'Inflector' => 'Laravel\\Inflector',
|
||||
'Input' => 'Laravel\\Input',
|
||||
'IoC' => 'Laravel\\IoC',
|
||||
'Lang' => 'Laravel\\Lang',
|
||||
'Log' => 'Laravel\\Log',
|
||||
'Memcached' => 'Laravel\\Memcached',
|
||||
'Paginator' => 'Laravel\\Paginator',
|
||||
'URL' => 'Laravel\\URL',
|
||||
@@ -139,9 +157,13 @@ return array(
|
||||
'Redis' => 'Laravel\\Redis',
|
||||
'Request' => 'Laravel\\Request',
|
||||
'Response' => 'Laravel\\Response',
|
||||
'Router' => 'Laravel\\Routing\\Router',
|
||||
'Schema' => 'Laravel\\Database\\Schema',
|
||||
'Section' => 'Laravel\\Section',
|
||||
'Session' => 'Laravel\\Facades\\Session',
|
||||
'Session' => 'Laravel\\Session',
|
||||
'Str' => 'Laravel\\Str',
|
||||
'Task' => 'Laravel\\CLI\\Tasks\\Task',
|
||||
'URI' => 'Laravel\\URI',
|
||||
'Validator' => 'Laravel\\Validator',
|
||||
'View' => 'Laravel\\View',
|
||||
),
|
||||
|
||||
@@ -2,45 +2,27 @@
|
||||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication Username
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
} This option should be set to the "username" property of your users.
|
||||
| Typically, this will be set to "email" or "username".
|
||||
|
|
||||
| The value of this property will be used by the "attempt" closure when
|
||||
| searching for users by their username. It will also be used when the
|
||||
| user is set to be "remembered", as the username is embedded into the
|
||||
| encrypted cookie and is used to verify the user's identity.
|
||||
|
|
||||
*/
|
||||
|
||||
'username' => 'email',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Retrieve The Current User
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This closure is called by the Auth::user() method when attempting to
|
||||
| retrieve a user by their ID stored in the session.
|
||||
| This closure is called by the Auth class' "user" method when trying to
|
||||
| retrieve a user by the ID that is stored in their session. If you find
|
||||
| the user, just return the user object, but make sure it has an "id"
|
||||
| property. If you can't find the user, just return null.
|
||||
|
|
||||
| Simply return an object representing the user with the given ID. Or, if
|
||||
| no user with the given ID is registered to use your application, you do
|
||||
| not need to return anything.
|
||||
|
|
||||
| Of course, a simple, elegant authentication solution is already provided
|
||||
| for you using Eloquent and the default Laravel hashing engine.
|
||||
| Of course, a simple and elegant authentication solution has already
|
||||
| been provided for you using the query builder and hashing engine.
|
||||
| We love making your life as easy as possible.
|
||||
|
|
||||
*/
|
||||
|
||||
'user' => function($id)
|
||||
{
|
||||
if ( ! is_null($id) and filter_var($id, FILTER_VALIDATE_INT) !== false)
|
||||
if (filter_var($id, FILTER_VALIDATE_INT) !== false)
|
||||
{
|
||||
return User::find($id);
|
||||
return DB::table('users')->find($id);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -50,19 +32,19 @@ return array(
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This closure is called by the Auth::attempt() method when attempting to
|
||||
| authenticate a user that is logging into your application.
|
||||
| authenticate a user that is logging into your application. It's like a
|
||||
| super buff bouncer to your application.
|
||||
|
|
||||
| If the provided credentials are correct, simply return an object that
|
||||
| represents the user being authenticated. If the credentials are not
|
||||
| valid, don't return anything.
|
||||
|
|
||||
| Note: If a user object is returned, it must have an "id" property.
|
||||
| represents the user being authenticated. As long as it has a property
|
||||
| for the "id", any object will work. If the credentials are not valid,
|
||||
| you don't meed to return anything.
|
||||
|
|
||||
*/
|
||||
|
||||
'attempt' => function($username, $password, $config)
|
||||
'attempt' => function($username, $password)
|
||||
{
|
||||
$user = User::where($config['username'], '=', $username)->first();
|
||||
$user = DB::table('users')->where_username($username)->first();
|
||||
|
||||
if ( ! is_null($user) and Hash::check($password, $user->password))
|
||||
{
|
||||
@@ -72,12 +54,12 @@ return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Logout
|
||||
| Logout The Current User
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may do anything that needs to be done when a user logs out of
|
||||
| your application, such as call the logout method on a third-party API
|
||||
| you are using for authentication, or anything else you desire.
|
||||
| you are using for authentication or anything else you desire.
|
||||
|
|
||||
*/
|
||||
|
||||
|
||||
@@ -7,12 +7,15 @@ return array(
|
||||
| Cache Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The name of the default cache driver for your application.
|
||||
| The name of the default cache driver for your application. Caching can
|
||||
| be used to increase the performance of your application by storing any
|
||||
| commonly accessed data in memory, a file, or some other storage.
|
||||
|
|
||||
| Caching can be used to increase the performance of your application
|
||||
| by storing commonly accessed data in memory or in a file.
|
||||
| A variety of awesome drivers are available for you to use with Laravel.
|
||||
| Some, like APC, are extremely fast. However, if that isn't an option
|
||||
| in your environment, try file or database caching.
|
||||
|
|
||||
| Supported Drivers: 'file', 'memcached', 'apc', 'redis'.
|
||||
| Drivers: 'file', 'memcached', 'apc', 'redis', 'database'.
|
||||
|
|
||||
*/
|
||||
|
||||
@@ -23,25 +26,39 @@ return array(
|
||||
| Cache Key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This key will be prepended to item keys stored using Memcached and APC to
|
||||
| prevent collisions with other applications on the server.
|
||||
| This key will be prepended to item keys stored using Memcached and APC
|
||||
| to prevent collisions with other applications on the server. Since the
|
||||
| memory based stores could be shared by other applications, we need to
|
||||
| be polite and use a prefix to uniquely identifier our items.
|
||||
|
|
||||
*/
|
||||
|
||||
'key' => 'laravel',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cache Database
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the database cache driver, this database table will be used
|
||||
| to store the cached item. You may also add a "connection" option to
|
||||
| the array to specify which database connection should be used.
|
||||
|
|
||||
*/
|
||||
|
||||
'database' => array('table' => 'laravel_cache'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Memcached Servers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The Memcached servers used by your application.
|
||||
| The Memcached servers used by your application. Memcached is a free and
|
||||
| open source, high-performance, distributed memory caching system. It is
|
||||
| generic in nature but intended for use in speeding up web applications
|
||||
| by alleviating database load.
|
||||
|
|
||||
| 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
|
||||
| For more information, check out: http://memcached.org
|
||||
|
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Inversion of Control Container
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may define resolvers for the Laravel inversion of control (IoC)
|
||||
| container. An IoC container provides the ability to create more flexible
|
||||
| and testable applications, as well as a convenient method of managing
|
||||
| the instantiation of complex objects.
|
||||
|
|
||||
| To register a resolver in the container, simple create add an item to
|
||||
| the array for the object with a closure that returns an instance of
|
||||
| the object.
|
||||
|
|
||||
| For example, here's how to register a resolver for a Mailer class:
|
||||
|
|
||||
| 'mailer' => function($c)
|
||||
| {
|
||||
| return new Mailer($sender, $key);
|
||||
| }
|
||||
|
|
||||
| Note that the container instance itself is passed into the resolver,
|
||||
| allowing you to continue to resolve dependencies within the resolver
|
||||
| itself. This allows you to easily resolve nested dependencies.
|
||||
|
|
||||
| When creating controller instances, Laravel will check to see if a
|
||||
| resolver has been registered for the controller. If it has, it will
|
||||
| be used to create the controller instance. All controller resolvers
|
||||
| should be registered beginning using a {controllers}.{name} naming
|
||||
| convention. For example:
|
||||
|
|
||||
| 'controllers.user' => function($c)
|
||||
| {
|
||||
| return new User_Controller($c->resolve('repository'));
|
||||
| }
|
||||
|
|
||||
| Of course, sometimes you may wish to register an object as a singleton
|
||||
| Singletons are resolved by the controller the first time they are
|
||||
| resolved; however, that same resolved instance will continue to be
|
||||
| returned by the container each time it is requested. Registering an
|
||||
| object as a singleton couldn't be simpler:
|
||||
|
|
||||
| 'mailer' => array('singleton' => true, 'resolver' => function($c)
|
||||
| {
|
||||
| return new Mailer($sender, $key);
|
||||
| })
|
||||
|
|
||||
*/
|
||||
|
||||
);
|
||||
@@ -7,39 +7,29 @@ return array(
|
||||
| Default Database Connection
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The name of your default database connection.
|
||||
|
|
||||
| This connection will be the default for all database operations unless a
|
||||
| different connection is specified when performing the operation.
|
||||
| The name of your default database connection. This connection will used
|
||||
| as the default for all database operations unless a different name is
|
||||
| given when performing said operation. This connection name should be
|
||||
| listed in the array of connections below.
|
||||
|
|
||||
*/
|
||||
|
||||
'default' => 'sqlite',
|
||||
'default' => 'mysql',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Database Connections
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| All of the database connections used by your application.
|
||||
| All of the database connections used by your application. Many of your
|
||||
| applications will no doubt only use one connection; however, you have
|
||||
| the freedom to specify as many connections as you can handle.
|
||||
|
|
||||
| Supported Drivers: 'mysql', 'pgsql', 'sqlite'.
|
||||
| All database work in Laravel is done through the PHP's PDO facilities,
|
||||
| so make sure you have the PDO drivers for your particlar database of
|
||||
| choice installed on your machine.
|
||||
|
|
||||
| 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.
|
||||
| Drivers: 'mysql', 'pgsql', 'sqlsrv', 'sqlite'.
|
||||
|
|
||||
*/
|
||||
|
||||
@@ -68,6 +58,14 @@ return array(
|
||||
'charset' => 'utf8',
|
||||
),
|
||||
|
||||
'sqlsrv' => array(
|
||||
'driver' => 'sqlsrv',
|
||||
'host' => 'localhost',
|
||||
'database' => 'database',
|
||||
'username' => 'root',
|
||||
'password' => 'password',
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
/*
|
||||
@@ -77,11 +75,9 @@ return array(
|
||||
|
|
||||
| Redis is an open source, fast, and advanced key-value store. However, it
|
||||
| provides a richer set of commands than a typical key-value store such as
|
||||
| APC or memcached.
|
||||
| APC or memcached. All the cool kids are using it.
|
||||
|
|
||||
| Here you may specify the hosts and ports for your Redis databases.
|
||||
|
|
||||
| For more information regarding Redis, check out: http://redis.io
|
||||
| To get the scoop on Redis, check out: http://redis.io
|
||||
|
|
||||
*/
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ return array(
|
||||
| Ignored Error Levels
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the error levels that should be ignored by the
|
||||
| Here you simply specify the error levels that should be ignored by the
|
||||
| Laravel error handler. These levels will still be logged; however, no
|
||||
| information about about them will be displayed.
|
||||
|
|
||||
@@ -22,10 +22,11 @@ return array(
|
||||
|
|
||||
| Detailed error messages contain information about the file in which an
|
||||
| error occurs, as well as a PHP stack trace containing the call stack.
|
||||
| You'll want them when you're trying to debug your application.
|
||||
|
|
||||
| If your application is in production, consider turning off error details
|
||||
| for enhanced security and user experience. The error stack trace could
|
||||
| contain sensitive information that should not be publicly visible.
|
||||
| If your application is in production, you'll want to turn off the error
|
||||
| details for enhanced security and user experience since the exception
|
||||
| stack trace could contain sensitive information.
|
||||
|
|
||||
*/
|
||||
|
||||
@@ -56,18 +57,13 @@ return array(
|
||||
|
|
||||
| You may log the error message however you like; however, a simple log
|
||||
| solution has been setup for you which will log all error messages to
|
||||
| a single text file within the application storage directory.
|
||||
|
|
||||
| Of course, you are free to implement more complex solutions including
|
||||
| emailing the exceptions details to your team, etc.
|
||||
| text files within the application storage directory.
|
||||
|
|
||||
*/
|
||||
|
||||
'logger' => function($exception)
|
||||
{
|
||||
$message = (string) $exception;
|
||||
|
||||
File::append(STORAGE_PATH.'log.txt', date('Y-m-d H:i:s').' - '.$message.PHP_EOL);
|
||||
Log::exception($exception);
|
||||
},
|
||||
|
||||
);
|
||||
97
application/config/mimes.php
Normal file
97
application/config/mimes.php
Normal file
@@ -0,0 +1,97 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
'hqx' => 'application/mac-binhex40',
|
||||
'cpt' => 'application/mac-compactpro',
|
||||
'csv' => array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream'),
|
||||
'bin' => 'application/macbinary',
|
||||
'dms' => 'application/octet-stream',
|
||||
'lha' => 'application/octet-stream',
|
||||
'lzh' => 'application/octet-stream',
|
||||
'exe' => array('application/octet-stream', 'application/x-msdownload'),
|
||||
'class' => 'application/octet-stream',
|
||||
'psd' => 'application/x-photoshop',
|
||||
'so' => 'application/octet-stream',
|
||||
'sea' => 'application/octet-stream',
|
||||
'dll' => 'application/octet-stream',
|
||||
'oda' => 'application/oda',
|
||||
'pdf' => array('application/pdf', 'application/x-download'),
|
||||
'ai' => 'application/postscript',
|
||||
'eps' => 'application/postscript',
|
||||
'ps' => 'application/postscript',
|
||||
'smi' => 'application/smil',
|
||||
'smil' => 'application/smil',
|
||||
'mif' => 'application/vnd.mif',
|
||||
'xls' => array('application/excel', 'application/vnd.ms-excel', 'application/msexcel'),
|
||||
'ppt' => array('application/powerpoint', 'application/vnd.ms-powerpoint'),
|
||||
'wbxml' => 'application/wbxml',
|
||||
'wmlc' => 'application/wmlc',
|
||||
'dcr' => 'application/x-director',
|
||||
'dir' => 'application/x-director',
|
||||
'dxr' => 'application/x-director',
|
||||
'dvi' => 'application/x-dvi',
|
||||
'gtar' => 'application/x-gtar',
|
||||
'gz' => 'application/x-gzip',
|
||||
'php' => array('application/x-httpd-php', 'text/x-php'),
|
||||
'php4' => 'application/x-httpd-php',
|
||||
'php3' => 'application/x-httpd-php',
|
||||
'phtml' => 'application/x-httpd-php',
|
||||
'phps' => 'application/x-httpd-php-source',
|
||||
'js' => 'application/x-javascript',
|
||||
'swf' => 'application/x-shockwave-flash',
|
||||
'sit' => 'application/x-stuffit',
|
||||
'tar' => 'application/x-tar',
|
||||
'tgz' => array('application/x-tar', 'application/x-gzip-compressed'),
|
||||
'xhtml' => 'application/xhtml+xml',
|
||||
'xht' => 'application/xhtml+xml',
|
||||
'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed'),
|
||||
'mid' => 'audio/midi',
|
||||
'midi' => 'audio/midi',
|
||||
'mpga' => 'audio/mpeg',
|
||||
'mp2' => 'audio/mpeg',
|
||||
'mp3' => array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'),
|
||||
'aif' => 'audio/x-aiff',
|
||||
'aiff' => 'audio/x-aiff',
|
||||
'aifc' => 'audio/x-aiff',
|
||||
'ram' => 'audio/x-pn-realaudio',
|
||||
'rm' => 'audio/x-pn-realaudio',
|
||||
'rpm' => 'audio/x-pn-realaudio-plugin',
|
||||
'ra' => 'audio/x-realaudio',
|
||||
'rv' => 'video/vnd.rn-realvideo',
|
||||
'wav' => 'audio/x-wav',
|
||||
'bmp' => 'image/bmp',
|
||||
'gif' => 'image/gif',
|
||||
'jpeg' => array('image/jpeg', 'image/pjpeg'),
|
||||
'jpg' => array('image/jpeg', 'image/pjpeg'),
|
||||
'jpe' => array('image/jpeg', 'image/pjpeg'),
|
||||
'png' => 'image/png',
|
||||
'tiff' => 'image/tiff',
|
||||
'tif' => 'image/tiff',
|
||||
'css' => 'text/css',
|
||||
'html' => 'text/html',
|
||||
'htm' => 'text/html',
|
||||
'shtml' => 'text/html',
|
||||
'txt' => 'text/plain',
|
||||
'text' => 'text/plain',
|
||||
'log' => array('text/plain', 'text/x-log'),
|
||||
'rtx' => 'text/richtext',
|
||||
'rtf' => 'text/rtf',
|
||||
'xml' => 'text/xml',
|
||||
'xsl' => 'text/xml',
|
||||
'mpeg' => 'video/mpeg',
|
||||
'mpg' => 'video/mpeg',
|
||||
'mpe' => 'video/mpeg',
|
||||
'qt' => 'video/quicktime',
|
||||
'mov' => 'video/quicktime',
|
||||
'avi' => 'video/x-msvideo',
|
||||
'movie' => 'video/x-sgi-movie',
|
||||
'doc' => 'application/msword',
|
||||
'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||
'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||
'word' => array('application/msword', 'application/octet-stream'),
|
||||
'xl' => 'application/excel',
|
||||
'eml' => 'message/rfc822',
|
||||
'json' => array('application/json', 'text/json'),
|
||||
|
||||
);
|
||||
@@ -7,12 +7,12 @@ return array(
|
||||
| Session Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The name of the session driver for your application.
|
||||
| The name of the session driver used by your application. Since HTTP is
|
||||
| stateless, sessions are used to simulate "state" across requests made
|
||||
| by the same user of your application. In other words, it's how an
|
||||
| application knows who the heck you are.
|
||||
|
|
||||
| Since HTTP is stateless, sessions are used to maintain "state" across
|
||||
| multiple requests from the same user of your application.
|
||||
|
|
||||
| Supported Drivers: 'cookie', 'file', 'database', 'memcached', 'apc', 'redis'.
|
||||
| Drivers: 'cookie', 'file', 'database', 'memcached', 'apc', 'redis'.
|
||||
|
|
||||
*/
|
||||
|
||||
@@ -23,9 +23,9 @@ return array(
|
||||
| Session Database
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The database table on which the session should be stored.
|
||||
|
|
||||
| This option is only relevant when using the "database" session driver.
|
||||
| The database table on which the session should be stored. It probably
|
||||
| goes without saying that this option only matters if you are using
|
||||
| the super slick database session driver.
|
||||
|
|
||||
*/
|
||||
|
||||
@@ -40,8 +40,9 @@ return array(
|
||||
| This option specifies the probability of session garbage collection
|
||||
| occuring for any given request.
|
||||
|
|
||||
| For example, the default value states that garbage collection has about
|
||||
| a 2% (2 / 100) chance of occuring for any given request.
|
||||
| For example, the default value states that garbage collection has a
|
||||
| 2% chance of occuring for any given request to the application.
|
||||
| Feel free to tune this to your application's size and speed.
|
||||
|
|
||||
*/
|
||||
|
||||
|
||||
119
application/config/strings.php
Normal file
119
application/config/strings.php
Normal file
@@ -0,0 +1,119 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| String Inflection
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This array contains the singular and plural forms of words. It's used by
|
||||
| the "singular" and "plural" methods on the Str class to convert a given
|
||||
| word from singular to plural and vice versa.
|
||||
|
|
||||
| This simple array is in constrast to the complicated regular expression
|
||||
| patterns used by other frameworks. We think you'll enjoy the speed and
|
||||
| simplicity of this solution.
|
||||
|
|
||||
| When adding a word to the array, the key should be the singular form,
|
||||
| while the array value should be the plural form. We've included an
|
||||
| example to get you started!
|
||||
|
|
||||
*/
|
||||
|
||||
'inflection' => array(
|
||||
|
||||
'user' => 'users',
|
||||
'person' => 'people',
|
||||
'comment' => 'comments',
|
||||
|
||||
),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| ASCII Characters
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This array contains foreign characters and their 7-bit ASCII equivalents.
|
||||
| The array is used by the "ascii" method on the Str class to get strings
|
||||
| ready for inclusion in a URL slug.
|
||||
|
|
||||
| Of course, the "ascii" method may also be used by you for whatever your
|
||||
| application requires. Feel free to add any characters we missed, and be
|
||||
| sure to let us know about them!
|
||||
|
|
||||
*/
|
||||
|
||||
'ascii' => array(
|
||||
|
||||
'/æ|ǽ/' => 'ae',
|
||||
'/œ/' => 'oe',
|
||||
'/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ|А/' => 'A',
|
||||
'/à|á|â|ã|ä|å|ǻ|ā|ă|ą|ǎ|ª|а/' => 'a',
|
||||
'/Б/' => 'B',
|
||||
'/б/' => 'b',
|
||||
'/Ç|Ć|Ĉ|Ċ|Č|Ц/' => 'C',
|
||||
'/ç|ć|ĉ|ċ|č|ц/' => 'c',
|
||||
'/Ð|Ď|Đ|Д/' => 'Dj',
|
||||
'/ð|ď|đ|д/' => 'dj',
|
||||
'/È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě|Е|Ё|Э/' => 'E',
|
||||
'/è|é|ê|ë|ē|ĕ|ė|ę|ě|е|ё|э/' => 'e',
|
||||
'/Ф/' => 'F',
|
||||
'/ƒ|ф/' => 'f',
|
||||
'/Ĝ|Ğ|Ġ|Ģ|Г/' => 'G',
|
||||
'/ĝ|ğ|ġ|ģ|г/' => 'g',
|
||||
'/Ĥ|Ħ|Х/' => 'H',
|
||||
'/ĥ|ħ|х/' => 'h',
|
||||
'/Ì|Í|Î|Ï|Ĩ|Ī|Ĭ|Ǐ|Į|İ|И/' => 'I',
|
||||
'/ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı|и/' => 'i',
|
||||
'/Ĵ|Й/' => 'J',
|
||||
'/ĵ|й/' => 'j',
|
||||
'/Ķ|К/' => 'K',
|
||||
'/ķ|к/' => 'k',
|
||||
'/Ĺ|Ļ|Ľ|Ŀ|Ł|Л/' => 'L',
|
||||
'/ĺ|ļ|ľ|ŀ|ł|л/' => 'l',
|
||||
'/М/' => 'M',
|
||||
'/м/' => 'm',
|
||||
'/Ñ|Ń|Ņ|Ň|Н/' => 'N',
|
||||
'/ñ|ń|ņ|ň|ʼn|н/' => 'n',
|
||||
'/Ö|Ò|Ó|Ô|Õ|Ō|Ŏ|Ǒ|Ő|Ơ|Ø|Ǿ|О/' => 'O',
|
||||
'/ö|ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º|о/' => 'o',
|
||||
'/П/' => 'P',
|
||||
'/п/' => 'p',
|
||||
'/Ŕ|Ŗ|Ř|Р/' => 'R',
|
||||
'/ŕ|ŗ|ř|р/' => 'r',
|
||||
'/Ś|Ŝ|Ş|Š|С/' => 'S',
|
||||
'/ś|ŝ|ş|š|ſ|с/' => 's',
|
||||
'/Ţ|Ť|Ŧ|Т/' => 'T',
|
||||
'/ţ|ť|ŧ|т/' => 't',
|
||||
'/Ù|Ú|Û|Ũ|Ū|Ŭ|Ů|Ű|Ų|Ư|Ǔ|Ǖ|Ǘ|Ǚ|Ǜ|У/' => 'U',
|
||||
'/ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ|у/' => 'u',
|
||||
'/В/' => 'V',
|
||||
'/в/' => 'v',
|
||||
'/Ý|Ÿ|Ŷ|Ы/' => 'Y',
|
||||
'/ý|ÿ|ŷ|ы/' => 'y',
|
||||
'/Ŵ/' => 'W',
|
||||
'/ŵ/' => 'w',
|
||||
'/Ź|Ż|Ž|З/' => 'Z',
|
||||
'/ź|ż|ž|з/' => 'z',
|
||||
'/Æ|Ǽ/' => 'AE',
|
||||
'/ß/'=> 'ss',
|
||||
'/IJ/' => 'IJ',
|
||||
'/ij/' => 'ij',
|
||||
'/Œ/' => 'OE',
|
||||
'/Ч/' => 'Ch',
|
||||
'/ч/' => 'ch',
|
||||
'/Ю/' => 'Ju',
|
||||
'/ю/' => 'ju',
|
||||
'/Я/' => 'Ja',
|
||||
'/я/' => 'ja',
|
||||
'/Ш/' => 'Sh',
|
||||
'/ш/' => 'sh',
|
||||
'/Щ/' => 'Shch',
|
||||
'/щ/' => 'shch',
|
||||
'/Ж/' => 'Zh',
|
||||
'/ж/' => 'zh',
|
||||
|
||||
),
|
||||
|
||||
);
|
||||
@@ -7,10 +7,10 @@ class Home_Controller extends Controller {
|
||||
| The Default Controller
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Instead of using RESTful routes and anonymous functions, you may wish to
|
||||
| use controllers to organize your application API. You'll love them.
|
||||
| Instead of using RESTful routes and anonymous functions, you might wish
|
||||
| to use controllers to organize your application API. You'll love them.
|
||||
|
|
||||
| To start using this controller, simply remove the default route from the
|
||||
| To start using this controller simply remove the default route from the
|
||||
| application "routes.php" file. Laravel is smart enough to find this
|
||||
| controller and call the default method, which is "action_index".
|
||||
|
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Filters
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Filters provide a convenient method for attaching functionality to your
|
||||
| routes. Filters can run either before or after a route is exectued.
|
||||
|
|
||||
| The built-in "before" and "after" filters are called before and after
|
||||
| every request to your application; however, you may create other filters
|
||||
| that can be attached to individual routes.
|
||||
|
|
||||
| Filters also make common tasks such as authentication and CSRF protection
|
||||
| a breeze. If a filter that runs before a route returns a response, that
|
||||
| response will override the route action.
|
||||
|
|
||||
| Let's walk through an example...
|
||||
|
|
||||
| First, define a filter:
|
||||
|
|
||||
| 'simple_filter' => function()
|
||||
| {
|
||||
| return 'Filtered!';
|
||||
| }
|
||||
|
|
||||
| Next, attach the filter to a route:
|
||||
|
|
||||
| 'GET /' => array('before' => 'simple_filter', function()
|
||||
| {
|
||||
| return 'Hello World!';
|
||||
| })
|
||||
|
|
||||
| Now every requests to http://example.com will return "Filtered!", since
|
||||
| the filter is overriding the route action by returning a value.
|
||||
|
|
||||
| To make your life easier, we have built authentication and CSRF filters
|
||||
| that are ready to attach to your routes. Enjoy.
|
||||
|
|
||||
*/
|
||||
|
||||
'before' => function()
|
||||
{
|
||||
// Do stuff before every request to your application.
|
||||
},
|
||||
|
||||
|
||||
'after' => function($response)
|
||||
{
|
||||
// Do stuff after every request to your application.
|
||||
},
|
||||
|
||||
|
||||
'auth' => function()
|
||||
{
|
||||
if (Auth::guest()) return Redirect::to_login();
|
||||
},
|
||||
|
||||
|
||||
'csrf' => function()
|
||||
{
|
||||
if (Request::forged()) return Response::error('500');
|
||||
},
|
||||
|
||||
);
|
||||
@@ -8,8 +8,8 @@ return array(
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used by the paginator library to build
|
||||
| the pagination links. They may be easily changed by the developer to
|
||||
| anything they wish.
|
||||
| the pagination links. You're free to change them to anything you want.
|
||||
| If you come up with something more exciting, let us know.
|
||||
|
|
||||
*/
|
||||
|
||||
|
||||
@@ -8,11 +8,12 @@ return array(
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used to swap attribute place-holders
|
||||
| with something more reader friendly, such as "E-Mail Address" instead
|
||||
| of "email".
|
||||
| with something more reader friendly such as "E-Mail Address" instead
|
||||
| of "email". Your users will thank you.
|
||||
|
|
||||
| The Validator class will automatically search this array of lines when
|
||||
| attempting to replace the :attribute place-holder in error messages.
|
||||
| The Validator class will automatically search this array of lines it
|
||||
| is attempting to replace the :attribute place-holder in messages.
|
||||
| It's pretty slick. We think you'll like it.
|
||||
|
|
||||
*/
|
||||
|
||||
@@ -28,9 +29,9 @@ return array(
|
||||
| such as the size (max, min, between) rules. These versions are used
|
||||
| for different input types such as strings and files.
|
||||
|
|
||||
| These language lines may be easily changed by the developer to provide
|
||||
| custom error messages in their application. Error messages for custom
|
||||
| validation rules may also be added to this file.
|
||||
| These language lines may be easily changed to provide custom error
|
||||
| messages in your application. Error messages for custom validation
|
||||
| rules may also be added to this file.
|
||||
|
|
||||
*/
|
||||
|
||||
|
||||
0
application/migrations/.gitignore
vendored
Normal file
0
application/migrations/.gitignore
vendored
Normal file
@@ -1,42 +1,87 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Simply tell Laravel the HTTP verbs and URIs it should respond to. It is a
|
||||
| breeze to setup your applications using Laravel's RESTful routing, and it
|
||||
| is perfectly suited for building both large applications and simple APIs.
|
||||
| Enjoy the fresh air and simplicity of the framework.
|
||||
|
|
||||
| Let's respond to a simple GET request to http://example.com/hello:
|
||||
|
|
||||
| Router::register('GET /hello', function()
|
||||
| {
|
||||
| return 'Hello World!';
|
||||
| });
|
||||
|
|
||||
| You can even respond to more than one URI:
|
||||
|
|
||||
| Router::register('GET /hello, GET /world', function()
|
||||
| {
|
||||
| return 'Hello World!';
|
||||
| });
|
||||
|
|
||||
| It's easy to allow URI wildcards using (:num) or (:any):
|
||||
|
|
||||
| Router::register('GET /hello/(:any)', function($name)
|
||||
| {
|
||||
| return "Welcome, $name.";
|
||||
| });
|
||||
|
|
||||
*/
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Application Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Simply tell Laravel the HTTP verbs and URIs it should respond to. It's a
|
||||
| piece of cake to create beautiful applications using the elegant RESTful
|
||||
| routing available in Laravel.
|
||||
|
|
||||
| Let's respond to a simple GET request to http://example.com/hello:
|
||||
|
|
||||
| 'GET /hello' => function()
|
||||
| {
|
||||
| return 'Hello World!';
|
||||
| }
|
||||
|
|
||||
| You can even respond to more than one URI:
|
||||
|
|
||||
| 'GET /hello, GET /world' => function()
|
||||
| {
|
||||
| return 'Hello World!';
|
||||
| }
|
||||
|
|
||||
| It's easy to allow URI wildcards using (:num) or (:any):
|
||||
|
|
||||
| 'GET /hello/(:any)' => function($name)
|
||||
| {
|
||||
| return "Welcome, $name.";
|
||||
| }
|
||||
|
|
||||
*/
|
||||
Router::register(array('GET /', 'GET /home'), function()
|
||||
{
|
||||
return View::make('home.index');
|
||||
});
|
||||
|
||||
'GET /' => function()
|
||||
{
|
||||
return View::make('home.index');
|
||||
},
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Route Filters
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Filters provide a convenient method for attaching functionality to your
|
||||
| routes. The built-in "before" and "after" filters are called before and
|
||||
| after every request to your application, and you may even create other
|
||||
| filters that can be attached to individual routes.
|
||||
|
|
||||
| Let's walk through an example...
|
||||
|
|
||||
| First, define a filter:
|
||||
|
|
||||
| Filter::register('filter', function()
|
||||
| {
|
||||
| return 'Filtered!';
|
||||
| });
|
||||
|
|
||||
| Next, attach the filter to a route:
|
||||
|
|
||||
| Router::register('GET /', array('before' => 'filter', function()
|
||||
| {
|
||||
| return 'Hello World!';
|
||||
| }));
|
||||
|
|
||||
*/
|
||||
|
||||
);
|
||||
Filter::register('before', function()
|
||||
{
|
||||
// Do stuff before every request to your application...
|
||||
});
|
||||
|
||||
Filter::register('after', function()
|
||||
{
|
||||
// Do stuff after every request to your application...
|
||||
});
|
||||
|
||||
Filter::register('csrf', function()
|
||||
{
|
||||
if (Request::forged()) return Response::error('500');
|
||||
});
|
||||
|
||||
Filter::register('auth', function()
|
||||
{
|
||||
if (Auth::guest()) return Redirect::to('login');
|
||||
});
|
||||
1
application/storage/cache/.gitignore
vendored
1
application/storage/cache/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
*
|
||||
1
application/storage/database/.gitignore
vendored
1
application/storage/database/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
*.sqlite
|
||||
1
application/storage/sessions/.gitignore
vendored
1
application/storage/sessions/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
*
|
||||
1
application/storage/views/.gitignore
vendored
1
application/storage/views/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
*
|
||||
0
application/tasks/.gitignore
vendored
Normal file
0
application/tasks/.gitignore
vendored
Normal file
Reference in New Issue
Block a user