From 26a3027711eec44fc713f422349357265711e3d2 Mon Sep 17 00:00:00 2001 From: smarcet Date: Mon, 14 Oct 2013 12:16:23 -0300 Subject: [PATCH] [smarcet] - Refs #4590 - Create initial solution and upload to git repo --- .gitattributes | 1 + .gitignore | 5 + .idea/.name | 1 + .idea/encodings.xml | 5 + .idea/misc.xml | 5 + .idea/modules.xml | 9 + .idea/openidIdp.iml | 163 +++++++++++++++ .idea/scopes/scope_settings.xml | 5 + .idea/vcs.xml | 7 + .idea/workspace.xml | 250 +++++++++++++++++++++++ CONTRIBUTING.md | 3 + app/commands/.gitkeep | 0 app/config/app.php | 184 +++++++++++++++++ app/config/auth.php | 71 +++++++ app/config/cache.php | 89 ++++++++ app/config/compile.php | 18 ++ app/config/database.php | 124 +++++++++++ app/config/mail.php | 124 +++++++++++ app/config/packages/.gitkeep | 0 app/config/queue.php | 60 ++++++ app/config/session.php | 125 ++++++++++++ app/config/testing/cache.php | 20 ++ app/config/testing/session.php | 21 ++ app/config/view.php | 31 +++ app/config/workbench.php | 31 +++ app/controllers/.gitkeep | 0 app/controllers/BaseController.php | 18 ++ app/controllers/HomeController.php | 23 +++ app/database/migrations/.gitkeep | 0 app/database/production.sqlite | 0 app/database/seeds/.gitkeep | 0 app/database/seeds/DatabaseSeeder.php | 17 ++ app/filters.php | 80 ++++++++ app/lang/en/pagination.php | 20 ++ app/lang/en/reminders.php | 22 ++ app/lang/en/validation.php | 98 +++++++++ app/models/User.php | 52 +++++ app/routes.php | 17 ++ app/start/artisan.php | 13 ++ app/start/global.php | 83 ++++++++ app/start/local.php | 3 + app/storage/.gitignore | 1 + app/storage/cache/.gitignore | 2 + app/storage/logs/.gitignore | 2 + app/storage/meta/.gitignore | 2 + app/storage/sessions/.gitignore | 2 + app/storage/views/.gitignore | 2 + app/tests/ExampleTest.php | 17 ++ app/tests/TestCase.php | 19 ++ app/views/emails/auth/reminder.blade.php | 13 ++ app/views/hello.php | 52 +++++ artisan | 74 +++++++ bootstrap/autoload.php | 75 +++++++ bootstrap/paths.php | 57 ++++++ bootstrap/start.php | 74 +++++++ composer.json | 39 ++++ phpunit.xml | 18 ++ public/.htaccess | 8 + public/favicon.ico | 0 public/index.php | 62 ++++++ public/packages/.gitkeep | 0 public/robots.txt | 2 + readme.md | 21 ++ server.php | 19 ++ 64 files changed, 2359 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 .idea/.name create mode 100644 .idea/encodings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/openidIdp.iml create mode 100644 .idea/scopes/scope_settings.xml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml create mode 100644 CONTRIBUTING.md create mode 100644 app/commands/.gitkeep create mode 100644 app/config/app.php create mode 100644 app/config/auth.php create mode 100644 app/config/cache.php create mode 100644 app/config/compile.php create mode 100644 app/config/database.php create mode 100644 app/config/mail.php create mode 100644 app/config/packages/.gitkeep create mode 100644 app/config/queue.php create mode 100644 app/config/session.php create mode 100644 app/config/testing/cache.php create mode 100644 app/config/testing/session.php create mode 100644 app/config/view.php create mode 100644 app/config/workbench.php create mode 100644 app/controllers/.gitkeep create mode 100644 app/controllers/BaseController.php create mode 100644 app/controllers/HomeController.php create mode 100644 app/database/migrations/.gitkeep create mode 100644 app/database/production.sqlite create mode 100644 app/database/seeds/.gitkeep create mode 100644 app/database/seeds/DatabaseSeeder.php create mode 100644 app/filters.php create mode 100644 app/lang/en/pagination.php create mode 100644 app/lang/en/reminders.php create mode 100644 app/lang/en/validation.php create mode 100644 app/models/User.php create mode 100644 app/routes.php create mode 100644 app/start/artisan.php create mode 100644 app/start/global.php create mode 100644 app/start/local.php create mode 100644 app/storage/.gitignore create mode 100644 app/storage/cache/.gitignore create mode 100644 app/storage/logs/.gitignore create mode 100644 app/storage/meta/.gitignore create mode 100644 app/storage/sessions/.gitignore create mode 100644 app/storage/views/.gitignore create mode 100644 app/tests/ExampleTest.php create mode 100644 app/tests/TestCase.php create mode 100644 app/views/emails/auth/reminder.blade.php create mode 100644 app/views/hello.php create mode 100755 artisan create mode 100644 bootstrap/autoload.php create mode 100644 bootstrap/paths.php create mode 100644 bootstrap/start.php create mode 100644 composer.json create mode 100644 phpunit.xml create mode 100644 public/.htaccess create mode 100644 public/favicon.ico create mode 100644 public/index.php create mode 100644 public/packages/.gitkeep create mode 100644 public/robots.txt create mode 100644 readme.md create mode 100644 server.php diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..21256661 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..ba8704c5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +/bootstrap/compiled.php +/vendor +composer.phar +composer.lock +.DS_Store \ No newline at end of file diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 00000000..bae6cae9 --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +openidIdp \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 00000000..e206d70d --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 00000000..1162f438 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 00000000..8a3c58a7 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/.idea/openidIdp.iml b/.idea/openidIdp.iml new file mode 100644 index 00000000..d368d92d --- /dev/null +++ b/.idea/openidIdp.iml @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml new file mode 100644 index 00000000..922003b8 --- /dev/null +++ b/.idea/scopes/scope_settings.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 00000000..def6a6a1 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 00000000..89ac7cee --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,250 @@ + + + + + + + + + + $PROJECT_DIR$/composer.json + $PROJECT_DIR$/composer.phar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1381763171476 + 1381763171476 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..015febc4 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,3 @@ +# Contribution Guidelines + +Please submit all issues and pull requests to the [laravel/framework](http://github.com/laravel/framework) repository! \ No newline at end of file diff --git a/app/commands/.gitkeep b/app/commands/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/app/config/app.php b/app/config/app.php new file mode 100644 index 00000000..3bfbb80b --- /dev/null +++ b/app/config/app.php @@ -0,0 +1,184 @@ + true, + + /* + |-------------------------------------------------------------------------- + | 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', + + /* + |-------------------------------------------------------------------------- + | 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' => '2mikPhsqqnw9qfEtp3XxHmtkZqoTTvWl', + + /* + |-------------------------------------------------------------------------- + | 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\Foundation\Providers\CommandCreatorServiceProvider', + 'Illuminate\Session\CommandsServiceProvider', + 'Illuminate\Foundation\Providers\ComposerServiceProvider', + 'Illuminate\Routing\ControllerServiceProvider', + 'Illuminate\Cookie\CookieServiceProvider', + 'Illuminate\Database\DatabaseServiceProvider', + 'Illuminate\Encryption\EncryptionServiceProvider', + 'Illuminate\Filesystem\FilesystemServiceProvider', + 'Illuminate\Hashing\HashServiceProvider', + 'Illuminate\Html\HtmlServiceProvider', + 'Illuminate\Foundation\Providers\KeyGeneratorServiceProvider', + 'Illuminate\Log\LogServiceProvider', + 'Illuminate\Mail\MailServiceProvider', + 'Illuminate\Foundation\Providers\MaintenanceServiceProvider', + 'Illuminate\Database\MigrationServiceProvider', + 'Illuminate\Foundation\Providers\OptimizeServiceProvider', + 'Illuminate\Pagination\PaginationServiceProvider', + 'Illuminate\Foundation\Providers\PublisherServiceProvider', + 'Illuminate\Queue\QueueServiceProvider', + 'Illuminate\Redis\RedisServiceProvider', + 'Illuminate\Auth\Reminders\ReminderServiceProvider', + 'Illuminate\Foundation\Providers\RouteListServiceProvider', + 'Illuminate\Database\SeedServiceProvider', + 'Illuminate\Foundation\Providers\ServerServiceProvider', + 'Illuminate\Session\SessionServiceProvider', + 'Illuminate\Foundation\Providers\TinkerServiceProvider', + '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\Controllers\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', + 'Str' => 'Illuminate\Support\Str', + 'URL' => 'Illuminate\Support\Facades\URL', + 'Validator' => 'Illuminate\Support\Facades\Validator', + 'View' => 'Illuminate\Support\Facades\View', + + ), + +); diff --git a/app/config/auth.php b/app/config/auth.php new file mode 100644 index 00000000..38eb282b --- /dev/null +++ b/app/config/auth.php @@ -0,0 +1,71 @@ + '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, + + ), + +); \ No newline at end of file diff --git a/app/config/cache.php b/app/config/cache.php new file mode 100644 index 00000000..ce898423 --- /dev/null +++ b/app/config/cache.php @@ -0,0 +1,89 @@ + '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', + +); diff --git a/app/config/compile.php b/app/config/compile.php new file mode 100644 index 00000000..54d7185b --- /dev/null +++ b/app/config/compile.php @@ -0,0 +1,18 @@ + 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' => 'database', + 'username' => 'root', + 'password' => '', + 'charset' => 'utf8', + 'collation' => 'utf8_unicode_ci', + 'prefix' => '', + ), + + 'pgsql' => array( + 'driver' => 'pgsql', + 'host' => 'localhost', + 'database' => 'database', + 'username' => 'root', + '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 have not actually be run in the databases. + | + */ + + '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' => true, + + 'default' => array( + 'host' => '127.0.0.1', + 'port' => 6379, + 'database' => 0, + ), + + ), + +); diff --git a/app/config/mail.php b/app/config/mail.php new file mode 100644 index 00000000..a7151a06 --- /dev/null +++ b/app/config/mail.php @@ -0,0 +1,124 @@ + '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 Postmark mail service, which will provide reliable delivery. + | + */ + + 'host' => 'smtp.mailgun.org', + + /* + |-------------------------------------------------------------------------- + | SMTP Host Port + |-------------------------------------------------------------------------- + | + | This is the SMTP port used by your application to delivery e-mails to + | users of your application. Like the host we have set this value to + | stay compatible with the Postmark 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, + +); \ No newline at end of file diff --git a/app/config/packages/.gitkeep b/app/config/packages/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/app/config/queue.php b/app/config/queue.php new file mode 100644 index 00000000..220998cb --- /dev/null +++ b/app/config/queue.php @@ -0,0 +1,60 @@ + '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', + ), + + 'sqs' => array( + 'driver' => 'sqs', + 'key' => 'your-public-key', + 'secret' => 'your-secret-key', + 'queue' => 'your-queue-url', + 'region' => 'us-east-1', + ), + + 'iron' => array( + 'driver' => 'iron', + 'project' => 'your-project-id', + 'token' => 'your-token', + 'queue' => 'your-queue-name', + ), + + ), + +); diff --git a/app/config/session.php b/app/config/session.php new file mode 100644 index 00000000..549d3ff3 --- /dev/null +++ b/app/config/session.php @@ -0,0 +1,125 @@ + 'native', + + /* + |-------------------------------------------------------------------------- + | 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 when the browser closes, set it to zero. + | + */ + + 'lifetime' => 120, + + /* + |-------------------------------------------------------------------------- + | 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" session driver, you may specify the database + | connection that should be used to manage your sessions. This should + | correspond to a connection in your "database" configuration file. + | + */ + + '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, + +); diff --git a/app/config/testing/cache.php b/app/config/testing/cache.php new file mode 100644 index 00000000..16d3ae2f --- /dev/null +++ b/app/config/testing/cache.php @@ -0,0 +1,20 @@ + 'array', + +); \ No newline at end of file diff --git a/app/config/testing/session.php b/app/config/testing/session.php new file mode 100644 index 00000000..a18c1b9f --- /dev/null +++ b/app/config/testing/session.php @@ -0,0 +1,21 @@ + 'array', + +); \ No newline at end of file diff --git a/app/config/view.php b/app/config/view.php new file mode 100644 index 00000000..eba10a4c --- /dev/null +++ b/app/config/view.php @@ -0,0 +1,31 @@ + 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', + +); diff --git a/app/config/workbench.php b/app/config/workbench.php new file mode 100644 index 00000000..56bee526 --- /dev/null +++ b/app/config/workbench.php @@ -0,0 +1,31 @@ + '', + + /* + |-------------------------------------------------------------------------- + | 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' => '', + +); \ No newline at end of file diff --git a/app/controllers/.gitkeep b/app/controllers/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/app/controllers/BaseController.php b/app/controllers/BaseController.php new file mode 100644 index 00000000..097e161a --- /dev/null +++ b/app/controllers/BaseController.php @@ -0,0 +1,18 @@ +layout)) + { + $this->layout = View::make($this->layout); + } + } + +} \ No newline at end of file diff --git a/app/controllers/HomeController.php b/app/controllers/HomeController.php new file mode 100644 index 00000000..796a085e --- /dev/null +++ b/app/controllers/HomeController.php @@ -0,0 +1,23 @@ +call('UserTableSeeder'); + } + +} \ No newline at end of file diff --git a/app/filters.php b/app/filters.php new file mode 100644 index 00000000..85f82c41 --- /dev/null +++ b/app/filters.php @@ -0,0 +1,80 @@ + '« Previous', + + 'next' => 'Next »', + +); \ No newline at end of file diff --git a/app/lang/en/reminders.php b/app/lang/en/reminders.php new file mode 100644 index 00000000..4a9f1766 --- /dev/null +++ b/app/lang/en/reminders.php @@ -0,0 +1,22 @@ + "Passwords must be 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.", + +); \ No newline at end of file diff --git a/app/lang/en/validation.php b/app/lang/en/validation.php new file mode 100644 index 00000000..5a24a40c --- /dev/null +++ b/app/lang/en/validation.php @@ -0,0 +1,98 @@ + "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 - :max.", + "file" => "The :attribute must be between :min - :max kilobytes.", + "string" => "The :attribute must be between :min - :max characters.", + "array" => "The :attribute must have between :min - :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 format is invalid.", + "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_without" => "The :attribute field is required when :values is not 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(), + + /* + |-------------------------------------------------------------------------- + | 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(), + +); diff --git a/app/models/User.php b/app/models/User.php new file mode 100644 index 00000000..42fe853f --- /dev/null +++ b/app/models/User.php @@ -0,0 +1,52 @@ +getKey(); + } + + /** + * Get the password for the user. + * + * @return string + */ + public function getAuthPassword() + { + return $this->password; + } + + /** + * Get the e-mail address where password reminders are sent. + * + * @return string + */ + public function getReminderEmail() + { + return $this->email; + } + +} \ No newline at end of file diff --git a/app/routes.php b/app/routes.php new file mode 100644 index 00000000..e2a75e25 --- /dev/null +++ b/app/routes.php @@ -0,0 +1,17 @@ +client->request('GET', '/'); + + $this->assertTrue($this->client->getResponse()->isOk()); + } + +} \ No newline at end of file diff --git a/app/tests/TestCase.php b/app/tests/TestCase.php new file mode 100644 index 00000000..49b80fc2 --- /dev/null +++ b/app/tests/TestCase.php @@ -0,0 +1,19 @@ + + + + + + +

Password Reset

+ +
+ To reset your password, complete this form: {{ URL::to('password/reset', array($token)) }}. +
+ + \ No newline at end of file diff --git a/app/views/hello.php b/app/views/hello.php new file mode 100644 index 00000000..065a0a8a --- /dev/null +++ b/app/views/hello.php @@ -0,0 +1,52 @@ + + + + + Laravel PHP Framework + + + +
+ +

You have arrived.

+
+ + diff --git a/artisan b/artisan new file mode 100755 index 00000000..1c169f6d --- /dev/null +++ b/artisan @@ -0,0 +1,74 @@ +#!/usr/bin/env php +boot(); + +/* +|-------------------------------------------------------------------------- +| 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. +| +*/ + +$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); \ No newline at end of file diff --git a/bootstrap/autoload.php b/bootstrap/autoload.php new file mode 100644 index 00000000..6b329312 --- /dev/null +++ b/bootstrap/autoload.php @@ -0,0 +1,75 @@ + __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', + +); diff --git a/bootstrap/start.php b/bootstrap/start.php new file mode 100644 index 00000000..9848f9bc --- /dev/null +++ b/bootstrap/start.php @@ -0,0 +1,74 @@ +redirectIfTrailingSlash(); + +/* +|-------------------------------------------------------------------------- +| Detect The Application Environment +|-------------------------------------------------------------------------- +| +| Laravel takes a dead simple approach to your application environments +| so you can just specify a machine name or HTTP host that matches a +| given environment, then we will automatically detect it for you. +| +*/ + +$env = $app->detectEnvironment(array( + + 'local' => array('your-machine-name'), + +)); + +/* +|-------------------------------------------------------------------------- +| 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 the Illuminate application. We'll keep this is 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; diff --git a/composer.json b/composer.json new file mode 100644 index 00000000..4d83d0f0 --- /dev/null +++ b/composer.json @@ -0,0 +1,39 @@ +{ + "name": "laravel/laravel", + "description": "The Laravel Framework.", + "keywords": ["framework", "laravel"], + "license": "MIT", + "require": { + "laravel/framework": "4.0.*", + "phpunit/phpunit": "3.7.*", + "zendframework/zend-crypt":"2.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 optimize" + ], + "pre-update-cmd": [ + "php artisan clear-compiled" + ], + "post-update-cmd": [ + "php artisan optimize" + ], + "post-create-project-cmd": [ + "php artisan key:generate" + ] + }, + "config": { + "preferred-install": "dist" + }, + "minimum-stability": "dev" +} diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 00000000..c42dc4f7 --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,18 @@ + + + + + ./app/tests/ + + + \ No newline at end of file diff --git a/public/.htaccess b/public/.htaccess new file mode 100644 index 00000000..cf675fba --- /dev/null +++ b/public/.htaccess @@ -0,0 +1,8 @@ + + Options -MultiViews + RewriteEngine On + + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^ index.php [L] + \ No newline at end of file diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 00000000..e69de29b diff --git a/public/index.php b/public/index.php new file mode 100644 index 00000000..295c10ec --- /dev/null +++ b/public/index.php @@ -0,0 +1,62 @@ + + */ + +/* +|-------------------------------------------------------------------------- +| 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 applications we have created for them. +| +*/ + +$app->run(); + +/* +|-------------------------------------------------------------------------- +| Shutdown The Application +|-------------------------------------------------------------------------- +| +| Once the app 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(); \ No newline at end of file diff --git a/public/packages/.gitkeep b/public/packages/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 00000000..9e60f970 --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: diff --git a/readme.md b/readme.md new file mode 100644 index 00000000..235f900c --- /dev/null +++ b/readme.md @@ -0,0 +1,21 @@ +## Laravel PHP Framework + +[![Latest Stable Version](https://poser.pugx.org/laravel/framework/version.png)](https://packagist.org/packages/laravel/framework) [![Total Downloads](https://poser.pugx.org/laravel/framework/d/total.png)](https://packagist.org/packages/laravel/framework) [![Build Status](https://travis-ci.org/laravel/framework.png)](https://travis-ci.org/laravel/framework) + +Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as authentication, routing, sessions, and caching. + +Laravel aims to make the development process a pleasing one for the developer without sacrificing application functionality. Happy developers make the best code. To this end, we've attempted to combine the very best of what we have seen in other web frameworks, including frameworks implemented in other languages, such as Ruby on Rails, ASP.NET MVC, and Sinatra. + +Laravel is accessible, yet powerful, providing powerful tools needed for large, robust applications. A superb inversion of control container, expressive migration system, and tightly integrated unit testing support give you the tools you need to build any application with which you are tasked. + +## Official Documentation + +Documentation for the entire framework can be found on the [Laravel website](http://laravel.com/docs). + +### Contributing To Laravel + +**All issues and pull requests should be filed on the [laravel/framework](http://github.com/laravel/framework) repository.** + +### License + +The Laravel framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT) diff --git a/server.php b/server.php new file mode 100644 index 00000000..5f187f34 --- /dev/null +++ b/server.php @@ -0,0 +1,19 @@ +