mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 04:03:26 +00:00
Initial commit.
This commit is contained in:
194
app/config/app.php
Normal file
194
app/config/app.php
Normal file
@@ -0,0 +1,194 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Debug Mode
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When your application is in debug mode, detailed error messages with
|
||||||
|
| stack traces will be shown on every error that occurs within your
|
||||||
|
| application. If disabled, a simple generic error page is shown.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'debug' => false,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application URL
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This URL is used by the console to properly generate URLs when using
|
||||||
|
| the Artisan command line tool. You should set this to the root of
|
||||||
|
| your application so that it is used when running Artisan tasks.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'url' => 'http://localhost',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Timezone
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify the default timezone for your application, which
|
||||||
|
| will be used by the PHP date and date-time functions. We have gone
|
||||||
|
| ahead and set this to a sensible default for you out of the box.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'timezone' => 'UTC',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Locale Configuration
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The application locale determines the default locale that will be used
|
||||||
|
| by the translation service provider. You are free to set this value
|
||||||
|
| to any of the locales which will be supported by the application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'locale' => 'en',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Fallback Locale
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The fallback locale determines the locale to use when the current one
|
||||||
|
| is not available. You may change the value to correspond to any of
|
||||||
|
| the language folders that are provided through your application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'fallback_locale' => 'en',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Encryption Key
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This key is used by the Illuminate encrypter service and should be set
|
||||||
|
| to a random, 32 character string, otherwise these encrypted strings
|
||||||
|
| will not be safe. Please do this before deploying an application!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'key' => 'D93oqmVsIARg23FC3cbsHuBGk0uXQc3r',
|
||||||
|
|
||||||
|
'cipher' => MCRYPT_RIJNDAEL_128,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Autoloaded Service Providers
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The service providers listed here will be automatically loaded on the
|
||||||
|
| request to your application. Feel free to add your own services to
|
||||||
|
| this array to grant expanded functionality to your applications.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'providers' => array(
|
||||||
|
|
||||||
|
'Illuminate\Foundation\Providers\ArtisanServiceProvider',
|
||||||
|
'Illuminate\Auth\AuthServiceProvider',
|
||||||
|
'Illuminate\Cache\CacheServiceProvider',
|
||||||
|
'Illuminate\Session\CommandsServiceProvider',
|
||||||
|
'Illuminate\Foundation\Providers\ConsoleSupportServiceProvider',
|
||||||
|
'Illuminate\Routing\ControllerServiceProvider',
|
||||||
|
'Illuminate\Cookie\CookieServiceProvider',
|
||||||
|
'Illuminate\Database\DatabaseServiceProvider',
|
||||||
|
'Illuminate\Encryption\EncryptionServiceProvider',
|
||||||
|
'Illuminate\Filesystem\FilesystemServiceProvider',
|
||||||
|
'Illuminate\Hashing\HashServiceProvider',
|
||||||
|
'Illuminate\Html\HtmlServiceProvider',
|
||||||
|
'Illuminate\Log\LogServiceProvider',
|
||||||
|
'Illuminate\Mail\MailServiceProvider',
|
||||||
|
'Illuminate\Database\MigrationServiceProvider',
|
||||||
|
'Illuminate\Pagination\PaginationServiceProvider',
|
||||||
|
'Illuminate\Queue\QueueServiceProvider',
|
||||||
|
'Illuminate\Redis\RedisServiceProvider',
|
||||||
|
'Illuminate\Remote\RemoteServiceProvider',
|
||||||
|
'Illuminate\Auth\Reminders\ReminderServiceProvider',
|
||||||
|
'Illuminate\Database\SeedServiceProvider',
|
||||||
|
'Illuminate\Session\SessionServiceProvider',
|
||||||
|
'Illuminate\Translation\TranslationServiceProvider',
|
||||||
|
'Illuminate\Validation\ValidationServiceProvider',
|
||||||
|
'Illuminate\View\ViewServiceProvider',
|
||||||
|
'Illuminate\Workbench\WorkbenchServiceProvider',
|
||||||
|
|
||||||
|
),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Service Provider Manifest
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The service provider manifest is used by Laravel to lazy load service
|
||||||
|
| providers which are not needed for each request, as well to keep a
|
||||||
|
| list of all of the services. Here, you may set its storage spot.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'manifest' => storage_path().'/meta',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Class Aliases
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This array of class aliases will be registered when this application
|
||||||
|
| is started. However, feel free to register as many as you wish as
|
||||||
|
| the aliases are "lazy" loaded so they don't hinder performance.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'aliases' => array(
|
||||||
|
|
||||||
|
'App' => 'Illuminate\Support\Facades\App',
|
||||||
|
'Artisan' => 'Illuminate\Support\Facades\Artisan',
|
||||||
|
'Auth' => 'Illuminate\Support\Facades\Auth',
|
||||||
|
'Blade' => 'Illuminate\Support\Facades\Blade',
|
||||||
|
'Cache' => 'Illuminate\Support\Facades\Cache',
|
||||||
|
'ClassLoader' => 'Illuminate\Support\ClassLoader',
|
||||||
|
'Config' => 'Illuminate\Support\Facades\Config',
|
||||||
|
'Controller' => 'Illuminate\Routing\Controller',
|
||||||
|
'Cookie' => 'Illuminate\Support\Facades\Cookie',
|
||||||
|
'Crypt' => 'Illuminate\Support\Facades\Crypt',
|
||||||
|
'DB' => 'Illuminate\Support\Facades\DB',
|
||||||
|
'Eloquent' => 'Illuminate\Database\Eloquent\Model',
|
||||||
|
'Event' => 'Illuminate\Support\Facades\Event',
|
||||||
|
'File' => 'Illuminate\Support\Facades\File',
|
||||||
|
'Form' => 'Illuminate\Support\Facades\Form',
|
||||||
|
'Hash' => 'Illuminate\Support\Facades\Hash',
|
||||||
|
'HTML' => 'Illuminate\Support\Facades\HTML',
|
||||||
|
'Input' => 'Illuminate\Support\Facades\Input',
|
||||||
|
'Lang' => 'Illuminate\Support\Facades\Lang',
|
||||||
|
'Log' => 'Illuminate\Support\Facades\Log',
|
||||||
|
'Mail' => 'Illuminate\Support\Facades\Mail',
|
||||||
|
'Paginator' => 'Illuminate\Support\Facades\Paginator',
|
||||||
|
'Password' => 'Illuminate\Support\Facades\Password',
|
||||||
|
'Queue' => 'Illuminate\Support\Facades\Queue',
|
||||||
|
'Redirect' => 'Illuminate\Support\Facades\Redirect',
|
||||||
|
'Redis' => 'Illuminate\Support\Facades\Redis',
|
||||||
|
'Request' => 'Illuminate\Support\Facades\Request',
|
||||||
|
'Response' => 'Illuminate\Support\Facades\Response',
|
||||||
|
'Route' => 'Illuminate\Support\Facades\Route',
|
||||||
|
'Schema' => 'Illuminate\Support\Facades\Schema',
|
||||||
|
'Seeder' => 'Illuminate\Database\Seeder',
|
||||||
|
'Session' => 'Illuminate\Support\Facades\Session',
|
||||||
|
'SoftDeletingTrait' => 'Illuminate\Database\Eloquent\SoftDeletingTrait',
|
||||||
|
'SSH' => 'Illuminate\Support\Facades\SSH',
|
||||||
|
'Str' => 'Illuminate\Support\Str',
|
||||||
|
'URL' => 'Illuminate\Support\Facades\URL',
|
||||||
|
'Validator' => 'Illuminate\Support\Facades\Validator',
|
||||||
|
'View' => 'Illuminate\Support\Facades\View',
|
||||||
|
|
||||||
|
),
|
||||||
|
|
||||||
|
);
|
71
app/config/auth.php
Normal file
71
app/config/auth.php
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Authentication Driver
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option controls the authentication driver that will be utilized.
|
||||||
|
| This driver manages the retrieval and authentication of the users
|
||||||
|
| attempting to get access to protected areas of your application.
|
||||||
|
|
|
||||||
|
| Supported: "database", "eloquent"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'driver' => 'eloquent',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Authentication Model
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using the "Eloquent" authentication driver, we need to know which
|
||||||
|
| Eloquent model should be used to retrieve your users. Of course, it
|
||||||
|
| is often just the "User" model but you may use whatever you like.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'model' => 'User',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Authentication Table
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using the "Database" authentication driver, we need to know which
|
||||||
|
| table should be used to retrieve your users. We have chosen a basic
|
||||||
|
| default value but you may easily change it to any table you like.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'table' => 'users',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Password Reminder Settings
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may set the settings for password reminders, including a view
|
||||||
|
| that should be used as your password reminder e-mail. You will also
|
||||||
|
| be able to set the name of the table that holds the reset tokens.
|
||||||
|
|
|
||||||
|
| The "expire" time is the number of minutes that the reminder should be
|
||||||
|
| considered valid. This security feature keeps tokens short-lived so
|
||||||
|
| they have less time to be guessed. You may change this as needed.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'reminder' => array(
|
||||||
|
|
||||||
|
'email' => 'emails.auth.reminder',
|
||||||
|
|
||||||
|
'table' => 'password_reminders',
|
||||||
|
|
||||||
|
'expire' => 60,
|
||||||
|
|
||||||
|
),
|
||||||
|
|
||||||
|
);
|
89
app/config/cache.php
Normal file
89
app/config/cache.php
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Cache Driver
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option controls the default cache "driver" that will be used when
|
||||||
|
| using the Caching library. Of course, you may use other drivers any
|
||||||
|
| time you wish. This is the default when another is not specified.
|
||||||
|
|
|
||||||
|
| Supported: "file", "database", "apc", "memcached", "redis", "array"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'driver' => 'file',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| File Cache Location
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using the "file" cache driver, we need a location where the cache
|
||||||
|
| files may be stored. A sensible default has been specified, but you
|
||||||
|
| are free to change it to any other place on disk that you desire.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'path' => storage_path().'/cache',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Database Cache Connection
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using the "database" cache driver you may specify the connection
|
||||||
|
| that should be used to store the cached items. When this option is
|
||||||
|
| null the default database connection will be utilized for cache.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'connection' => null,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Database Cache Table
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using the "database" cache driver we need to know the table that
|
||||||
|
| should be used to store the cached items. A default table name has
|
||||||
|
| been provided but you're free to change it however you deem fit.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'table' => 'cache',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Memcached Servers
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Now you may specify an array of your Memcached servers that should be
|
||||||
|
| used when utilizing the Memcached cache driver. All of the servers
|
||||||
|
| should contain a value for "host", "port", and "weight" options.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'memcached' => array(
|
||||||
|
|
||||||
|
array('host' => '127.0.0.1', 'port' => 11211, 'weight' => 100),
|
||||||
|
|
||||||
|
),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Cache Key Prefix
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When utilizing a RAM based store such as APC or Memcached, there might
|
||||||
|
| be other applications utilizing the same cache. So, we'll specify a
|
||||||
|
| value to get prefixed to all our keys so we can avoid collisions.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'prefix' => 'laravel',
|
||||||
|
|
||||||
|
);
|
18
app/config/compile.php
Normal file
18
app/config/compile.php
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Additional Compiled Classes
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify additional classes to include in the compiled file
|
||||||
|
| generated by the `artisan optimize` command. These should be classes
|
||||||
|
| that are included on basically every request into the application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
);
|
124
app/config/database.php
Normal file
124
app/config/database.php
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| PDO Fetch Style
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| By default, database results will be returned as instances of the PHP
|
||||||
|
| stdClass object; however, you may desire to retrieve records in an
|
||||||
|
| array format for simplicity. Here you can tweak the fetch style.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'fetch' => PDO::FETCH_CLASS,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Database Connection Name
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify which of the database connections below you wish
|
||||||
|
| to use as your default connection for all database work. Of course
|
||||||
|
| you may use many connections at once using the Database library.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => 'mysql',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Database Connections
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here are each of the database connections setup for your application.
|
||||||
|
| Of course, examples of configuring each database platform that is
|
||||||
|
| supported by Laravel is shown below to make development simple.
|
||||||
|
|
|
||||||
|
|
|
||||||
|
| All database work in Laravel is done through the PHP PDO facilities
|
||||||
|
| so make sure you have the driver for your particular database of
|
||||||
|
| choice installed on your machine before you begin development.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'connections' => array(
|
||||||
|
|
||||||
|
'sqlite' => array(
|
||||||
|
'driver' => 'sqlite',
|
||||||
|
'database' => __DIR__.'/../database/production.sqlite',
|
||||||
|
'prefix' => '',
|
||||||
|
),
|
||||||
|
|
||||||
|
'mysql' => array(
|
||||||
|
'driver' => 'mysql',
|
||||||
|
'host' => 'localhost',
|
||||||
|
'database' => 'forge',
|
||||||
|
'username' => 'forge',
|
||||||
|
'password' => '',
|
||||||
|
'charset' => 'utf8',
|
||||||
|
'collation' => 'utf8_unicode_ci',
|
||||||
|
'prefix' => '',
|
||||||
|
),
|
||||||
|
|
||||||
|
'pgsql' => array(
|
||||||
|
'driver' => 'pgsql',
|
||||||
|
'host' => 'localhost',
|
||||||
|
'database' => 'forge',
|
||||||
|
'username' => 'forge',
|
||||||
|
'password' => '',
|
||||||
|
'charset' => 'utf8',
|
||||||
|
'prefix' => '',
|
||||||
|
'schema' => 'public',
|
||||||
|
),
|
||||||
|
|
||||||
|
'sqlsrv' => array(
|
||||||
|
'driver' => 'sqlsrv',
|
||||||
|
'host' => 'localhost',
|
||||||
|
'database' => 'database',
|
||||||
|
'username' => 'root',
|
||||||
|
'password' => '',
|
||||||
|
'prefix' => '',
|
||||||
|
),
|
||||||
|
|
||||||
|
),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Migration Repository Table
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This table keeps track of all the migrations that have already run for
|
||||||
|
| your application. Using this information, we can determine which of
|
||||||
|
| the migrations on disk haven't actually been run in the database.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'migrations' => 'migrations',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Redis Databases
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Redis is an open source, fast, and advanced key-value store that also
|
||||||
|
| provides a richer set of commands than a typical key-value systems
|
||||||
|
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'redis' => array(
|
||||||
|
|
||||||
|
'cluster' => false,
|
||||||
|
|
||||||
|
'default' => array(
|
||||||
|
'host' => '127.0.0.1',
|
||||||
|
'port' => 6379,
|
||||||
|
'database' => 0,
|
||||||
|
),
|
||||||
|
|
||||||
|
),
|
||||||
|
|
||||||
|
);
|
124
app/config/mail.php
Normal file
124
app/config/mail.php
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Mail Driver
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Laravel supports both SMTP and PHP's "mail" function as drivers for the
|
||||||
|
| sending of e-mail. You may specify which one you're using throughout
|
||||||
|
| your application here. By default, Laravel is setup for SMTP mail.
|
||||||
|
|
|
||||||
|
| Supported: "smtp", "mail", "sendmail", "mailgun", "mandrill", "log"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'driver' => 'smtp',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| SMTP Host Address
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may provide the host address of the SMTP server used by your
|
||||||
|
| applications. A default option is provided that is compatible with
|
||||||
|
| the Mailgun mail service which will provide reliable deliveries.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'host' => 'smtp.mailgun.org',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| SMTP Host Port
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This is the SMTP port used by your application to deliver e-mails to
|
||||||
|
| users of the application. Like the host we have set this value to
|
||||||
|
| stay compatible with the Mailgun e-mail application by default.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'port' => 587,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Global "From" Address
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| You may wish for all e-mails sent by your application to be sent from
|
||||||
|
| the same address. Here, you may specify a name and address that is
|
||||||
|
| used globally for all e-mails that are sent by your application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'from' => array('address' => null, 'name' => null),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| E-Mail Encryption Protocol
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify the encryption protocol that should be used when
|
||||||
|
| the application send e-mail messages. A sensible default using the
|
||||||
|
| transport layer security protocol should provide great security.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'encryption' => 'tls',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| SMTP Server Username
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If your SMTP server requires a username for authentication, you should
|
||||||
|
| set it here. This will get used to authenticate with your server on
|
||||||
|
| connection. You may also set the "password" value below this one.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'username' => null,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| SMTP Server Password
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may set the password required by your SMTP server to send out
|
||||||
|
| messages from your application. This will be given to the server on
|
||||||
|
| connection so that the application will be able to send messages.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'password' => null,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Sendmail System Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using the "sendmail" driver to send e-mails, we will need to know
|
||||||
|
| the path to where Sendmail lives on this server. A default path has
|
||||||
|
| been provided here, which will work well on most of your systems.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'sendmail' => '/usr/sbin/sendmail -bs',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Mail "Pretend"
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When this option is enabled, e-mail will not actually be sent over the
|
||||||
|
| web and will instead be written to your application's logs files so
|
||||||
|
| you may inspect the message. This is great for local development.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'pretend' => false,
|
||||||
|
|
||||||
|
);
|
85
app/config/queue.php
Executable file
85
app/config/queue.php
Executable file
@@ -0,0 +1,85 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Queue Driver
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The Laravel queue API supports a variety of back-ends via an unified
|
||||||
|
| API, giving you convenient access to each back-end using the same
|
||||||
|
| syntax for each one. Here you may set the default queue driver.
|
||||||
|
|
|
||||||
|
| Supported: "sync", "beanstalkd", "sqs", "iron", "redis"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => 'sync',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Queue Connections
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may configure the connection information for each server that
|
||||||
|
| is used by your application. A default configuration has been added
|
||||||
|
| for each back-end shipped with Laravel. You are free to add more.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'connections' => array(
|
||||||
|
|
||||||
|
'sync' => array(
|
||||||
|
'driver' => 'sync',
|
||||||
|
),
|
||||||
|
|
||||||
|
'beanstalkd' => array(
|
||||||
|
'driver' => 'beanstalkd',
|
||||||
|
'host' => 'localhost',
|
||||||
|
'queue' => 'default',
|
||||||
|
'ttr' => 60,
|
||||||
|
),
|
||||||
|
|
||||||
|
'sqs' => array(
|
||||||
|
'driver' => 'sqs',
|
||||||
|
'key' => 'your-public-key',
|
||||||
|
'secret' => 'your-secret-key',
|
||||||
|
'queue' => 'your-queue-url',
|
||||||
|
'region' => 'us-east-1',
|
||||||
|
),
|
||||||
|
|
||||||
|
'iron' => array(
|
||||||
|
'driver' => 'iron',
|
||||||
|
'host' => 'mq-aws-us-east-1.iron.io',
|
||||||
|
'token' => 'your-token',
|
||||||
|
'project' => 'your-project-id',
|
||||||
|
'queue' => 'your-queue-name',
|
||||||
|
'encrypt' => true,
|
||||||
|
),
|
||||||
|
|
||||||
|
'redis' => array(
|
||||||
|
'driver' => 'redis',
|
||||||
|
'queue' => 'default',
|
||||||
|
),
|
||||||
|
|
||||||
|
),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Failed Queue Jobs
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| These options configure the behavior of failed queue job logging so you
|
||||||
|
| can control which database and table are used to store the jobs that
|
||||||
|
| have failed. You may change them to any database / table you wish.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'failed' => array(
|
||||||
|
|
||||||
|
'database' => 'mysql', 'table' => 'failed_jobs',
|
||||||
|
|
||||||
|
),
|
||||||
|
|
||||||
|
);
|
59
app/config/remote.php
Normal file
59
app/config/remote.php
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Remote Connection Name
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify the default connection that will be used for SSH
|
||||||
|
| operations. This name should correspond to a connection name below
|
||||||
|
| in the server list. Each connection will be manually accessible.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'default' => 'production',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Remote Server Connections
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| These are the servers that will be accessible via the SSH task runner
|
||||||
|
| facilities of Laravel. This feature radically simplifies executing
|
||||||
|
| tasks on your servers, such as deploying out these applications.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'connections' => array(
|
||||||
|
|
||||||
|
'production' => array(
|
||||||
|
'host' => '',
|
||||||
|
'username' => '',
|
||||||
|
'password' => '',
|
||||||
|
'key' => '',
|
||||||
|
'keyphrase' => '',
|
||||||
|
'root' => '/var/www',
|
||||||
|
),
|
||||||
|
|
||||||
|
),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Remote Server Groups
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may list connections under a single group name, which allows
|
||||||
|
| you to easily access all of the servers at once using a short name
|
||||||
|
| that is extremely easy to remember, such as "web" or "database".
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'groups' => array(
|
||||||
|
|
||||||
|
'web' => array('production')
|
||||||
|
|
||||||
|
),
|
||||||
|
|
||||||
|
);
|
31
app/config/services.php
Normal file
31
app/config/services.php
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Third Party Services
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This file is for storing the credentials for third party services such
|
||||||
|
| as Stripe, Mailgun, Mandrill, and others. This file provides a sane
|
||||||
|
| default location for this type of information, allowing packages
|
||||||
|
| to have a conventional place to find your various credentials.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'mailgun' => array(
|
||||||
|
'domain' => '',
|
||||||
|
'secret' => '',
|
||||||
|
),
|
||||||
|
|
||||||
|
'mandrill' => array(
|
||||||
|
'secret' => '',
|
||||||
|
),
|
||||||
|
|
||||||
|
'stripe' => array(
|
||||||
|
'model' => 'User',
|
||||||
|
'secret' => '',
|
||||||
|
),
|
||||||
|
|
||||||
|
);
|
140
app/config/session.php
Normal file
140
app/config/session.php
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Session Driver
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option controls the default session "driver" that will be used on
|
||||||
|
| requests. By default, we will use the lightweight native driver but
|
||||||
|
| you may specify any of the other wonderful drivers provided here.
|
||||||
|
|
|
||||||
|
| Supported: "file", "cookie", "database", "apc",
|
||||||
|
| "memcached", "redis", "array"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'driver' => 'file',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Lifetime
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify the number of minutes that you wish the session
|
||||||
|
| to be allowed to remain idle before it expires. If you want them
|
||||||
|
| to immediately expire on the browser closing, set that option.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'lifetime' => 120,
|
||||||
|
|
||||||
|
'expire_on_close' => false,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session File Location
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using the native session driver, we need a location where session
|
||||||
|
| files may be stored. A default has been set for you but a different
|
||||||
|
| location may be specified. This is only needed for file sessions.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'files' => storage_path().'/sessions',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Database Connection
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using the "database" or "redis" session drivers, you may specify a
|
||||||
|
| connection that should be used to manage these sessions. This should
|
||||||
|
| correspond to a connection in your database configuration options.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'connection' => null,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Database Table
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When using the "database" session driver, you may specify the table we
|
||||||
|
| should use to manage the sessions. Of course, a sensible default is
|
||||||
|
| provided for you; however, you are free to change this as needed.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'table' => 'sessions',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Sweeping Lottery
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Some session drivers must manually sweep their storage location to get
|
||||||
|
| rid of old sessions from storage. Here are the chances that it will
|
||||||
|
| happen on a given request. By default, the odds are 2 out of 100.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'lottery' => array(2, 100),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Cookie Name
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may change the name of the cookie used to identify a session
|
||||||
|
| instance by ID. The name specified here will get used every time a
|
||||||
|
| new session cookie is created by the framework for every driver.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'cookie' => 'laravel_session',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Cookie Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The session cookie path determines the path for which the cookie will
|
||||||
|
| be regarded as available. Typically, this will be the root path of
|
||||||
|
| your application but you are free to change this when necessary.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'path' => '/',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Session Cookie Domain
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may change the domain of the cookie used to identify a session
|
||||||
|
| in your application. This will determine which domains the cookie is
|
||||||
|
| available to in your application. A sensible default has been set.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'domain' => null,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| HTTPS Only Cookies
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| By setting this option to true, session cookies will only be sent back
|
||||||
|
| to the server if the browser has a HTTPS connection. This will keep
|
||||||
|
| the cookie from being sent to you if it can not be done securely.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'secure' => false,
|
||||||
|
|
||||||
|
);
|
20
app/config/testing/cache.php
Normal file
20
app/config/testing/cache.php
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Cache Driver
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option controls the default cache "driver" that will be used when
|
||||||
|
| using the Caching library. Of course, you may use other drivers any
|
||||||
|
| time you wish. This is the default when another is not specified.
|
||||||
|
|
|
||||||
|
| Supported: "file", "database", "apc", "memcached", "redis", "array"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'driver' => 'array',
|
||||||
|
|
||||||
|
);
|
21
app/config/testing/session.php
Normal file
21
app/config/testing/session.php
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Session Driver
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option controls the default session "driver" that will be used on
|
||||||
|
| requests. By default, we will use the lightweight native driver but
|
||||||
|
| you may specify any of the other wonderful drivers provided here.
|
||||||
|
|
|
||||||
|
| Supported: "native", "cookie", "database", "apc",
|
||||||
|
| "memcached", "redis", "array"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'driver' => 'array',
|
||||||
|
|
||||||
|
);
|
31
app/config/view.php
Normal file
31
app/config/view.php
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| View Storage Paths
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Most templating systems load templates from disk. Here you may specify
|
||||||
|
| an array of paths that should be checked for your views. Of course
|
||||||
|
| the usual Laravel view path has already been registered for you.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'paths' => array(__DIR__.'/../views'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Pagination View
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This view will be used to render the pagination link output, and can
|
||||||
|
| be easily customized here to show any view you like. A clean view
|
||||||
|
| compatible with Twitter's Bootstrap is given to you by default.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'pagination' => 'pagination::slider-3',
|
||||||
|
|
||||||
|
);
|
31
app/config/workbench.php
Normal file
31
app/config/workbench.php
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Workbench Author Name
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When you create new packages via the Artisan "workbench" command your
|
||||||
|
| name is needed to generate the composer.json file for your package.
|
||||||
|
| You may specify it now so it is used for all of your workbenches.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'name' => '',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Workbench Author E-Mail Address
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Like the option above, your e-mail address is used when generating new
|
||||||
|
| workbench packages. The e-mail is placed in your composer.json file
|
||||||
|
| automatically after the package is created by the workbench tool.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'email' => '',
|
||||||
|
|
||||||
|
);
|
18
app/controllers/BaseController.php
Normal file
18
app/controllers/BaseController.php
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class BaseController extends Controller {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setup the layout used by the controller.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
protected function setupLayout()
|
||||||
|
{
|
||||||
|
if ( ! is_null($this->layout))
|
||||||
|
{
|
||||||
|
$this->layout = View::make($this->layout);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
23
app/controllers/HomeController.php
Normal file
23
app/controllers/HomeController.php
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class HomeController extends BaseController {
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Home Controller
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| You may wish to use controllers instead of, or in addition to, Closure
|
||||||
|
| based routes. That's great! Here is an example controller method to
|
||||||
|
| get you started. To route to this controller, just add the route:
|
||||||
|
|
|
||||||
|
| Route::get('/', 'HomeController@showWelcome');
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
public function showWelcome()
|
||||||
|
{
|
||||||
|
return View::make('hello');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
0
app/database/production.sqlite
Normal file
0
app/database/production.sqlite
Normal file
17
app/database/seeds/DatabaseSeeder.php
Normal file
17
app/database/seeds/DatabaseSeeder.php
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class DatabaseSeeder extends Seeder {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Run the database seeds.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
Eloquent::unguard();
|
||||||
|
|
||||||
|
// $this->call('UserTableSeeder');
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
90
app/filters.php
Normal file
90
app/filters.php
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application & Route Filters
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Below you will find the "before" and "after" events for the application
|
||||||
|
| which may be used to do any work before or after a request into your
|
||||||
|
| application. Here you may also register your custom route filters.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
App::before(function($request)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
App::after(function($request, $response)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
});
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Authentication Filters
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following filters are used to verify that the user of the current
|
||||||
|
| session is logged into this application. The "basic" filter easily
|
||||||
|
| integrates HTTP Basic authentication for quick, simple checking.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
Route::filter('auth', function()
|
||||||
|
{
|
||||||
|
if (Auth::guest())
|
||||||
|
{
|
||||||
|
if (Request::ajax())
|
||||||
|
{
|
||||||
|
return Response::make('Unauthorized', 401);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return Redirect::guest('login');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
Route::filter('auth.basic', function()
|
||||||
|
{
|
||||||
|
return Auth::basic();
|
||||||
|
});
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Guest Filter
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The "guest" filter is the counterpart of the authentication filters as
|
||||||
|
| it simply checks that the current user is not logged in. A redirect
|
||||||
|
| response will be issued if they are, which you may freely change.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
Route::filter('guest', function()
|
||||||
|
{
|
||||||
|
if (Auth::check()) return Redirect::to('/');
|
||||||
|
});
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| CSRF Protection Filter
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The CSRF filter is responsible for protecting your application against
|
||||||
|
| cross-site request forgery attacks. If this special token in a user
|
||||||
|
| session does not match the one given in this request, we'll bail.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
Route::filter('csrf', function()
|
||||||
|
{
|
||||||
|
if (Session::token() != Input::get('_token'))
|
||||||
|
{
|
||||||
|
throw new Illuminate\Session\TokenMismatchException;
|
||||||
|
}
|
||||||
|
});
|
20
app/lang/en/pagination.php
Normal file
20
app/lang/en/pagination.php
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Pagination Language Lines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following language lines are used by the paginator library to build
|
||||||
|
| the simple pagination links. You are free to change them to anything
|
||||||
|
| you want to customize your views to better match your application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'previous' => '« Previous',
|
||||||
|
|
||||||
|
'next' => 'Next »',
|
||||||
|
|
||||||
|
);
|
24
app/lang/en/reminders.php
Normal file
24
app/lang/en/reminders.php
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Password Reminder Language Lines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following language lines are the default lines which match reasons
|
||||||
|
| that are given by the password broker for a password update attempt
|
||||||
|
| has failed, such as for an invalid token or invalid new password.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
"password" => "Passwords must be at least six characters and match the confirmation.",
|
||||||
|
|
||||||
|
"user" => "We can't find a user with that e-mail address.",
|
||||||
|
|
||||||
|
"token" => "This password reset token is invalid.",
|
||||||
|
|
||||||
|
"sent" => "Password reminder sent!",
|
||||||
|
|
||||||
|
);
|
104
app/lang/en/validation.php
Normal file
104
app/lang/en/validation.php
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Validation Language Lines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following language lines contain the default error messages used by
|
||||||
|
| the validator class. Some of these rules have multiple versions such
|
||||||
|
| as the size rules. Feel free to tweak each of these messages here.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
"accepted" => "The :attribute must be accepted.",
|
||||||
|
"active_url" => "The :attribute is not a valid URL.",
|
||||||
|
"after" => "The :attribute must be a date after :date.",
|
||||||
|
"alpha" => "The :attribute may only contain letters.",
|
||||||
|
"alpha_dash" => "The :attribute may only contain letters, numbers, and dashes.",
|
||||||
|
"alpha_num" => "The :attribute may only contain letters and numbers.",
|
||||||
|
"array" => "The :attribute must be an array.",
|
||||||
|
"before" => "The :attribute must be a date before :date.",
|
||||||
|
"between" => array(
|
||||||
|
"numeric" => "The :attribute must be between :min and :max.",
|
||||||
|
"file" => "The :attribute must be between :min and :max kilobytes.",
|
||||||
|
"string" => "The :attribute must be between :min and :max characters.",
|
||||||
|
"array" => "The :attribute must have between :min and :max items.",
|
||||||
|
),
|
||||||
|
"confirmed" => "The :attribute confirmation does not match.",
|
||||||
|
"date" => "The :attribute is not a valid date.",
|
||||||
|
"date_format" => "The :attribute does not match the format :format.",
|
||||||
|
"different" => "The :attribute and :other must be different.",
|
||||||
|
"digits" => "The :attribute must be :digits digits.",
|
||||||
|
"digits_between" => "The :attribute must be between :min and :max digits.",
|
||||||
|
"email" => "The :attribute must be a valid email address.",
|
||||||
|
"exists" => "The selected :attribute is invalid.",
|
||||||
|
"image" => "The :attribute must be an image.",
|
||||||
|
"in" => "The selected :attribute is invalid.",
|
||||||
|
"integer" => "The :attribute must be an integer.",
|
||||||
|
"ip" => "The :attribute must be a valid IP address.",
|
||||||
|
"max" => array(
|
||||||
|
"numeric" => "The :attribute may not be greater than :max.",
|
||||||
|
"file" => "The :attribute may not be greater than :max kilobytes.",
|
||||||
|
"string" => "The :attribute may not be greater than :max characters.",
|
||||||
|
"array" => "The :attribute may not have more than :max items.",
|
||||||
|
),
|
||||||
|
"mimes" => "The :attribute must be a file of type: :values.",
|
||||||
|
"min" => array(
|
||||||
|
"numeric" => "The :attribute must be at least :min.",
|
||||||
|
"file" => "The :attribute must be at least :min kilobytes.",
|
||||||
|
"string" => "The :attribute must be at least :min characters.",
|
||||||
|
"array" => "The :attribute must have at least :min items.",
|
||||||
|
),
|
||||||
|
"not_in" => "The selected :attribute is invalid.",
|
||||||
|
"numeric" => "The :attribute must be a number.",
|
||||||
|
"regex" => "The :attribute format is invalid.",
|
||||||
|
"required" => "The :attribute field is required.",
|
||||||
|
"required_if" => "The :attribute field is required when :other is :value.",
|
||||||
|
"required_with" => "The :attribute field is required when :values is present.",
|
||||||
|
"required_with_all" => "The :attribute field is required when :values is present.",
|
||||||
|
"required_without" => "The :attribute field is required when :values is not present.",
|
||||||
|
"required_without_all" => "The :attribute field is required when none of :values are present.",
|
||||||
|
"same" => "The :attribute and :other must match.",
|
||||||
|
"size" => array(
|
||||||
|
"numeric" => "The :attribute must be :size.",
|
||||||
|
"file" => "The :attribute must be :size kilobytes.",
|
||||||
|
"string" => "The :attribute must be :size characters.",
|
||||||
|
"array" => "The :attribute must contain :size items.",
|
||||||
|
),
|
||||||
|
"unique" => "The :attribute has already been taken.",
|
||||||
|
"url" => "The :attribute format is invalid.",
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Custom Validation Language Lines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify custom validation messages for attributes using the
|
||||||
|
| convention "attribute.rule" to name the lines. This makes it quick to
|
||||||
|
| specify a specific custom language line for a given attribute rule.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'custom' => array(
|
||||||
|
'attribute-name' => array(
|
||||||
|
'rule-name' => 'custom-message',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Custom Validation Attributes
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following language lines are used to swap attribute place-holders
|
||||||
|
| with something more reader friendly such as E-Mail Address instead
|
||||||
|
| of "email". This simply helps us make messages a little cleaner.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'attributes' => array(),
|
||||||
|
|
||||||
|
);
|
26
app/models/User.php
Normal file
26
app/models/User.php
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Auth\UserTrait;
|
||||||
|
use Illuminate\Auth\UserInterface;
|
||||||
|
use Illuminate\Auth\Reminders\RemindableTrait;
|
||||||
|
use Illuminate\Auth\Reminders\RemindableInterface;
|
||||||
|
|
||||||
|
class User extends Eloquent implements UserInterface, RemindableInterface {
|
||||||
|
|
||||||
|
use UserTrait, RemindableTrait;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The database table used by the model.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $table = 'users';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The attributes excluded from the model's JSON form.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $hidden = array('password', 'remember_token');
|
||||||
|
|
||||||
|
}
|
17
app/routes.php
Normal file
17
app/routes.php
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Routes
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here is where you can register all of the routes for an application.
|
||||||
|
| It's a breeze. Simply tell Laravel the URIs it should respond to
|
||||||
|
| and give it the Closure to execute when that URI is requested.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
Route::get('/', function()
|
||||||
|
{
|
||||||
|
return View::make('hello');
|
||||||
|
});
|
13
app/start/artisan.php
Normal file
13
app/start/artisan.php
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Register The Artisan Commands
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Each available Artisan command must be registered with the console so
|
||||||
|
| that it is available to be called. We'll register every command so
|
||||||
|
| the console gets access to each of the command object instances.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
81
app/start/global.php
Normal file
81
app/start/global.php
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Register The Laravel Class Loader
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| In addition to using Composer, you may use the Laravel class loader to
|
||||||
|
| load your controllers and models. This is useful for keeping all of
|
||||||
|
| your classes in the "global" namespace without Composer updating.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
ClassLoader::addDirectories(array(
|
||||||
|
|
||||||
|
app_path().'/commands',
|
||||||
|
app_path().'/controllers',
|
||||||
|
app_path().'/models',
|
||||||
|
app_path().'/database/seeds',
|
||||||
|
|
||||||
|
));
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Error Logger
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here we will configure the error logger setup for the application which
|
||||||
|
| is built on top of the wonderful Monolog library. By default we will
|
||||||
|
| build a basic log file setup which creates a single file for logs.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
Log::useFiles(storage_path().'/logs/laravel.log');
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Error Handler
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may handle any errors that occur in your application, including
|
||||||
|
| logging them or displaying custom views for specific errors. You may
|
||||||
|
| even register several error handlers to handle different types of
|
||||||
|
| exceptions. If nothing is returned, the default error view is
|
||||||
|
| shown, which includes a detailed stack trace during debug.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
App::error(function(Exception $exception, $code)
|
||||||
|
{
|
||||||
|
Log::error($exception);
|
||||||
|
});
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Maintenance Mode Handler
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The "down" Artisan command gives you the ability to put an application
|
||||||
|
| into maintenance mode. Here, you will define what is displayed back
|
||||||
|
| to the user if maintenance mode is in effect for the application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
App::down(function()
|
||||||
|
{
|
||||||
|
return Response::make("Be right back!", 503);
|
||||||
|
});
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Require The Filters File
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Next we will load the filters file for the application. This gives us
|
||||||
|
| a nice separate location to store our route and application filter
|
||||||
|
| definitions instead of putting them all in the main routes file.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
require app_path().'/filters.php';
|
3
app/start/local.php
Normal file
3
app/start/local.php
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
//
|
17
app/tests/ExampleTest.php
Normal file
17
app/tests/ExampleTest.php
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class ExampleTest extends TestCase {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A basic functional test example.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function testBasicExample()
|
||||||
|
{
|
||||||
|
$crawler = $this->client->request('GET', '/');
|
||||||
|
|
||||||
|
$this->assertTrue($this->client->getResponse()->isOk());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
19
app/tests/TestCase.php
Normal file
19
app/tests/TestCase.php
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class TestCase extends Illuminate\Foundation\Testing\TestCase {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates the application.
|
||||||
|
*
|
||||||
|
* @return \Symfony\Component\HttpKernel\HttpKernelInterface
|
||||||
|
*/
|
||||||
|
public function createApplication()
|
||||||
|
{
|
||||||
|
$unitTesting = true;
|
||||||
|
|
||||||
|
$testEnvironment = 'testing';
|
||||||
|
|
||||||
|
return require __DIR__.'/../../bootstrap/start.php';
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
14
app/views/emails/auth/reminder.blade.php
Normal file
14
app/views/emails/auth/reminder.blade.php
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en-US">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h2>Password Reset</h2>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
To reset your password, complete this form: {{ URL::to('password/reset', array($token)) }}.<br/>
|
||||||
|
This link will expire in {{ Config::get('auth.reminder.expire', 60) }} minutes.
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
42
app/views/hello.php
Normal file
42
app/views/hello.php
Normal file
File diff suppressed because one or more lines are too long
74
artisan
Executable file
74
artisan
Executable file
@@ -0,0 +1,74 @@
|
|||||||
|
#!/usr/bin/env php
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Register The Auto Loader
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Composer provides a convenient, automatically generated class loader
|
||||||
|
| for our application. We just need to utilize it! We'll require it
|
||||||
|
| into the script here so that we do not have to worry about the
|
||||||
|
| loading of any our classes "manually". Feels great to relax.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
require __DIR__.'/bootstrap/autoload.php';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Turn On The Lights
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| We need to illuminate PHP development, so let's turn on the lights.
|
||||||
|
| This bootstraps the framework and gets it ready for and then it
|
||||||
|
| will load up this application so that we can run it and send
|
||||||
|
| the responses back to the browser and delight these users.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$app = require_once __DIR__.'/bootstrap/start.php';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Load The Artisan Console Application
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| We'll need to run the script to load and return the Artisan console
|
||||||
|
| application. We keep this in its own script so that we will load
|
||||||
|
| the console application independent of running commands which
|
||||||
|
| will allow us to fire commands from Routes when we want to.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$app->setRequestForConsoleEnvironment();
|
||||||
|
|
||||||
|
$artisan = Illuminate\Console\Application::start($app);
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Run The Artisan Application
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When we run the console application, the current CLI command will be
|
||||||
|
| executed in this console and the response sent back to a terminal
|
||||||
|
| or another output device for the developers. Here goes nothing!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$status = $artisan->run();
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Shutdown The Application
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Once Artisan has finished running. We will fire off the shutdown events
|
||||||
|
| so that any final work may be done by the application before we shut
|
||||||
|
| down the process. This is the last thing to happen to the request.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$app->shutdown();
|
||||||
|
|
||||||
|
exit($status);
|
75
bootstrap/autoload.php
Normal file
75
bootstrap/autoload.php
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
define('LARAVEL_START', microtime(true));
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Register The Composer Auto Loader
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Composer provides a convenient, automatically generated class loader
|
||||||
|
| for our application. We just need to utilize it! We'll require it
|
||||||
|
| into the script here so that we do not have to worry about the
|
||||||
|
| loading of any our classes "manually". Feels great to relax.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
require __DIR__.'/../vendor/autoload.php';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Include The Compiled Class File
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| To dramatically increase your application's performance, you may use a
|
||||||
|
| compiled class file which contains all of the classes commonly used
|
||||||
|
| by a request. The Artisan "optimize" is used to create this file.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (file_exists($compiled = __DIR__.'/compiled.php'))
|
||||||
|
{
|
||||||
|
require $compiled;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Setup Patchwork UTF-8 Handling
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The Patchwork library provides solid handling of UTF-8 strings as well
|
||||||
|
| as provides replacements for all mb_* and iconv type functions that
|
||||||
|
| are not available by default in PHP. We'll setup this stuff here.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
Patchwork\Utf8\Bootup::initMbstring();
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Register The Laravel Auto Loader
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| We register an auto-loader "behind" the Composer loader that can load
|
||||||
|
| model classes on the fly, even if the autoload files have not been
|
||||||
|
| regenerated for the application. We'll add it to the stack here.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
Illuminate\Support\ClassLoader::register();
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Register The Workbench Loaders
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The Laravel workbench provides a convenient place to develop packages
|
||||||
|
| when working locally. However we will need to load in the Composer
|
||||||
|
| auto-load files for the packages so that these can be used here.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (is_dir($workbench = __DIR__.'/../workbench'))
|
||||||
|
{
|
||||||
|
Illuminate\Workbench\Starter::start($workbench);
|
||||||
|
}
|
57
bootstrap/paths.php
Normal file
57
bootstrap/paths.php
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here we just defined the path to the application directory. Most likely
|
||||||
|
| you will never need to change this value as the default setup should
|
||||||
|
| work perfectly fine for the vast majority of all our applications.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'app' => __DIR__.'/../app',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Public Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The public path contains the assets for your web application, such as
|
||||||
|
| your JavaScript and CSS files, and also contains the primary entry
|
||||||
|
| point for web requests into these applications from the outside.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'public' => __DIR__.'/../public',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Base Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The base path is the root of the Laravel installation. Most likely you
|
||||||
|
| will not need to change this value. But, if for some wild reason it
|
||||||
|
| is necessary you will do so here, just proceed with some caution.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'base' => __DIR__.'/..',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Storage Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The storage path is used by Laravel to store cached Blade views, logs
|
||||||
|
| and other pieces of information. You may modify the path here when
|
||||||
|
| you want to change the location of this directory for your apps.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'storage' => __DIR__.'/../app/storage',
|
||||||
|
|
||||||
|
);
|
73
bootstrap/start.php
Normal file
73
bootstrap/start.php
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Create The Application
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The first thing we will do is create a new Laravel application instance
|
||||||
|
| which serves as the "glue" for all the components of Laravel, and is
|
||||||
|
| the IoC container for the system binding all of the various parts.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$app = new Illuminate\Foundation\Application;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Detect The Application Environment
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Laravel takes a dead simple approach to your application environments
|
||||||
|
| so you can just specify a machine name for the host that matches a
|
||||||
|
| given environment, then we will automatically detect it for you.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$env = $app->detectEnvironment(array(
|
||||||
|
|
||||||
|
'local' => array('homestead'),
|
||||||
|
|
||||||
|
));
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Bind Paths
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here we are binding the paths configured in paths.php to the app. You
|
||||||
|
| should not be changing these here. If you need to change these you
|
||||||
|
| may do so within the paths.php file and they will be bound here.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$app->bindInstallPaths(require __DIR__.'/paths.php');
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Load The Application
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here we will load this Illuminate application. We will keep this in a
|
||||||
|
| separate location so we can isolate the creation of an application
|
||||||
|
| from the actual running of the application with a given request.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$framework = $app['path.base'].
|
||||||
|
'/vendor/laravel/framework/src';
|
||||||
|
|
||||||
|
require $framework.'/Illuminate/Foundation/start.php';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Return The Application
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This script returns the application instance. The instance is given to
|
||||||
|
| the calling script so we can separate the building of the instances
|
||||||
|
| from the actual running of the application and sending responses.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
return $app;
|
36
composer.json
Normal file
36
composer.json
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
"name": "laravel/laravel",
|
||||||
|
"description": "The Laravel Framework.",
|
||||||
|
"keywords": ["framework", "laravel"],
|
||||||
|
"license": "MIT",
|
||||||
|
"require": {
|
||||||
|
"laravel/framework": "4.2.*"
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"classmap": [
|
||||||
|
"app/commands",
|
||||||
|
"app/controllers",
|
||||||
|
"app/models",
|
||||||
|
"app/database/migrations",
|
||||||
|
"app/database/seeds",
|
||||||
|
"app/tests/TestCase.php"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"post-install-cmd": [
|
||||||
|
"php artisan clear-compiled",
|
||||||
|
"php artisan optimize"
|
||||||
|
],
|
||||||
|
"post-update-cmd": [
|
||||||
|
"php artisan clear-compiled",
|
||||||
|
"php artisan optimize"
|
||||||
|
],
|
||||||
|
"post-create-project-cmd": [
|
||||||
|
"php artisan key:generate"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"preferred-install": "dist"
|
||||||
|
},
|
||||||
|
"minimum-stability": "stable"
|
||||||
|
}
|
18
phpunit.xml
Normal file
18
phpunit.xml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<phpunit backupGlobals="false"
|
||||||
|
backupStaticAttributes="false"
|
||||||
|
bootstrap="bootstrap/autoload.php"
|
||||||
|
colors="true"
|
||||||
|
convertErrorsToExceptions="true"
|
||||||
|
convertNoticesToExceptions="true"
|
||||||
|
convertWarningsToExceptions="true"
|
||||||
|
processIsolation="false"
|
||||||
|
stopOnFailure="false"
|
||||||
|
syntaxCheck="false"
|
||||||
|
>
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="Application Test Suite">
|
||||||
|
<directory>./app/tests/</directory>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
</phpunit>
|
15
public/.htaccess
Normal file
15
public/.htaccess
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
<IfModule mod_negotiation.c>
|
||||||
|
Options -MultiViews
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
RewriteEngine On
|
||||||
|
|
||||||
|
# Redirect Trailing Slashes...
|
||||||
|
RewriteRule ^(.*)/$ /$1 [L,R=301]
|
||||||
|
|
||||||
|
# Handle Front Controller...
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteRule ^ index.php [L]
|
||||||
|
</IfModule>
|
0
public/favicon.ico
Normal file
0
public/favicon.ico
Normal file
49
public/index.php
Normal file
49
public/index.php
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Laravel - A PHP Framework For Web Artisans
|
||||||
|
*
|
||||||
|
* @package Laravel
|
||||||
|
* @author Taylor Otwell <taylorotwell@gmail.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Register The Auto Loader
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Composer provides a convenient, automatically generated class loader
|
||||||
|
| for our application. We just need to utilize it! We'll require it
|
||||||
|
| into the script here so that we do not have to worry about the
|
||||||
|
| loading of any our classes "manually". Feels great to relax.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
require __DIR__.'/../bootstrap/autoload.php';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Turn On The Lights
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| We need to illuminate PHP development, so let's turn on the lights.
|
||||||
|
| This bootstraps the framework and gets it ready for use, then it
|
||||||
|
| will load up this application so that we can run it and send
|
||||||
|
| the responses back to the browser and delight these users.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$app = require_once __DIR__.'/../bootstrap/start.php';
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Run The Application
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Once we have the application, we can simply call the run method,
|
||||||
|
| which will execute the request and send the response back to
|
||||||
|
| the client's browser allowing them to enjoy the creative
|
||||||
|
| and wonderful application we have whipped up for them.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$app->run();
|
2
public/robots.txt
Normal file
2
public/robots.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
User-agent: *
|
||||||
|
Disallow:
|
19
server.php
Normal file
19
server.php
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
|
||||||
|
|
||||||
|
$uri = urldecode($uri);
|
||||||
|
|
||||||
|
$paths = require __DIR__.'/bootstrap/paths.php';
|
||||||
|
|
||||||
|
$requested = $paths['public'].$uri;
|
||||||
|
|
||||||
|
// This file allows us to emulate Apache's "mod_rewrite" functionality from the
|
||||||
|
// built-in PHP web server. This provides a convenient way to test a Laravel
|
||||||
|
// application without having installed a "real" web server software here.
|
||||||
|
if ($uri !== '/' and file_exists($requested))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
require_once $paths['public'].'/index.php';
|
Reference in New Issue
Block a user