diff --git a/app/config/app.php b/app/config/app.php index ca18595f..0fcc5c99 100644 --- a/app/config/app.php +++ b/app/config/app.php @@ -15,6 +15,19 @@ return array( 'debug' => 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 @@ -47,8 +60,8 @@ return array( |-------------------------------------------------------------------------- | | This key is used by the Illuminate encrypter service and should be set - | to a random, long string, otherwise these encrypted values will not - | be safe. Make sure to change it before deploying any application! + | to a random, 32 character string, otherwise these encrypted strings + | will not be safe. Please do this before deploying an application! | */ @@ -77,18 +90,21 @@ return array( 'Illuminate\Cookie\CookieServiceProvider', 'Illuminate\Database\DatabaseServiceProvider', 'Illuminate\Encryption\EncryptionServiceProvider', + 'Illuminate\Exception\LiveServiceProvider', '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\Remote\RemoteServiceProvider', 'Illuminate\Auth\Reminders\ReminderServiceProvider', 'Illuminate\Foundation\Providers\RouteListServiceProvider', 'Illuminate\Database\SeedServiceProvider', @@ -135,7 +151,7 @@ return array( 'Cache' => 'Illuminate\Support\Facades\Cache', 'ClassLoader' => 'Illuminate\Support\ClassLoader', 'Config' => 'Illuminate\Support\Facades\Config', - 'Controller' => 'Illuminate\Routing\Controllers\Controller', + 'Controller' => 'Illuminate\Routing\Controller', 'Cookie' => 'Illuminate\Support\Facades\Cookie', 'Crypt' => 'Illuminate\Support\Facades\Crypt', 'DB' => 'Illuminate\Support\Facades\DB', @@ -144,7 +160,7 @@ return array( 'File' => 'Illuminate\Support\Facades\File', 'Form' => 'Illuminate\Support\Facades\Form', 'Hash' => 'Illuminate\Support\Facades\Hash', - 'Html' => 'Illuminate\Support\Facades\Html', + 'HTML' => 'Illuminate\Support\Facades\HTML', 'Input' => 'Illuminate\Support\Facades\Input', 'Lang' => 'Illuminate\Support\Facades\Lang', 'Log' => 'Illuminate\Support\Facades\Log', @@ -160,6 +176,7 @@ return array( 'Schema' => 'Illuminate\Support\Facades\Schema', 'Seeder' => 'Illuminate\Database\Seeder', 'Session' => 'Illuminate\Support\Facades\Session', + 'SSH' => 'Illuminate\Support\Facades\SSH', 'Str' => 'Illuminate\Support\Str', 'URL' => 'Illuminate\Support\Facades\URL', 'Validator' => 'Illuminate\Support\Facades\Validator', diff --git a/app/config/auth.php b/app/config/auth.php index 62ea9c3d..38eb282b 100644 --- a/app/config/auth.php +++ b/app/config/auth.php @@ -52,11 +52,19 @@ return array( | 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', + 'email' => 'emails.auth.reminder', + + 'table' => 'password_reminders', + + 'expire' => 60, ), diff --git a/app/config/database.php b/app/config/database.php index c154f767..f479bf40 100644 --- a/app/config/database.php +++ b/app/config/database.php @@ -111,6 +111,8 @@ return array( 'redis' => array( + 'cluster' => true, + 'default' => array( 'host' => '127.0.0.1', 'port' => 6379, diff --git a/app/config/mail.php b/app/config/mail.php index 7b7dff67..a7151a06 100644 --- a/app/config/mail.php +++ b/app/config/mail.php @@ -11,7 +11,7 @@ return array( | 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" + | Supported: "smtp", "mail", "sendmail" | */ @@ -95,4 +95,30 @@ return array( '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/remote.php b/app/config/remote.php new file mode 100644 index 00000000..29296f3b --- /dev/null +++ b/app/config/remote.php @@ -0,0 +1,57 @@ + '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' => '', + ), + + ), + + /* + |-------------------------------------------------------------------------- + | 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') + + ), + +); \ No newline at end of file diff --git a/app/config/session.php b/app/config/session.php index c4a3a093..549d3ff3 100644 --- a/app/config/session.php +++ b/app/config/session.php @@ -8,15 +8,15 @@ return array( |-------------------------------------------------------------------------- | | This option controls the default session "driver" that will be used on - | requests. By default we will use the light-weight cookie driver but + | requests. By default, we will use the lightweight native driver but | you may specify any of the other wonderful drivers provided here. | - | Supported: "cookie", "file", "database", "apc", + | Supported: "native", "cookie", "database", "apc", | "memcached", "redis", "array" | */ - 'driver' => 'cookie', + 'driver' => 'native', /* |-------------------------------------------------------------------------- @@ -24,7 +24,7 @@ return array( |-------------------------------------------------------------------------- | | Here you may specify the number of minutes that you wish the session - | to be allowed to remain idle for it is expired. If you want them + | to be allowed to remain idle before it expires. If you want them | to immediately expire when the browser closes, set it to zero. | */ @@ -36,7 +36,7 @@ return array( | Session File Location |-------------------------------------------------------------------------- | - | When using the "file" session driver, we need a location where session + | 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. | @@ -122,17 +122,4 @@ return array( 'domain' => null, - /* - |-------------------------------------------------------------------------- - | Session Payload Cookie Name - |-------------------------------------------------------------------------- - | - | When using the "cookie" session driver, you may configure the name of - | the cookie used as the session "payload". This cookie actually has - | the encrypted session data stored within it for the application. - | - */ - - 'payload' => 'laravel_payload', - ); diff --git a/app/config/testing/session.php b/app/config/testing/session.php index 338aebaf..a18c1b9f 100644 --- a/app/config/testing/session.php +++ b/app/config/testing/session.php @@ -8,10 +8,10 @@ return array( |-------------------------------------------------------------------------- | | This option controls the default session "driver" that will be used on - | requets. By default, we will use the light-weight cookie driver but + | requests. By default, we will use the lightweight native driver but | you may specify any of the other wonderful drivers provided here. | - | Supported: "cookie", file", "database", "apc", + | Supported: "native", "cookie", "database", "apc", | "memcached", "redis", "array" | */ diff --git a/app/config/workbench.php b/app/config/workbench.php index 623cd192..56bee526 100644 --- a/app/config/workbench.php +++ b/app/config/workbench.php @@ -22,7 +22,7 @@ return array( | | 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 whwen the package is created by the workbench tool. + | automatically after the package is created by the workbench tool. | */ diff --git a/app/filters.php b/app/filters.php index 2276b4e2..85f82c41 100644 --- a/app/filters.php +++ b/app/filters.php @@ -28,17 +28,33 @@ App::after(function($request, $response) |-------------------------------------------------------------------------- | | The following filters are used to verify that the user of the current -| session is logged into this application. Also, a "guest" filter is -| responsible for performing the opposite. Both provide redirects. +| 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()) return Redirect::route('login'); + if (Auth::guest()) 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('/'); @@ -57,7 +73,7 @@ Route::filter('guest', function() Route::filter('csrf', function() { - if (Session::getToken() != Input::get('_token')) + if (Session::token() != Input::get('_token')) { throw new Illuminate\Session\TokenMismatchException; } diff --git a/app/lang/en/validation.php b/app/lang/en/validation.php index a6107907..5a24a40c 100644 --- a/app/lang/en/validation.php +++ b/app/lang/en/validation.php @@ -13,54 +13,61 @@ return array( | */ - "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.", - "before" => "The :attribute must be a date before :date.", - "between" => array( + "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 - :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.", + "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.", + "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_with" => "The :attribute field is required when :values is 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.", + "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.", + "unique" => "The :attribute has already been taken.", + "url" => "The :attribute format is invalid.", /* |-------------------------------------------------------------------------- diff --git a/app/start/global.php b/app/start/global.php index f85b9bae..7697a6be 100644 --- a/app/start/global.php +++ b/app/start/global.php @@ -53,6 +53,22 @@ 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 maintenace mode is in effect for this application. +| +*/ + +App::down(function() +{ + return Response::make("Be right back!", 503); +}); + /* |-------------------------------------------------------------------------- | Require The Filters File @@ -64,4 +80,4 @@ App::error(function(Exception $exception, $code) | */ -require __DIR__.'/../filters.php'; \ No newline at end of file +require app_path().'/filters.php'; \ No newline at end of file diff --git a/app/start/local.php b/app/start/local.php index adab104c..78ddffeb 100644 --- a/app/start/local.php +++ b/app/start/local.php @@ -1,3 +1,14 @@ client->request('GET', '/'); $this->assertTrue($this->client->getResponse()->isOk()); - - $this->assertCount(1, $crawler->filter('h1:contains("Hello World!")')); } } \ No newline at end of file diff --git a/app/views/hello.php b/app/views/hello.php index ba7c290e..065a0a8a 100644 --- a/app/views/hello.php +++ b/app/views/hello.php @@ -1 +1,52 @@ -

Hello World!

\ No newline at end of file + + + + + Laravel PHP Framework + + + +
+ +

You have arrived.

+
+ + diff --git a/artisan b/artisan old mode 100644 new mode 100755 diff --git a/bootstrap/autoload.php b/bootstrap/autoload.php index 626612a2..6b329312 100644 --- a/bootstrap/autoload.php +++ b/bootstrap/autoload.php @@ -32,6 +32,19 @@ 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 diff --git a/bootstrap/start.php b/bootstrap/start.php index f418a138..9848f9bc 100644 --- a/bootstrap/start.php +++ b/bootstrap/start.php @@ -13,6 +13,8 @@ $app = new Illuminate\Foundation\Application; +$app->redirectIfTrailingSlash(); + /* |-------------------------------------------------------------------------- | Detect The Application Environment @@ -54,7 +56,7 @@ $app->bindInstallPaths(require __DIR__.'/paths.php'); | */ -$framework = __DIR__.'/../vendor/laravel/framework/src'; +$framework = $app['path.base'].'/vendor/laravel/framework/src'; require $framework.'/Illuminate/Foundation/start.php'; diff --git a/composer.json b/composer.json index ae7555e9..5eb4b801 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,10 @@ { + "name": "laravel/laravel", + "description": "The Laravel Framework.", + "keywords": ["framework", "laravel"], + "license": "MIT", "require": { - "laravel/framework": "4.0.*" + "laravel/framework": "4.1.*" }, "autoload": { "classmap": [ @@ -13,7 +17,21 @@ ] }, "scripts": { - "post-update-cmd": "php artisan optimize" + "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/public/.htaccess b/public/.htaccess index 969cfdab..cf675fba 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -1,6 +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/index.php b/public/index.php index cf7f302f..295c10ec 100644 --- a/public/index.php +++ b/public/index.php @@ -26,7 +26,7 @@ require __DIR__.'/../bootstrap/autoload.php'; |-------------------------------------------------------------------------- | | We need to illuminate PHP development, so let's turn on the lights. -| This bootstrap the framework and gets it ready for use, then it +| 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. | @@ -53,7 +53,7 @@ $app->run(); | Shutdown The Application |-------------------------------------------------------------------------- | -| Once the app has finished running. We will fire off the shutdown events +| 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. | diff --git a/public/robots.txt b/public/robots.txt index 4206b878..9e60f970 100644 --- a/public/robots.txt +++ b/public/robots.txt @@ -1 +1,2 @@ -User-agent: * Allow: / \ No newline at end of file +User-agent: * +Disallow: diff --git a/readme.md b/readme.md index 45bd6324..235f900c 100644 --- a/readme.md +++ b/readme.md @@ -1,8 +1,16 @@ -## Laravel 4.x +## Laravel PHP Framework -### A Framework For Web Artisans +[![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) -[Official Documentation](http://four.laravel.com) (Under Active Development) +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 @@ -10,4 +18,4 @@ ### License -The Laravel framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT) \ No newline at end of file +The Laravel framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)