Browse Source

Merge branch 'develop' into staging

Taylor Otwell 12 years ago
parent
commit
d667a15e05
100 changed files with 1658 additions and 314 deletions
  1. 18 5
      application/config/application.php
  2. 1 1
      application/config/cache.php
  3. 3 2
      application/config/database.php
  4. 2 2
      application/config/error.php
  5. 1 1
      application/config/session.php
  6. 1 1
      application/config/strings.php
  7. 19 0
      application/language/fr/pagination.php
  8. 99 0
      application/language/fr/validation.php
  9. 19 0
      application/language/hu/pagination.php
  10. 99 0
      application/language/hu/validation.php
  11. 19 0
      application/language/id/pagination.php
  12. 99 0
      application/language/id/validation.php
  13. 31 0
      application/language/ja/pagination.php
  14. 142 0
      application/language/ja/validation.php
  15. 19 0
      application/language/nl/pagination.php
  16. 90 0
      application/language/nl/validation.php
  17. 2 2
      bundles/docs/routes.php
  18. 5 5
      bundles/docs/views/template.blade.php
  19. 2 2
      laravel/auth/drivers/driver.php
  20. 13 6
      laravel/auth/drivers/eloquent.php
  21. 17 10
      laravel/auth/drivers/fluent.php
  22. 3 3
      laravel/autoloader.php
  23. 76 50
      laravel/blade.php
  24. 7 7
      laravel/bundle.php
  25. 1 1
      laravel/cli/artisan.php
  26. 2 2
      laravel/cli/command.php
  27. 12 0
      laravel/cli/dependencies.php
  28. 2 2
      laravel/cli/tasks/bundle/bundler.php
  29. 2 2
      laravel/cli/tasks/bundle/providers/provider.php
  30. 78 0
      laravel/cli/tasks/help.json
  31. 35 0
      laravel/cli/tasks/help.php
  32. 1 1
      laravel/cli/tasks/migrate/database.php
  33. 3 3
      laravel/cli/tasks/migrate/migrator.php
  34. 1 1
      laravel/cli/tasks/test/runner.php
  35. 2 2
      laravel/config.php
  36. 3 3
      laravel/cookie.php
  37. 3 3
      laravel/core.php
  38. 1 0
      laravel/database.php
  39. 4 4
      laravel/database/connection.php
  40. 7 0
      laravel/database/connectors/postgres.php
  41. 10 15
      laravel/database/eloquent/model.php
  42. 16 15
      laravel/database/eloquent/query.php
  43. 2 2
      laravel/database/eloquent/relationships/has_many_and_belongs_to.php
  44. 2 2
      laravel/database/grammar.php
  45. 12 12
      laravel/database/query.php
  46. 10 10
      laravel/database/query/grammars/grammar.php
  47. 1 1
      laravel/database/query/grammars/postgres.php
  48. 1 1
      laravel/database/query/grammars/sqlserver.php
  49. 21 2
      laravel/database/schema.php
  50. 15 0
      laravel/database/schema/grammars/grammar.php
  51. 17 5
      laravel/database/schema/grammars/mysql.php
  52. 18 6
      laravel/database/schema/grammars/postgres.php
  53. 20 8
      laravel/database/schema/grammars/sqlite.php
  54. 19 7
      laravel/database/schema/grammars/sqlserver.php
  55. 11 0
      laravel/database/schema/table.php
  56. 8 0
      laravel/documentation/artisan/commands.md
  57. 1 1
      laravel/documentation/bundles.md
  58. 1 0
      laravel/documentation/changes.md
  59. 9 2
      laravel/documentation/contents.md
  60. 127 0
      laravel/documentation/contrib/command-line.md
  61. 35 0
      laravel/documentation/contrib/github.md
  62. 113 0
      laravel/documentation/contrib/tortoisegit.md
  63. 1 1
      laravel/documentation/controllers.md
  64. 25 1
      laravel/documentation/database/config.md
  65. 28 6
      laravel/documentation/database/eloquent.md
  66. 1 1
      laravel/documentation/database/fluent.md
  67. 2 1
      laravel/documentation/database/schema.md
  68. 9 1
      laravel/documentation/files.md
  69. 1 1
      laravel/documentation/ioc.md
  70. 1 1
      laravel/documentation/localization.md
  71. 1 1
      laravel/documentation/logging.md
  72. 1 1
      laravel/documentation/requests.md
  73. 3 3
      laravel/documentation/routing.md
  74. 2 2
      laravel/documentation/validation.md
  75. 3 3
      laravel/documentation/views/home.md
  76. 1 1
      laravel/documentation/views/html.md
  77. 20 16
      laravel/documentation/views/pagination.md
  78. 16 7
      laravel/documentation/views/templating.md
  79. 2 2
      laravel/error.php
  80. 1 1
      laravel/event.php
  81. 4 4
      laravel/file.php
  82. 17 2
      laravel/helpers.php
  83. 17 15
      laravel/html.php
  84. 4 4
      laravel/ioc.php
  85. 1 1
      laravel/lang.php
  86. 43 5
      laravel/laravel.php
  87. 2 2
      laravel/log.php
  88. 1 1
      laravel/memcached.php
  89. 1 1
      laravel/paginator.php
  90. 3 3
      laravel/pluralizer.php
  91. 7 1
      laravel/profiling/profiler.php
  92. 2 0
      laravel/profiling/template.blade.php
  93. 1 1
      laravel/redis.php
  94. 10 0
      laravel/request.php
  95. 2 2
      laravel/response.php
  96. 1 1
      laravel/routing/filter.php
  97. 4 4
      laravel/routing/route.php
  98. 5 5
      laravel/routing/router.php
  99. 1 1
      laravel/session.php
  100. 1 1
      laravel/session/drivers/database.php

+ 18 - 5
application/config/application.php

@@ -8,7 +8,7 @@ return array(
 	|--------------------------------------------------------------------------
 	|
 	| The URL used to access your application without a trailing slash. The URL
-	| does not have to be set. If it isn't we'll try our best to guess the URL
+	| does not have to be set. If it isn't, we'll try our best to guess the URL
 	| of your application.
 	|
 	*/
@@ -48,7 +48,7 @@ return array(
 	|
 	| This key is used by the encryption and cookie classes to generate secure
 	| encrypted strings and hashes. It is extremely important that this key
-	| remain secret and should not be shared with anyone. Make it about 32
+	| remains secret and it should not be shared with anyone. Make it about 32
 	| characters of random gibberish.
 	|
 	*/
@@ -63,7 +63,7 @@ return array(
 	| Laravel includes a beautiful profiler toolbar that gives you a heads
 	| up display of the queries and logs performed by your application.
 	| This is wonderful for development, but, of course, you should
-	| disable the toolbar for production applications..
+	| disable the toolbar for production applications.
 	|
 	*/
 
@@ -84,7 +84,7 @@ return array(
 
 	/*
 	|--------------------------------------------------------------------------
-	| Application Language
+	| Default Application Language
 	|--------------------------------------------------------------------------
 	|
 	| The default language of your application. This language will be used by
@@ -94,12 +94,25 @@ return array(
 
 	'language' => 'en',
 
+	/*
+	|--------------------------------------------------------------------------
+	| Supported Languages
+	|--------------------------------------------------------------------------
+	|
+	| These languages may also be supported by your application. If a request
+	| enters your application with a URI beginning with one of these values
+	| the default language will automatically be set to that language.
+	|
+	*/
+
+	'languages' => array(),
+
 	/*
 	|--------------------------------------------------------------------------
 	| SSL Link Generation
 	|--------------------------------------------------------------------------
 	|
-	| Many sites use SSL to protect their users data. However, you may not be
+	| Many sites use SSL to protect their users' data. However, you may not be
 	| able to use SSL on your development machine, meaning all HTTPS will be
 	| broken during development.
 	|

+ 1 - 1
application/config/cache.php

@@ -29,7 +29,7 @@ return array(
 	| This key will be prepended to item keys stored using Memcached and APC
 	| to prevent collisions with other applications on the server. Since the
 	| memory based stores could be shared by other applications, we need to
-	| be polite and use a prefix to uniquely identifier our items.
+	| be polite and use a prefix to uniquely identify our items.
 	|
 	*/
 

+ 3 - 2
application/config/database.php

@@ -35,7 +35,7 @@ return array(
 	| Default Database Connection
 	|--------------------------------------------------------------------------
 	|
-	| The name of your default database connection. This connection will used
+	| The name of your default database connection. This connection will be used
 	| as the default for all database operations unless a different name is
 	| given when performing said operation. This connection name should be
 	| listed in the array of connections below.
@@ -54,7 +54,7 @@ return array(
 	| the freedom to specify as many connections as you can handle.
 	|
 	| All database work in Laravel is done through the PHP's PDO facilities,
-	| so make sure you have the PDO drivers for your particlar database of
+	| so make sure you have the PDO drivers for your particular database of
 	| choice installed on your machine.
 	|
 	*/
@@ -85,6 +85,7 @@ return array(
 			'password' => '',
 			'charset'  => 'utf8',
 			'prefix'   => '',
+            'schema'   => 'public',
 		),
 
 		'sqlsrv' => array(

+ 2 - 2
application/config/error.php

@@ -9,7 +9,7 @@ return array(
 	|
 	| Here you simply specify the error levels that should be ignored by the
 	| Laravel error handler. These levels will still be logged; however, no
-	| information about about them will be displayed.
+	| information about them will be displayed.
 	|
 	*/
 
@@ -56,7 +56,7 @@ return array(
 	| logging is enabled. 
 	|
 	| You may log the error message however you like; however, a simple log
-	| solution has been setup for you which will log all error messages to
+	| solution has been set up for you which will log all error messages to
 	| text files within the application storage directory.
 	|
 	*/

+ 1 - 1
application/config/session.php

@@ -23,7 +23,7 @@ return array(
 	| Session Database
 	|--------------------------------------------------------------------------
 	|
-	| The database table on which the session should be stored. It probably
+	| The database table in which the session should be stored. It probably
 	| goes without saying that this option only matters if you are using
 	| the super slick database session driver.
 	|

+ 1 - 1
application/config/strings.php

@@ -8,7 +8,7 @@ return array(
 	|--------------------------------------------------------------------------
 	|
 	| This array contains the singular and plural forms of words. It's used by
-	| the "singular" and "plural" methods on the Str class to convert a given
+	| the "singular" and "plural" methods in the Str class to convert a given
 	| word from singular to plural and vice versa.
 	|
 	| Note that the regular expressions are only for inflecting English words.

+ 19 - 0
application/language/fr/pagination.php

@@ -0,0 +1,19 @@
+<?php 
+
+return array(
+
+	/*
+	|--------------------------------------------------------------------------
+	| Pagination Language Lines
+	|--------------------------------------------------------------------------
+	|
+	| The following language lines are used by the paginator library to build
+	| the pagination links. You're free to change them to anything you want.
+	| If you come up with something more exciting, let us know.
+	|
+	*/
+
+	'previous' => '&laquo; Prรฉcรฉdent',
+	'next'     => 'Suivant &raquo;',
+
+);

+ 99 - 0
application/language/fr/validation.php

@@ -0,0 +1,99 @@
+<?php 
+
+return array(
+
+	/*
+	|--------------------------------------------------------------------------
+	| Validation Language Lines
+	|--------------------------------------------------------------------------
+	|
+	| The following language lines contain the default error messages used
+	| by the validator class. Some of the rules contain multiple versions,
+	| such as the size (max, min, between) rules. These versions are used
+	| for different input types such as strings and files.
+	|
+	| These language lines may be easily changed to provide custom error
+	| messages in your application. Error messages for custom validation
+	| rules may also be added to this file.
+	|
+	*/
+
+	"accepted"       => "Le champ :attribute doit รชtre acceptรฉ.",
+	"active_url"     => "Le champ :attribute n'est pas une URL valide.",
+	"after"          => "Le champ :attribute doit รชtre une date aprรจs :date.",
+	"alpha"          => "Le champ :attribute ne doit contenir que des lettres.",
+	"alpha_dash"     => "Le champ :attribute ne doit contenir que des lettres, nombres et des tirets.",
+	"alpha_num"      => "Le champ :attribute ne doit contenir que des lettres et nombres.",
+	"before"         => "Le champ :attribute doit รชtre une date avant :date.",
+	"between"        => array(
+		"numeric" => "Le champ :attribute doit รชtre entre :min - :max.",
+		"file"    => "Le champ :attribute doit รชtre entre :min - :max kilo-octets.",
+		"string"  => "Le champ :attribute doit รชtre entre :min - :max caractรจres.",
+	),
+	"confirmed"      => "Le champ :attribute confirmation est diffรฉrent.",
+	"different"      => "Les champ :attribute et :other doivent รชtre diffรฉrents.",
+	"email"          => "Le format du champ :attribute est invalide.",
+	"exists"         => "Le champ sรฉlectionnรฉ :attribute est invalide.",
+	"image"          => "Le champ :attribute doit รชtre une image.",
+	"in"             => "Le champ sรฉlectionnรฉ :attribute est invalide.",
+	"integer"        => "Le champ :attribute doit รชtre un entier.",
+	"ip"             => "Le champ :attribute doit รชtre une adresse IP valide.",
+	"match"          => "Le format du champ :attribute est invalide.",
+	"max"            => array(
+		"numeric" => "Le :attribute doit รชtre plus petit que :max.",
+		"file"    => "Le :attribute doit รชtre plus petit que :max kilo-octets.",
+		"string"  => "Le :attribute doit รชtre plus petit que :max caractรจres.",
+	),
+	"mimes"          => "Le champ :attribute doit รชtre un fichier de type: :values.",
+	"min"            => array(
+		"numeric" => "Le champ :attribute doit รชtre au moins :min.",
+		"file"    => "Le champ :attribute doit รชtre au moins :min kilo-octets.",
+		"string"  => "Le champ :attribute doit รชtre au moins :min caractรจres.",
+	),
+	"not_in"         => "Le champ sรฉlectionnรฉ :attribute est invalide.",
+	"numeric"        => "Le champ :attribute doit รชtre un nombre.",
+	"required"       => "Le champ :attribute est requis",
+	"same"           => "Le champ :attribute et :other doivent รชtre identique.",
+	"size"           => array(
+		"numeric" => "Le champ :attribute doit รชtre :size.",
+		"file"    => "Le champ :attribute doit รชtre de :size kilo-octets.",
+		"string"  => "Le champ :attribute doit รชtre de :size caractรจres.",
+	),
+	"unique"         => "Le champ :attribute est dรฉjร  utilisรฉ.",
+	"url"            => "Le champ :attribute ร  un format invalide.",
+
+	/*
+	|--------------------------------------------------------------------------
+	| Custom Validation Language Lines
+	|--------------------------------------------------------------------------
+	|
+	| Here you may specify custom validation messages for attributes using the
+	| convention "attribute_rule" to name the lines. This helps keep your
+	| custom validation clean and tidy.
+	|
+	| So, say you want to use a custom validation message when validating that
+	| the "email" attribute is unique. Just add "email_unique" to this array
+	| with your custom message. The Validator will handle the rest!
+	|
+	*/
+
+	'custom' => array(),
+
+	/*
+	|--------------------------------------------------------------------------
+	| 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". Your users will thank you.
+	|
+	| The Validator class will automatically search this array of lines it
+	| is attempting to replace the :attribute place-holder in messages.
+	| It's pretty slick. We think you'll like it.
+	|
+	*/
+
+	'attributes' => array(),
+
+);

+ 19 - 0
application/language/hu/pagination.php

@@ -0,0 +1,19 @@
+<?php
+
+return array(
+
+	/*
+	|--------------------------------------------------------------------------
+	| Pagination Language Lines
+	|--------------------------------------------------------------------------
+	|
+	| The following language lines are used by the paginator library to build
+	| the pagination links. You're free to change them to anything you want.
+	| If you come up with something more exciting, let us know.
+	|
+	*/
+
+	'previous' => '&laquo; Elล‘zล‘',
+	'next'     => 'Kรถvetkezล‘ &raquo;',
+
+);

+ 99 - 0
application/language/hu/validation.php

@@ -0,0 +1,99 @@
+<?php
+
+return array(
+
+	/*
+	|--------------------------------------------------------------------------
+	| Validation Language Lines
+	|--------------------------------------------------------------------------
+	|
+	| The following language lines contain the default error messages used
+	| by the validator class. Some of the rules contain multiple versions,
+	| such as the size (max, min, between) rules. These versions are used
+	| for different input types such as strings and files.
+	|
+	| These language lines may be easily changed to provide custom error
+	| messages in your application. Error messages for custom validation
+	| rules may also be added to this file.
+	|
+	*/
+
+	"accepted"       => "A(z) :attribute el kell legyen fogadva.",
+	"active_url"     => "A :attribute nem valรณs URL.",
+	"after"          => "A :attribute :date utรกni dรกtum kell legyen.",
+	"alpha"          => "A(z) :attribute csak betลฑket tartalmazhat.",
+	"alpha_dash"     => "A(z) :attribute betลฑket, szรกmokat รฉs kรถtล‘jeleket tartalmazhat.",
+	"alpha_num"      => "A(z) :attribute csak betลฑket รฉs szรกmokat tartalmazhat.",
+	"before"         => "A :attribute :date elล‘tti dรกtum kell legyen.",
+	"between"        => array(
+		"numeric" => "A(z) :attribute :min - :max kรถzรถtti รฉrtรฉk kell legyen.",
+		"file"    => "A(z) :attribute :min - :max kilobyte kรถzรถtt kell legyen.",
+		"string"  => "A(z) :attribute :min - :max karakterhossz kรถzรถtt kell legyen",
+	),
+	"confirmed"      => "A(z) :attribute megerล‘sรญtรฉse nem egyezett meg.",
+	"different"      => "A(z) :attribute รฉs :other kรผlรถnbรถzล‘ kell legyen.",
+	"email"          => "A(z) :attribute formรกtuma nem megfelelล‘.",
+	"exists"         => "A(z) vรกlasztott :attribute nem megfelelล‘.",
+	"image"          => "A(z) :attribute kรฉp kell legyen.",
+	"in"             => "A(z) vรกlasztott :attribute nem megfelelล‘.",
+	"integer"        => "A :attribute szรกm kell legyen.",
+	"ip"             => "A :attribute valรณs IP cรญm kell legyen.",
+	"match"          => "A(z) :attribute formรกtuma nem megfelelล‘.",
+	"max"            => array(
+		"numeric" => "A :attribute kevesebb kell legyen, mint :max.",
+		"file"    => "A :attribute kevesebb kell legyen :max kilobytenรกl.",
+		"string"  => "A :attribute kevesebb karakterbล‘l kell รกlljon, mint :max.",
+	),
+	"mimes"          => "A :attribute az alรกbbi tipusokbรณl valรณ kell legyen :values.",
+	"min"            => array(
+		"numeric" => "A :attribute legalรกbb :min kell legyen.",
+		"file"    => "A :attribute legalรกbb :min kilobyte kell legyen.",
+		"string"  => "A :attribute legalรกbb :min karakter hosszรบ kell legyen.",
+	),
+	"not_in"         => "A vรกlasztott :attribute nem megfelelล‘.",
+	"numeric"        => "A :attribute szรกm kell legyen.",
+	"required"       => "A(z) :attribute megadรกsa kรถtelezล‘.",
+	"same"           => "A :attribute รฉs a :other muszรกj hogy megegyezzen.",
+	"size"           => array(
+		"numeric" => "A(z) :attribute :size kell legyen.",
+		"file"    => "A(z) :attribute :size kilobyteos kell legyen.",
+		"string"  => "A(z) :attribute :size karakteres kell legyen.",
+	),
+	"unique"         => "A(z) :attribute mรกr foglalt.",
+	"url"            => "A(z) :attribute formรกtuma nem megfelelล‘.",
+
+	/*
+	|--------------------------------------------------------------------------
+	| Custom Validation Language Lines
+	|--------------------------------------------------------------------------
+	|
+	| Here you may specify custom validation messages for attributes using the
+	| convention "attribute_rule" to name the lines. This helps keep your
+	| custom validation clean and tidy.
+	|
+	| So, say you want to use a custom validation message when validating that
+	| the "email" attribute is unique. Just add "email_unique" to this array
+	| with your custom message. The Validator will handle the rest!
+	|
+	*/
+
+	'custom' => array(),
+
+	/*
+	|--------------------------------------------------------------------------
+	| 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". Your users will thank you.
+	|
+	| The Validator class will automatically search this array of lines it
+	| is attempting to replace the :attribute place-holder in messages.
+	| It's pretty slick. We think you'll like it.
+	|
+	*/
+
+	'attributes' => array(),
+
+);

+ 19 - 0
application/language/id/pagination.php

@@ -0,0 +1,19 @@
+<?php 
+
+return array(
+
+	/*
+	|--------------------------------------------------------------------------
+	| Pagination Language Lines
+	|--------------------------------------------------------------------------
+	|
+	| The following language lines are used by the paginator library to build
+	| the pagination links. You're free to change them to anything you want.
+	| If you come up with something more exciting, let us know.
+	|
+	*/
+
+	'previous' => '&laquo; Sebelumnya',
+	'next'     => 'Selanjutnya &raquo;',
+
+);

+ 99 - 0
application/language/id/validation.php

@@ -0,0 +1,99 @@
+<?php 
+
+return array(
+
+	/*
+	|--------------------------------------------------------------------------
+	| Validation Language Lines
+	|--------------------------------------------------------------------------
+	|
+	| The following language lines contain the default error messages used
+	| by the validator class. Some of the rules contain multiple versions,
+	| such as the size (max, min, between) rules. These versions are used
+	| for different input types such as strings and files.
+	|
+	| These language lines may be easily changed to provide custom error
+	| messages in your application. Error messages for custom validation
+	| rules may also be added to this file.
+	|
+	*/
+
+	"accepted"       => "Isian :attribute harus diterima.",
+	"active_url"     => "Isian :attribute bukan URL yang valid.",
+	"after"          => "Isian :attribute harus tanggal setelah :date.",
+	"alpha"          => "Isian :attribute hanya boleh berisi huruf.",
+	"alpha_dash"     => "Isian :attribute hanya boleh berisi huruf, angka, dan strip.",
+	"alpha_num"      => "Isian :attribute hanya boleh berisi huruf dan angka.",
+	"before"         => "Isian :attribute harus tanggal sebelum :date.",
+	"between"        => array(
+		"numeric" => "Isian :attribute harus antara :min - :max.",
+		"file"    => "Isian :attribute harus antara :min - :max kilobytes.",
+		"string"  => "Isian :attribute harus antara  :min - :max karakter.",
+	),
+	"confirmed"      => "Konfirmasi :attribute tidak cocok.",
+	"different"      => "Isian :attribute dan :other harus berbeda.",
+	"email"          => "Format isian :attribute tidak valid.",
+	"exists"         => "Isian :attribute yang dipilih tidak valid.",
+	"image"          => ":attribute harus berupa gambar.",
+	"in"             => "Isian :attribute yang dipilih tidak valid.",
+	"integer"        => "Isian :attribute harus merupakan bilangan.",
+	"ip"             => "Isian :attribute harus alamat IP yang valid.",
+	"match"          => "Format isian :attribute tidak valid.",
+	"max"            => array(
+		"numeric" => "Isian :attribute harus kurang dari :max.",
+		"file"    => "Isian :attribute harus kurang dari :max kilobytes.",
+		"string"  => "Isian :attribute harus kurang dari :max karakter.",
+	),
+	"mimes"          => "Isian :attribute harus dokumen berjenis : :values.",
+	"min"            => array(
+		"numeric" => "Isian :attribute harus minimal :min.",
+		"file"    => "Isian :attribute harus minimal :min kilobytes.",
+		"string"  => "Isian :attribute harus minimal :min karakter.",
+	),
+	"not_in"         => "Isian :attribute yang dipilih tidak valid.",
+	"numeric"        => "Isian :attribute harus berupa angka.",
+	"required"       => "Isian :attribute wajib diisi.",
+	"same"           => "Isian :attribute dan :other harus sama.",
+	"size"           => array(
+		"numeric" => "Isian :attribute harus berukuran :size.",
+		"file"    => "Isian :attribute harus berukuran :size kilobyte.",
+		"string"  => "Isian :attribute harus berukuran :size karakter.",
+	),
+	"unique"         => "Isian :attribute sudah ada sebelumnya.",
+	"url"            => "Format isian :attribute tidak valid.",
+
+	/*
+	|--------------------------------------------------------------------------
+	| Custom Validation Language Lines
+	|--------------------------------------------------------------------------
+	|
+	| Here you may specify custom validation messages for attributes using the
+	| convention "attribute_rule" to name the lines. This helps keep your
+	| custom validation clean and tidy.
+	|
+	| So, say you want to use a custom validation message when validating that
+	| the "email" attribute is unique. Just add "email_unique" to this array
+	| with your custom message. The Validator will handle the rest!
+	|
+	*/
+
+	'custom' => array(),
+
+	/*
+	|--------------------------------------------------------------------------
+	| 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". Your users will thank you.
+	|
+	| The Validator class will automatically search this array of lines it
+	| is attempting to replace the :attribute place-holder in messages.
+	| It's pretty slick. We think you'll like it.
+	|
+	*/
+
+	'attributes' => array(),
+
+);

+ 31 - 0
application/language/ja/pagination.php

@@ -0,0 +1,31 @@
+<?php
+
+return array(
+
+	/*
+	|--------------------------------------------------------------------------
+	| Pagination Language Lines
+	|--------------------------------------------------------------------------
+	|
+	| The following language lines are used by the paginator library to build
+	| the pagination links. You're free to change them to anything you want.
+	| If you come up with something more exciting, let us know.
+	|
+	*/
+
+	/*
+	|--------------------------------------------------------------------------
+	| ใƒšใ‚ฎใƒใƒผใ‚ทใƒงใƒณ่จ€่ชžใƒฉใ‚คใƒณ
+	|--------------------------------------------------------------------------
+	|
+	| ไปฅไธ‹ใฎ่จ€่ชž่จญๅฎš่กŒใฏpaginatorใƒฉใ‚คใƒ–ใƒฉใƒชใƒผใซใ‚ˆใ‚Šใ€ใƒšใ‚ฎใƒใƒผใ‚ทใƒงใƒณใƒชใƒณใ‚ฏใ‚’ไฝœๆˆใ™ใ‚‹ใŸใ‚
+	| ไฝฟ็”จใ•ใ‚Œใพใ™ใ€‚ใŠๅฅฝใใชใ‚ˆใ†ใซๅค‰ๆ›ดใ—ใฆใใ ใ•ใ„ใ€‚
+	| ใ‚‚ใฃใจใ‚จใ‚ญใ‚ตใ‚คใƒˆใ™ใ‚‹ใ‚ขใ‚คใƒ‡ใ‚ขใŒๆ€ใ„ๆตฎใ‹ใ‚“ใ ใ‚‰ใ€็ง้”ใซๆ•™ใˆใฆไธ‹ใ•ใ„ใ€‚
+	|
+	*/
+
+
+	'previous' => '&laquo; ๅ‰',
+	'next'     => 'ๆฌก &raquo;',
+
+);

+ 142 - 0
application/language/ja/validation.php

@@ -0,0 +1,142 @@
+<?php
+
+return array(
+
+	/*
+	|--------------------------------------------------------------------------
+	| Validation Language Lines
+	|--------------------------------------------------------------------------
+	|
+	| The following language lines contain the default error messages used
+	| by the validator class. Some of the rules contain multiple versions,
+	| such as the size (max, min, between) rules. These versions are used
+	| for different input types such as strings and files.
+	|
+	| These language lines may be easily changed to provide custom error
+	| messages in your application. Error messages for custom validation
+	| rules may also be added to this file.
+	|
+	*/
+
+	/*
+	|--------------------------------------------------------------------------
+	| ใƒใƒชใƒ‡ใƒผใ‚ทใƒงใƒณ่จ€่ชž่จญๅฎš
+	|--------------------------------------------------------------------------
+	|
+	| ไปฅไธ‹ใฎ่จ€่ชž่จญๅฎšใฏvalidatorใ‚ฏใƒฉใ‚นใงไฝฟ็”จใ—ใฆใ„ใ‚‹ใƒ‡ใƒ•ใ‚ฉใƒซใƒˆใฎใ‚จใƒฉใƒผใƒกใƒƒใ‚ปใƒผใ‚ธใ‚’ๆง‹ๆˆใ—ใฆใ„ใพใ™ใ€‚
+	| ๅนพใคใ‹ใฎใƒซใƒผใƒซใฏ่ค‡ๆ•ฐใฎ่จญๅฎšใ‚’ๆŒใฃใฆใ„ใพใ™ใ€‚ไพ‹ใˆใฐใ‚ตใ‚คใ‚บ(max,min,between)ใƒซใƒผใƒซใงใ™ใ€‚
+	| ๏ผˆ่จณๆณจ๏ผš(numeric, file, string)ใฎ้–“้•ใ„ใจๆ€ใ‚ใ‚Œใ‚‹ใ€‚
+	| ใ“ใ‚Œใ‚‰ใฎ่จญๅฎšใฏใ€ๆ–‡ๅญ—ๅˆ—ใ‚„ใƒ•ใ‚กใ‚คใƒซใฎใ‚ˆใ†ใซๅ…ฅๅŠ›ใฎใ‚ฟใ‚คใƒ—ใฎ้•ใ„ใซใ‚ˆใ‚Šใ€ไฝฟใ„ๅˆ†ใ‘ใ‚‰ใ‚Œใพใ™ใ€‚
+	|
+	| ใ“ใ‚Œใ‚‰ใฎ่จ€่ชž่จญๅฎšใฏใ‚ใชใŸใฎใ‚ขใƒ—ใƒชใ‚ฑใƒผใ‚ทใƒงใƒณใงใ‚ซใ‚นใ‚ฟใƒ ใ‚จใƒฉใƒผใƒกใƒƒใ‚ปใƒผใ‚ธใจใ—ใฆ่กจ็คบใ™ใ‚‹ใŸใ‚
+	| ๆฐ—่ปฝใซๅค‰ๆ›ดใ—ใฆใใ ใ•ใ„ใ€‚ใ‚ซใ‚นใ‚ฟใƒ ใƒใƒชใƒ‡ใƒผใ‚ทใƒงใƒณใƒซใƒผใƒซใฎใŸใ‚ใฎใ‚จใƒฉใƒผใƒกใƒƒใ‚ปใƒผใ‚ธใ‚‚ใ€
+	| ๅŒๆง˜ใซใ“ใฎใƒ•ใ‚กใ‚คใƒซใซ่ฟฝๅŠ ใ—ใฆใ„ใŸใ ใ‘ใพใ™ใ€‚
+	|
+	*/
+
+	"accepted"       => ":attributeใ‚’ๆ‰ฟ่ชใ—ใฆใใ ใ•ใ„ใ€‚",
+	"active_url"     => ":attributeใŒๆœ‰ๅŠนใชURLใงใฏใ‚ใ‚Šใพใ›ใ‚“ใ€‚",
+	"after"          => ":attributeใซใฏใ€:dateไปฅ้™ใฎๆ—ฅไป˜ใ‚’ๆŒ‡ๅฎšใ—ใฆใใ ใ•ใ„ใ€‚",
+	"alpha"          => ":attributeใฏใ‚ขใƒซใƒ•ใ‚กใƒ™ใƒƒใƒ‰ใฎใฟใŒใ”ๅˆฉ็”จใงใใพใ™ใ€‚",
+	"alpha_dash"     => ":attributeใฏ่‹ฑๆ•ฐๅญ—ใจใƒ€ใƒƒใ‚ทใƒฅ(-)ๅŠใณไธ‹็ทš(_)ใŒใ”ๅˆฉ็”จใงใใพใ™ใ€‚",
+	"alpha_num"      => ":attributeใฏ่‹ฑๆ•ฐๅญ—ใŒใ”ๅˆฉ็”จใงใใพใ™ใ€‚",
+	"before"         => ":attributeใซใฏใ€:dateไปฅๅ‰ใฎๆ—ฅไป˜ใ‚’ใ”ๅˆฉ็”จใใ ใ•ใ„ใ€‚",
+	"between"        => array(
+		"numeric" => ":attributeใฏใ€:minใ‹ใ‚‰ใ€:maxใพใงใฎๆ•ฐๅญ—ใ‚’ใ”ๆŒ‡ๅฎšใใ ใ•ใ„ใ€‚",
+		"file"    => ":attributeใซใฏใ€:min kBใ‹ใ‚‰:max kBใพใงใฎใ‚ตใ‚คใ‚บใฎใƒ•ใ‚กใ‚คใƒซใ‚’ใ”ๆŒ‡ๅฎšใใ ใ•ใ„ใ€‚",
+		"string"  => ":attributeใฏใ€:minๆ–‡ๅญ—ใ‹ใ‚‰:maxๆ–‡ๅญ—ใฎ้–“ใงใ”ๆŒ‡ๅฎšใใ ใ•ใ„ใ€‚",
+	),
+	"confirmed"      => ":attributeใจใ€็ขบ่ชใƒ•ใ‚ฃใƒผใƒซใƒ‰ใจใŒใ€ไธ€่‡ดใ—ใฆใ„ใพใ›ใ‚“ใ€‚",
+	"different"      => ":attributeใจ:otherใซใฏใ€็•ฐใชใฃใŸๅ†…ๅฎนใ‚’ๆŒ‡ๅฎšใ—ใฆใใ ใ•ใ„ใ€‚",
+	"email"          => ":attributeใซใฏๆญฃใ—ใ„ใƒกใƒผใƒซใ‚ขใƒ‰ใƒฌใ‚นใฎๅฝขๅผใ‚’ใ”ๆŒ‡ๅฎšใใ ใ•ใ„ใ€‚",
+	"exists"         => "้ธๆŠžใ•ใ‚ŒใŸ:attributeใฏๆญฃใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚",
+	"image"          => ":attributeใซใฏ็”ปๅƒใƒ•ใ‚กใ‚คใƒซใ‚’ๆŒ‡ๅฎšใ—ใฆใใ ใ•ใ„ใ€‚",
+	"in"             => "้ธๆŠžใ•ใ‚ŒใŸ:attributeใฏๆญฃใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚",
+	"integer"        => ":attributeใฏๆ•ดๆ•ฐใงใ”ๆŒ‡ๅฎšใใ ใ•ใ„ใ€‚",
+	"ip"             => ":attributeใซใฏใ€ๆœ‰ๅŠนใชIPใ‚ขใƒ‰ใƒฌใ‚นใ‚’ใ”ๆŒ‡ๅฎšใใ ใ•ใ„ใ€‚",
+	"match"          => ":attributeใฎๅ…ฅๅŠ›ใƒ•ใ‚ฉใƒผใƒžใƒƒใƒˆใŒ้–“้•ใฃใฆใ„ใพใ™ใ€‚",
+	"max"            => array(
+		"numeric" => ":attributeใซใฏใ€:maxไปฅไธ‹ใฎๆ•ฐๅญ—ใ‚’ใ”ๆŒ‡ๅฎšใใ ใ•ใ„ใ€‚",
+		"file"    => ":attributeใซใฏใ€:max kBไปฅไธ‹ใฎใƒ•ใ‚กใ‚คใƒซใ‚’ใ”ๆŒ‡ๅฎšใใ ใ•ใ„ใ€‚",
+		"string"  => ":attributeใฏใ€:maxๆ–‡ๅญ—ไปฅไธ‹ใงใ”ๆŒ‡ๅฎšใใ ใ•ใ„ใ€‚",
+	),
+	"mimes"          => ":attributeใซใฏ:valuesใ‚ฟใ‚คใƒ—ใฎใƒ•ใ‚กใ‚คใƒซใ‚’ๆŒ‡ๅฎšใ—ใฆใใ ใ•ใ„ใ€‚",
+	"min"            => array(
+		"numeric" => ":attributeใซใฏใ€:minไปฅไธŠใฎๆ•ฐๅญ—ใ‚’ใ”ๆŒ‡ๅฎšใใ ใ•ใ„ใ€‚",
+		"file"    => ":attributeใซใฏใ€:min kBไปฅไธŠใฎใƒ•ใ‚กใ‚คใƒซใ‚’ใ”ๆŒ‡ๅฎšใใ ใ•ใ„ใ€‚",
+		"string"  => ":attributeใฏใ€:minๆ–‡ๅญ—ไปฅไธŠใงใ”ๆŒ‡ๅฎšใใ ใ•ใ„ใ€‚",
+	),
+	"not_in"         => "้ธๆŠžใ•ใ‚ŒใŸ:attributeใฏๆญฃใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚",
+	"numeric"        => ":attributeใซใฏใ€ๆ•ฐๅญ—ใ‚’ๆŒ‡ๅฎšใ—ใฆใใ ใ•ใ„ใ€‚",
+	"required"       => ":attributeใฏๅฟ…ใšๆŒ‡ๅฎšใ—ใฆใใ ใ•ใ„ใ€‚",
+	"same"           => ":attributeใจ:otherใซใฏๅŒใ˜ๅ€คใ‚’ๆŒ‡ๅฎšใ—ใฆใใ ใ•ใ„ใ€‚",
+	"size"           => array(
+		"numeric" => ":attributeใซใฏ:sizeใ‚’ๆŒ‡ๅฎšใ—ใฆใใ ใ•ใ„ใ€‚",
+		"file"    => ":attributeใฎใƒ•ใ‚กใ‚คใƒซใฏใ€:sizeใ‚ญใƒญใƒใ‚คใƒˆใงใชใใฆใฏใชใ‚Šใพใ›ใ‚“ใ€‚",
+		"string"  => ":attributeใฏ:sizeๆ–‡ๅญ—ใงๆŒ‡ๅฎšใ—ใฆใใ ใ•ใ„ใ€‚",
+	),
+	"unique"         => ":attributeใซๆŒ‡ๅฎšใ•ใ‚ŒใŸๅ€คใฏๆ—ขใซๅญ˜ๅœจใ—ใฆใ„ใพใ™ใ€‚",
+	"url"            => ":attributeใฎใƒ•ใ‚ฉใƒผใƒžใƒƒใƒˆใŒๆญฃใ—ใใ‚ใ‚Šใพใ›ใ‚“ใ€‚",
+
+	/*
+	|--------------------------------------------------------------------------
+	| Custom Validation Language Lines
+	|--------------------------------------------------------------------------
+	|
+	| Here you may specify custom validation messages for attributes using the
+	| convention "attribute_rule" to name the lines. This helps keep your
+	| custom validation clean and tidy.
+	|
+	| So, say you want to use a custom validation message when validating that
+	| the "email" attribute is unique. Just add "email_unique" to this array
+	| with your custom message. The Validator will handle the rest!
+	|
+	*/
+
+	/*
+	|--------------------------------------------------------------------------
+	| ใ‚ซใ‚นใ‚ฟใƒ ใƒใƒชใƒ‡ใƒผใ‚ทใƒงใƒณ่จ€่ชž่จญๅฎš
+	|--------------------------------------------------------------------------
+	|
+	| ใ“ใ“ใงใฏใ€"ๅฑžๆ€ง_ใƒซใƒผใƒซ"ใฎ่จ˜ๆณ•ใ‚’ไฝฟ็”จใ—ใ€ๅฑžๆ€งใซๅฏพใ™ใ‚‹ใ‚ซใ‚นใ‚ฟใƒ ใƒใƒชใƒ‡ใƒผใ‚ทใƒงใƒณใƒกใƒƒใ‚ปใƒผใ‚ธใ‚’
+	| ๆŒ‡ๅฎšใ—ใฆใใ ใ•ใ„ใ€‚ใ“ใ‚Œใซใ‚ˆใ‚Šใ€ใ‚ซใ‚นใ‚ฟใƒ ใƒใƒชใƒ‡ใƒผใ‚ทใƒงใƒณใ‚’ใใ‚Œใ„ใซ็พŽใ—ใไฟใฆใพใ™ใ€‚
+	|
+	| ไพ‹ใˆใฐใ€"email"ๅฑžๆ€งใฎuniqueใƒใƒชใƒ‡ใƒผใ‚ทใƒงใƒณใงใ€ใ‚ซใ‚นใ‚ฟใƒ ใƒใƒชใƒ‡ใƒผใ‚ทใƒงใƒณใƒกใƒƒใ‚ปใƒผใ‚ธใ‚’
+	| ไฝฟใ„ใŸใ„ใชใ‚‰ใฐใ€"email_unique"ใ‚’ใ‚ซใ‚นใ‚ฟใƒ ใƒกใƒƒใ‚ปใƒผใ‚ธใจใจใ‚‚ใซใ€้…ๅˆ—ใซ่ฟฝๅŠ ใ—ใฆใใ ใ•ใ„ใ€‚
+	| Validatorใ‚ฏใƒฉใ‚นใŒๆฎ‹ใ‚Šใฎ้ขๅ€’ใ‚’่ฆ‹ใพใ™๏ผ
+	|
+	*/
+
+	'custom' => array(),
+
+	/*
+	|--------------------------------------------------------------------------
+	| 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". Your users will thank you.
+	|
+	| The Validator class will automatically search this array of lines it
+	| is attempting to replace the :attribute place-holder in messages.
+	| It's pretty slick. We think you'll like it.
+	|
+	*/
+
+	/*
+	|--------------------------------------------------------------------------
+	| ใƒใƒชใƒ‡ใƒผใ‚ทใƒงใƒณๅฑžๆ€ง
+	|--------------------------------------------------------------------------
+	|
+	| ไปฅไธ‹ใฎ่จ€่ชž่จญๅฎšใฏๅฑžๆ€งใฎใƒ—ใƒฌใƒผใ‚นใƒ›ใƒซใƒ€ใƒผใ‚’ไพ‹ใˆใฐ"email"ๅฑžๆ€งใ‚’"E-Mailใ‚ขใƒ‰ใƒฌใ‚น"ใจใ„ใ†้ขจใซ
+	| ่ชญใฟๆ‰‹ใซ่ฆชๅˆ‡ใซใชใ‚‹ใ‚ˆใ†็ฝฎใๆ›ใˆใ‚‹ใŸใ‚ใซไฝฟ็”จใ•ใ‚Œใพใ™ใ€‚
+	| ใ‚ใชใŸใฎใƒฆใƒผใ‚ถใƒผใฏใ€ใ‚ใชใŸใซๆ„Ÿ่ฌใ™ใ‚‹ใงใ—ใ‚‡ใ†ใ€‚
+	|
+	| Validatorใ‚ฏใƒฉใ‚นใฏใ€่‡ชๅ‹•็š„ใซใƒกใƒƒใ‚ปใƒผใ‚ธใซๅซใพใ‚Œใ‚‹:attributeใƒ—ใƒฌใƒผใ‚นใƒ›ใƒซใƒ€ใƒผใ‚’
+	| ใ“ใฎ้…ๅˆ—ใฎๅ€คใซ็ฝฎใๆ›ใˆใ‚ˆใ†ใจ่ฉฆใฟใพใ™ใ€‚็ตถๅฆ™ใงใ™ใญใ€‚ใ‚ใชใŸใ‚‚ๆฐ—ใซๅ…ฅใฃใฆใใ‚Œใ‚‹ใงใ—ใ‚‡ใ†ใ€‚
+	*/
+
+	'attributes' => array(),
+
+);

+ 19 - 0
application/language/nl/pagination.php

@@ -0,0 +1,19 @@
+<?php 
+
+return array(
+
+	/*
+	|--------------------------------------------------------------------------
+	| Pagination Language Lines
+	|--------------------------------------------------------------------------
+	|
+	| The following language lines are used by the paginator library to build
+	| the pagination links. You're free to change them to anything you want.
+	| If you come up with something more exciting, let us know.
+	|
+	*/
+
+	'previous' => '&laquo; Vorige',
+	'next'     => 'Volgende &raquo;',
+
+);

+ 90 - 0
application/language/nl/validation.php

@@ -0,0 +1,90 @@
+<?php 
+
+return array(
+
+	/*
+	|--------------------------------------------------------------------------
+	| Dutch validation language file
+	|--------------------------------------------------------------------------
+	|
+	*/
+
+	"accepted"       => "Het :attribute moet geaccepteerd zijn.",
+	"active_url"     => "Het :attribute is geen geldig URL.",
+	"after"          => "Het :attribute moet een datum na :date zijn.",
+	"alpha"          => "Het :attribute mag alleen letters bevatten.",
+	"alpha_dash"     => "Het :attribute mag alleen letters, nummers, onderstreep(_) en strepen(-) bevatten.",
+	"alpha_num"      => "Het :attribute mag alleen letters en nummers",
+	"before"         => "Het :attribute moet een datum voor :date zijn.",
+	"between"        => array(
+		"numeric" => "Het :attribute moet tussen :min en :max zijn.",
+		"file"    => "Het :attribute moet tussen :min en :max kilobytes zijn.",
+		"string"  => "Het :attribute moet tussen :min en :max tekens zijn.",
+	),
+	"confirmed"      => "Het :attribute bevestiging komt niet overeen.",
+	"different"      => "Het :attribute en :other moeten verschillend zijn.",
+	"email"          => "Het :attribute formaat is ongeldig.",
+	"exists"         => "Het gekozen :attribute is al ingebruik.",
+	"image"          => "Het :attribute moet een afbeelding zijn.",
+	"in"             => "Het gekozen :attribute is ongeldig.",
+	"integer"        => "Het :attribute moet een getal zijn.",
+	"ip"             => "Het :attribute moet een geldig IP adres bevatten.",
+	"match"          => "Het :attribute formaat is ongeldig.",
+	"max"            => array(
+		"numeric" => "Het :attribute moet minder dan :max zijn.",
+		"file"    => "Het :attribute moet minder dan :max kilobytes zijn.",
+		"string"  => "Het :attribute moet minder dan :max tekens zijn.",
+	),
+	"mimes"          => "Het :attribute moet een bestand zijn van het bestandstype :values.",
+	"min"            => array(
+		"numeric" => "Het :attribute moet minimaal :min zijn.",
+		"file"    => "Het :attribute moet minimaal :min kilobytes zijn.",
+		"string"  => "Het :attribute moet minimaal :min characters zijn.",
+	),
+	"not_in"         => "Het :attribute formaat is ongeldig.",
+	"numeric"        => "Het :attribute moet een nummer zijn.",
+	"required"       => "Het :attribute veld is verplicht.",
+	"same"           => "Het :attribute en :other moeten overeenkomen.",
+	"size"           => array(
+		"numeric" => "Het :attribute moet :size zijn.",
+		"file"    => "Het :attribute moet :size kilobyte zijn.",
+		"string"  => "Het :attribute moet :size characters zijn.",
+	),
+	"unique"         => "Het :attribute is al in gebruik.",
+	"url"            => "Het :attribute formaat is ongeldig.",
+
+	/*
+	|--------------------------------------------------------------------------
+	| Custom Validation Language Lines
+	|--------------------------------------------------------------------------
+	|
+	| Here you may specify custom validation messages for attributes using the
+	| convention "attribute_rule" to name the lines. This helps keep your
+	| custom validation clean and tidy.
+	|
+	| So, say you want to use a custom validation message when validating that
+	| the "email" attribute is unique. Just add "email_unique" to this array
+	| with your custom message. The Validator will handle the rest!
+	|
+	*/
+
+	'custom' => array(),
+
+	/*
+	|--------------------------------------------------------------------------
+	| 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". Your users will thank you.
+	|
+	| The Validator class will automatically search this array of lines it
+	| is attempting to replace the :attribute place-holder in messages.
+	| It's pretty slick. We think you'll like it.
+	|
+	*/
+
+	'attributes' => array(),
+
+);

+ 2 - 2
bundles/docs/routes.php

@@ -38,7 +38,7 @@ function document_exists($page)
 }
 
 /**
- * Attach the sidebar to the documentatoin template.
+ * Attach the sidebar to the documentation template.
  */
 View::composer('docs::template', function($view)
 {
@@ -68,7 +68,7 @@ Route::get('(:bundle)/(:any)/(:any?)', function($section, $page = null)
 
 	// If no page was specified, but a "home" page exists for the section,
 	// we'll set the file to the home page so that the proper page is
-	// display back out to the client for the requested doc page.
+	// displayed back out to the client for the requested doc page.
 	if (is_null($page) and document_exists($file.'/home'))
 	{
 		$file .= '/home';

+ 5 - 5
bundles/docs/views/template.blade.php

@@ -6,8 +6,8 @@
 	<title>Laravel: A Framework For Web Artisans</title>
 	<meta name="viewport" content="width=device-width">
 
-	{{ HTML::style('laravel/css/style.css') }}
-	{{ HTML::style('laravel/js/modernizr-2.5.3.min.js') }}
+	{{ HTML::style(URL::$base.'/laravel/css/style.css') }}
+	{{ HTML::script(URL::$base.'/laravel/js/modernizr-2.5.3.min.js') }}
 </head>
 <body onload="prettyPrint()">
 	<div class="wrapper">
@@ -28,7 +28,7 @@
 		</div>
 	</div>
 	{{ HTML::script('http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js') }}
-	{{ HTML::script('laravel/js/prettify.js') }}
-	{{ HTML::script('laravel/js/scroll.js') }}
+	{{ HTML::script(URL::$base.'/laravel/js/prettify.js') }}
+	{{ HTML::script(URL::$base.'/laravel/js/scroll.js') }}
 </body>
-</html>
+</html>

+ 2 - 2
laravel/auth/drivers/driver.php

@@ -80,7 +80,7 @@ abstract class Driver {
 	}
 
 	/**
-	 * Get the a given application user by ID.
+	 * Get the given application user by ID.
 	 *
 	 * @param  int    $id
 	 * @return mixed
@@ -192,7 +192,7 @@ abstract class Driver {
 	}
 
 	/**
-	 * Get session key name used to store the token.
+	 * Get the session key name used to store the token.
 	 *
 	 * @return string
 	 */

+ 13 - 6
laravel/auth/drivers/eloquent.php

@@ -21,17 +21,24 @@ class Eloquent extends Driver {
 	/**
 	 * Attempt to log a user into the application.
 	 *
-	 * @param  array  $arguments
+	 * @param  array $arguments
 	 * @return void
 	 */
 	public function attempt($arguments = array())
 	{
-		$username = Config::get('auth.username');
+		$user = $this->model()->where(function($query) use($arguments)
+		{
+			$username = Config::get('auth.username');
+			
+			$query->where($username, '=', $arguments['username']);
 
-		$user = $this->model()->where($username, '=', $arguments['username'])->first();
+			foreach(array_except($arguments, array('username', 'password', 'remember')) as $column => $val)
+			{
+			    $query->where($column, '=', $val);
+			}
+		})->first();
 
-		// This driver uses a basic username and password authentication scheme
-		// so if the credentials match what is in the database we will just
+		// If the credentials match what is in the database we will just
 		// log the user into the application and remember them if asked.
 		$password = $arguments['password'];
 
@@ -57,4 +64,4 @@ class Eloquent extends Driver {
 		return new $model;
 	}
 
-}
+}

+ 17 - 10
laravel/auth/drivers/fluent.php

@@ -11,7 +11,7 @@ class Fluent extends Driver {
 	 *
 	 * If the user is a guest, null should be returned.
 	 *
-	 * @param  int         $id
+	 * @param  int  $id
 	 * @return mixed|null
 	 */
 	public function retrieve($id)
@@ -25,15 +25,14 @@ class Fluent extends Driver {
 	/**
 	 * Attempt to log a user into the application.
 	 *
-	 * @param  array  $arguments
+	 * @param  array $arguments
 	 * @return void
 	 */
 	public function attempt($arguments = array())
 	{
-		$user = $this->get_user($arguments['username']);
+		$user = $this->get_user($arguments);
 
-		// This driver uses a basic username and password authentication scheme
-		// so if the credentials match what is in the database we will just
+		// If the credentials match what is in the database we will just
 		// log the user into the application and remember them if asked.
 		$password = $arguments['password'];
 
@@ -48,18 +47,26 @@ class Fluent extends Driver {
 	}
 
 	/**
-	 * Get the user from the database table by username.
+	 * Get the user from the database table.
 	 *
-	 * @param  mixed  $value
+	 * @param  array  $arguments
 	 * @return mixed
 	 */
-	protected function get_user($value)
+	protected function get_user($arguments)
 	{
 		$table = Config::get('auth.table');
 
-		$username = Config::get('auth.username');
+		return DB::table($table)->where(function($query) use($arguments)
+		{
+			$username = Config::get('auth.username');
+			
+			$query->where($username, '=', $arguments['username']);
 
-		return DB::table($table)->where($username, '=', $value)->first();
+			foreach(array_except($arguments, array('username', 'password', 'remember')) as $column => $val)
+			{
+			    $query->where($column, '=', $val);
+			}
+		})->first();
 	}
 
 }

+ 3 - 3
laravel/autoloader.php

@@ -40,7 +40,7 @@ class Autoloader {
 	/**
 	 * Load the file corresponding to a given class.
 	 *
-	 * This method is registerd in the bootstrap file as an SPL auto-loader.
+	 * This method is registered in the bootstrap file as an SPL auto-loader.
 	 *
 	 * @param  string  $class
 	 * @return void
@@ -55,7 +55,7 @@ class Autoloader {
 			return class_alias(static::$aliases[$class], $class);
 		}
 
-		// All classes in Laravel are staticly mapped. There is no crazy search
+		// All classes in Laravel are statically mapped. There is no crazy search
 		// routine that digs through directories. It's just a simple array of
 		// class to file path maps for ultra-fast file loading.
 		elseif (isset(static::$mappings[$class]))
@@ -102,7 +102,7 @@ class Autoloader {
 	protected static function load_psr($class, $directory = null)
 	{
 		// The PSR-0 standard indicates that class namespaces and underscores
-		// should be used to indcate the directory tree in which the class
+		// should be used to indicate the directory tree in which the class
 		// resides, so we'll convert them to slashes.
 		$file = str_replace(array('\\', '_'), '/', $class);
 

+ 76 - 50
laravel/blade.php

@@ -150,18 +150,18 @@ class Blade {
 		}
 
 		// First we'll split out the lines of the template so we can get the
-		// layout from the top of the template. By convention it must be
+		// layout from the top of the template. By convention, it must be
 		// located on the first line of the template contents.
-		$lines = preg_split("/(\r?\n)/", $value);
-
-		$pattern = static::matcher('layout');
-
-		$lines[] = preg_replace($pattern, '$1@include$2', $lines[0]);
+		preg_replace_callback(
+			'/^@layout(\s*?\(.+?\))(\r?\n)?/',
+			function($matches) use (&$value)
+			{
+				$value = substr( $value, strlen( $matches[0] ) ).CRLF.'@include'.$matches[1];
+			},
+			$value
+		);
 
-		// We will add a "render" statement to the end of the templates and
-		// then slice off the "@layout" shortcut from the start so the
-		// sections register before the parent template renders.
-		return implode(CRLF, array_slice($lines, 1));
+		return $value;
 	}
 
 	/**
@@ -172,9 +172,10 @@ class Blade {
 	 */
 	protected static function extract($value, $expression)
 	{
-		preg_match('/@layout(\s*\(.*\))(\s*)/', $value, $matches);
-
-		return str_replace(array("('", "')"), '', $matches[1]);
+		if ( preg_match("/@layout\s*?\(\s*?'(.+?)'\s*?\)/", $value, $matches))
+		{
+			return trim( $matches[1] );
+		}
 	}
 
 	/**
@@ -185,9 +186,9 @@ class Blade {
 	 */
 	protected static function compile_comments($value)
 	{
-		$value = preg_replace('/\{\{--(.+?)(--\}\})?\n/', "<?php // $1 ?>", $value);
-
-		return preg_replace('/\{\{--((.|\s)*?)--\}\}/', "<?php /* $1 */ ?>\n", $value);
+		$value = preg_replace('/\{\{--(.*?)--\}\}/', "<?php // $1 ?>", $value);
+		
+		return preg_replace('/\{\{--(.*?)--\}\}/s', "<?php /* ?>$1<?php */ ?>", $value);
 	}
 
 	/**
@@ -198,7 +199,7 @@ class Blade {
 	 */
 	protected static function compile_echos($value)
 	{
-		return preg_replace('/\{\{(.+?)\}\}/', '<?php echo $1; ?>', $value);
+		return preg_replace('/\{\{(.+?)\}\}/s', '<?php echo $1; ?>', $value);
 	}
 
 	/**
@@ -209,27 +210,21 @@ class Blade {
 	 */
 	protected static function compile_forelse($value)
 	{
-		preg_match_all('/(\s*)@forelse(\s*\(.*\))(\s*)/', $value, $matches);
+		preg_match_all('/@forelse\s*?\(\s*?\$(.+?)\s*?as\s*?\$(.+?)\s*?\)/', $value, $matches, PREG_SET_ORDER );
 
-		foreach ($matches[0] as $forelse)
-		{
-			preg_match('/\s*\(\s*(\S*)\s/', $forelse, $variable);
+		if ( count($matches) < 1 ) return $value;
 
+		foreach ($matches as $forelse)
+		{
 			// Once we have extracted the variable being looped against, we can add
 			// an if statement to the start of the loop that checks if the count
 			// of the variable being looped against is greater than zero.
-			$if = "<?php if (count({$variable[1]}) > 0): ?>";
-
-			$search = '/(\s*)@forelse(\s*\(.*\))/';
-
-			$replace = '$1'.$if.'<?php foreach$2: ?>';
-
-			$blade = preg_replace($search, $replace, $forelse);
+			$replace = '<?php if (count($'.$forelse[1].') > 0): foreach ($'.$forelse[1].' as $'.$forelse[2].'): ?>';
 
 			// Finally, once we have the check prepended to the loop we'll replace
 			// all instances of this forelse syntax in the view content of the
 			// view being compiled to Blade syntax with real PHP syntax.
-			$value = str_replace($forelse, $blade, $value);
+			$value = str_replace($forelse[0], $replace, $value);
 		}
 
 		return $value;
@@ -243,7 +238,7 @@ class Blade {
 	 */
 	protected static function compile_empty($value)
 	{
-		return str_replace('@empty', '<?php endforeach; ?><?php else: ?>', $value);
+		return str_replace('@empty', '<?php endforeach; else: ?>', $value);
 	}
 
 	/**
@@ -265,9 +260,42 @@ class Blade {
 	 */
 	protected static function compile_structure_openings($value)
 	{
-		$pattern = '/(\s*)@(if|elseif|foreach|for|while)(\s*\(.*\))/';
-
-		return preg_replace($pattern, '$1<?php $2$3: ?>', $value);
+		preg_replace_callback(
+			'/@(if|elseif|foreach|for|while)(\s*?)(\([^\n\r\t]+\))/',
+			function($matches) use (&$value)
+			{
+				if(count( $matches ) === 4)
+				{
+					$open  = 0;
+					$close = 0;
+					$cut   = 0;
+					$len   = strlen($matches[3]);
+					for($i = 0; $i < $len; $i++)
+					{
+						if($matches[3][$i] === '(' )
+						{
+							$open++;
+						}
+						if($matches[3][$i] === ')' )
+						{
+							$close++;
+						}
+						if($open !== 0 && ($open === $close))
+						{
+							break;
+						}
+					}
+					$condition = substr($matches[3], 0, ($i + 1));
+					$value = str_replace(
+						'@'.$matches[1].$matches[2].$condition,
+						'<?php '.$matches[1].$condition.': ?>',
+						$value
+					);
+				}
+			},
+			$value
+		);
+		return $value;
 	}
 
 	/**
@@ -278,9 +306,9 @@ class Blade {
 	 */
 	protected static function compile_structure_closings($value)
 	{
-		$pattern = '/(\s*)@(endif|endforeach|endfor|endwhile|break)(\s*)/';
+		$pattern = '/@(endif|endforeach|endfor|endwhile|break|continue)/';
 
-		return preg_replace($pattern, '$1<?php $2; ?>$3', $value);
+		return preg_replace($pattern, '<?php $1; ?>', $value);
 	}
 
 	/**
@@ -291,7 +319,7 @@ class Blade {
 	 */
 	protected static function compile_else($value)
 	{
-		return preg_replace('/(\s*)@(else)(\s*)/', '$1<?php $2: ?>$3', $value);
+		return str_replace( '@else', '<?php else: ?>', $value);
 	}
 
 	/**
@@ -302,9 +330,9 @@ class Blade {
 	 */
 	protected static function compile_unless($value)
 	{
-		$pattern = '/(\s*)@unless(\s*\(.*\))/';
+		$pattern = static::matcher('unless');
 
-		return preg_replace($pattern, '$1<?php if( ! ($2)): ?>', $value);
+		return preg_replace($pattern, '<?php if( ! ($1)): ?>', $value);
 	}
 
 	/**
@@ -328,7 +356,7 @@ class Blade {
 	{
 		$pattern = static::matcher('include');
 
-		return preg_replace($pattern, '$1<?php echo view$2->with(get_defined_vars())->render(); ?>', $value);
+		return preg_replace($pattern, '<?php echo view$1->with(get_defined_vars())->render(); ?>', $value);
 	}
 
 	/**
@@ -341,7 +369,7 @@ class Blade {
 	{
 		$pattern = static::matcher('render');
 
-		return preg_replace($pattern, '$1<?php echo render$2; ?>', $value);
+		return preg_replace($pattern, '<?php echo render$1; ?>', $value);
 	}
 
 	/**
@@ -354,7 +382,7 @@ class Blade {
 	{
 		$pattern = static::matcher('render_each');
 
-		return preg_replace($pattern, '$1<?php echo render_each$2; ?>', $value);
+		return preg_replace($pattern, '<?php echo render_each$1; ?>', $value);
 	}
 
 	/**
@@ -369,7 +397,7 @@ class Blade {
 	{
 		$pattern = static::matcher('yield');
 
-		return preg_replace($pattern, '$1<?php echo \\Laravel\\Section::yield$2; ?>', $value);
+		return preg_replace($pattern, '<?php echo \\Laravel\\Section::yield$1; ?>', $value);
 	}
 
 	/**
@@ -379,9 +407,7 @@ class Blade {
 	 */
 	protected static function compile_yield_sections($value)
 	{
-		$replace = '<?php echo \\Laravel\\Section::yield_section(); ?>';
-
-		return str_replace('@yield_section', $replace, $value);
+		return str_replace('@yield_section', '<?php echo \\Laravel\\Section::yield_section(); ?>', $value);
 	}
 
 	/**
@@ -396,7 +422,7 @@ class Blade {
 	{
 		$pattern = static::matcher('section');
 
-		return preg_replace($pattern, '$1<?php \\Laravel\\Section::start$2; ?>', $value);
+		return preg_replace($pattern, '<?php \\Laravel\\Section::start$1; ?>', $value);
 	}
 
 	/**
@@ -409,7 +435,7 @@ class Blade {
 	 */
 	protected static function compile_section_end($value)
 	{
-		return preg_replace('/@endsection/', '<?php \\Laravel\\Section::stop(); ?>', $value);
+		return str_replace('@endsection', '<?php \\Laravel\\Section::stop(); ?>', $value);
 	}
 
 	/**
@@ -426,7 +452,7 @@ class Blade {
 		}
 
 		return $value;
-	}	
+	}
 
 	/**
 	 * Get the regular expression for a generic Blade function.
@@ -436,7 +462,7 @@ class Blade {
 	 */
 	public static function matcher($function)
 	{
-		return '/(\s*)@'.$function.'(\s*\(.*\))/';
+		return '/@'.$function.'\s*?(\(.+?\))/';
 	}
 
 	/**
@@ -450,4 +476,4 @@ class Blade {
 		return path('storage').'views/'.md5($path);
 	}
 
-}
+}

+ 7 - 7
laravel/bundle.php

@@ -46,7 +46,7 @@ class Bundle {
 
 		// If the given configuration is actually a string, we will assume it is a
 		// location and set the bundle name to match it. This is common for most
-		// bundles who simply live in the root bundle directory.
+		// bundles that simply live in the root bundle directory.
 		if (is_string($config))
 		{
 			$bundle = $config;
@@ -55,7 +55,7 @@ class Bundle {
 		}
 
 		// If no location is set, we will set the location to match the name of
-		// the bundle. This is for bundles who are installed to the root of
+		// the bundle. This is for bundles that are installed on the root of
 		// the bundle directory so a location was not set.
 		if ( ! isset($config['location']))
 		{
@@ -66,7 +66,7 @@ class Bundle {
 
 		// It is possible for the developer to specify auto-loader mappings
 		// directly on the bundle registration. This provides a convenient
-		// way to register mappings withuot a bootstrap.
+		// way to register mappings without a bootstrap.
 		if (isset($config['autoloads']))
 		{
 			static::autoloads($bundle, $config);
@@ -74,7 +74,7 @@ class Bundle {
 	}
 
 	/**
-	 * Load a bundle by running it's start-up script.
+	 * Load a bundle by running its start-up script.
 	 *
 	 * If the bundle has already been started, no action will be taken.
 	 *
@@ -124,7 +124,7 @@ class Bundle {
 
 		$path = static::path($bundle).'routes'.EXT;
 
-		// By setting the bundle property on the router the router knows what
+		// By setting the bundle property on the router, the router knows what
 		// value to replace the (:bundle) place-holder with when the bundle
 		// routes are added, keeping the routes flexible.
 		Router::$bundle = static::option($bundle, 'handles');
@@ -201,7 +201,7 @@ class Bundle {
 	}
 
 	/**
-	 * Deteremine if a bundle exists within the bundles directory.
+	 * Determine if a bundle exists within the bundles directory.
 	 *
 	 * @param  string  $bundle
 	 * @return bool
@@ -372,7 +372,7 @@ class Bundle {
 	}
 
 	/**
-	 * Parse a element identifier and return the bundle name and element.
+	 * Parse an element identifier and return the bundle name and element.
 	 *
 	 * <code>
 	 *		// Returns array(null, 'admin.user')

+ 1 - 1
laravel/cli/artisan.php

@@ -34,7 +34,7 @@ require path('sys').'cli/dependencies'.EXT;
  * We will wrap the command execution in a try / catch block and
  * simply write out any exception messages we receive to the CLI
  * for the developer. Note that this only writes out messages
- * for the CLI exceptions. All others will be not be caught
+ * for the CLI exceptions. All others will not be caught
  * and will be totally dumped out to the CLI.
  */
 try

+ 2 - 2
laravel/cli/command.php

@@ -100,7 +100,7 @@ class Command {
 	 *		// Resolve an instance of a task
 	 *		$task = Command::resolve('application', 'migrate');
 	 *
-	 *		// Resolve an instance of a task wtihin a bundle
+	 *		// Resolve an instance of a task within a bundle
 	 *		$task = Command::resolve('bundle', 'foo');
 	 * </code>
 	 *
@@ -121,7 +121,7 @@ class Command {
 		}
 
 		// If the task file exists, we'll format the bundle and task name
-		// into a task class name and resolve an instance of the so that
+		// into a task class name and resolve an instance of the class so that
 		// the requested method may be executed.
 		if (file_exists($path = Bundle::path($bundle).'tasks/'.$task.EXT))
 		{

+ 12 - 0
laravel/cli/dependencies.php

@@ -125,4 +125,16 @@ if(! IoC::registered('bundle.provider: github'))
 	{
 		return new Tasks\Bundle\Providers\Github;
 	});
+}
+
+/**
+ * The "help" task provides information about 
+ * artisan usage.
+ */
+if(! IoC::registered('task: help'))
+{
+	IoC::singleton('task: help', function()
+	{
+		return new Tasks\Help;
+	});
 }

+ 2 - 2
laravel/cli/tasks/bundle/bundler.php

@@ -49,7 +49,7 @@ class Bundler extends Task {
 			// all of its registered dependencies as well.
 			//
 			// Each bundle provider implements the Provider interface and
-			// is repsonsible for retrieving the bundle source from its
+			// is responsible for retrieving the bundle source from its
 			// hosting party and installing it into the application.
 			$path = path('bundle').$this->path($bundle);
 
@@ -135,7 +135,7 @@ class Bundler extends Task {
 
 			$responses[] = $bundle;
 
-			// We'll also get the bundle's declared dependenceis so they
+			// We'll also get the bundle's declared dependencies so they
 			// can be installed along with the bundle, making it easy
 			// to install a group of bundles.
 			$dependencies = $this->get($bundle['dependencies']);

+ 2 - 2
laravel/cli/tasks/bundle/providers/provider.php

@@ -27,7 +27,7 @@ abstract class Provider {
 
 		// When installing a bundle from a Zip archive, we'll first clone
 		// down the bundle zip into the bundles "working" directory so
-		// we have a spot to do all of our bundle extration work.
+		// we have a spot to do all of our bundle extraction work.
 		$target = $work.'laravel-bundle.zip';
 
 		File::put($target, $this->download($url));
@@ -49,7 +49,7 @@ abstract class Provider {
 
 		// Once we have the latest modified directory, we should be
 		// able to move its contents over into the bundles folder
-		// so the bundle will be usable by the develoepr.
+		// so the bundle will be usable by the developer.
 		File::mvdir($latest, $path);
 
 		File::rmdir($work.'zip');

+ 78 - 0
laravel/cli/tasks/help.json

@@ -0,0 +1,78 @@
+{
+	"Application Configuration": {
+		"key:generate": {
+			"description": "Generate a secure application key.",
+			"command": "php artisan key:generate"
+		}
+	},
+	"Database Tables": {
+		"session:table": {
+			"description": "Generate a migration for the sessions database table.",
+			"command": "php artisan session:table"
+		}
+	},
+	"Migrations": {
+		"migrate:install": {
+			"description": "Create the Laravel migration table.",
+			"command": "php artisan migrate:install"
+		},
+		"migrate:make": {
+			"description": "Create a migration.",
+			"command": "php artisan migrate:make create_users_table"
+		},
+		"migrate": {
+			"description": "Run outstanding migrations.",
+			"command": "php artisan migrate"
+		},
+		"migrate:rollback": {
+			"description": "Roll back the most recent migration.",
+			"command": "php artisan migrate:rollback"
+		},
+		"migrate:reset": {
+			"description": "Roll back all migrations.",
+			"command": "php artisan migrate:reset"
+		}
+	},
+	"Bundles": {
+		"bundle:install": {
+			"description": "Install a bundle.",
+			"command": "php artisan bundle:install swiftmailer"
+		},
+		"bundle:upgrade": {
+			"description": "Upgrade a bundle.",
+			"command": "php artisan bundle:upgrade swiftmailer"
+		},
+		"bundle:publish": {
+			"description": "Publish all bundles' assets.",
+			"command": "php artisan bundle:publish"
+		}
+	},	
+	"Unit Testing": {
+		"test": {
+			"description": "Run the application's tests.",
+			"command": "php artisan test"
+		}
+	},
+	"Routing": {
+		"route:call": {
+			"description": "Call a route.",
+			"command": "php artisan route:call get api/user/1"
+		}
+	},
+	"Application Keys": {
+		"key:generate": {
+			"description": "Generate an application key.",
+			"command": "php artisan key:generade"
+		}
+	},
+	"CLI Options": {
+		"--env=": {
+			"description": "Set the Laravel environment.",
+			"command": "php artisan task --env=local"
+		},
+		"--database=": {
+			"description": "Set the default database connection.",
+			"command": "php artisan task --database=mysql"
+		}
+	}
+}

+ 35 - 0
laravel/cli/tasks/help.php

@@ -0,0 +1,35 @@
+<?php namespace Laravel\CLI\Tasks;
+
+use Laravel\Str;
+use Laravel\File;
+
+class Help extends Task {
+
+	/**
+	 * List available artisan commands. 
+	 *
+	 * @param  array  $arguments
+	 * @return void
+	 */
+	public function commands()
+	{
+		// read help contents
+
+		$command_data = json_decode(File::get(__DIR__.'/help.json'));
+
+		// format and display help contents
+
+		$i=0;
+		foreach($command_data as $category => $commands)
+		{
+			if($i++ != 0) echo PHP_EOL;
+
+			echo PHP_EOL . "# $category" . PHP_EOL;
+
+			foreach($commands as $command => $details)
+			{
+				echo PHP_EOL . str_pad($command, 20) . str_pad($details->description, 30);
+			}
+		}
+	}
+}

+ 1 - 1
laravel/cli/tasks/migrate/database.php

@@ -40,7 +40,7 @@ class Database {
 		$table = $this->table();
 
 		// First we need to grab the last batch ID from the migration table,
-		// as this will allow us to grab the lastest batch of migrations
+		// as this will allow us to grab the latest batch of migrations
 		// that need to be run for a rollback command.
 		$id = $this->batch();
 

+ 3 - 3
laravel/cli/tasks/migrate/migrator.php

@@ -151,7 +151,7 @@ class Migrator extends Task {
 			$table->create();
 
 			// Migrations can be run for a specific bundle, so we'll use
-			// the bundle name and string migration name as an unique ID
+			// the bundle name and string migration name as a unique ID
 			// for the migrations, allowing us to easily identify which
 			// migrations have been run for each bundle.
 			$table->string('bundle', 50);
@@ -206,7 +206,7 @@ class Migrator extends Task {
 
 		// Once the migration has been created, we'll return the
 		// migration file name so it can be used by the task
-		// consumer if necessary for futher work.
+		// consumer if necessary for further work.
 		return $file;
 	}
 
@@ -223,7 +223,7 @@ class Migrator extends Task {
 
 		$prefix = Bundle::class_prefix($bundle);
 
-		// The class name is formatted simialrly to tasks and controllers,
+		// The class name is formatted similarly to tasks and controllers,
 		// where the bundle name is prefixed to the class if it is not in
 		// the default "application" bundle.
 		$class = $prefix.Str::classify($migration);

+ 1 - 1
laravel/cli/tasks/test/runner.php

@@ -83,7 +83,7 @@ class Runner extends Task {
 		
 		// fix the spaced directories problem when using the command line
 		// strings with spaces inside should be wrapped in quotes.
-		$path = escapeshellarg($path)
+		$path = escapeshellarg($path);
 
 		passthru('phpunit --configuration '.$path);
 

+ 2 - 2
laravel/config.php

@@ -73,7 +73,7 @@ class Config {
 		$items = static::$items[$bundle][$file];
 
 		// If a specific configuration item was not requested, the key will be null,
-		// meaning we'll to return the entire array of configuration item from the
+		// meaning we'll return the entire array of configuration items from the
 		// requested configuration file. Otherwise we can return the item.
 		if (is_null($item))
 		{
@@ -175,7 +175,7 @@ class Config {
 		// requested. This allows many types of config "drivers".
 		$config = Event::first(static::loader, func_get_args());
 
-		// If configuration items were actually found for the bundle and file we
+		// If configuration items were actually found for the bundle and file, we
 		// will add them to the configuration array and return true, otherwise
 		// we will return false indicating the file was not found.
 		if (count($config) > 0)

+ 3 - 3
laravel/cookie.php

@@ -3,7 +3,7 @@
 class Cookie {
 
 	/**
-	 * How long is forever (in minutes).
+	 * How long is forever (in minutes)?
 	 *
 	 * @var int
 	 */
@@ -77,7 +77,7 @@ class Cookie {
 
 		// If the secure option is set to true, yet the request is not over HTTPS
 		// we'll throw an exception to let the developer know that they are
-		// attempting to send a secure cookie over the unsecure HTTP.
+		// attempting to send a secure cookie over the insecure HTTP.
 		if ($secure and ! Request::secure())
 		{
 			throw new \Exception("Attempting to set secure cookie over HTTP.");
@@ -120,4 +120,4 @@ class Cookie {
 		return static::put($name, null, -2000, $path, $domain, $secure);
 	}
 
-}
+}

+ 3 - 3
laravel/core.php

@@ -147,7 +147,7 @@ Request::$foundation = RequestFoundation::createFromGlobals();
 | Determine The Application Environment
 |--------------------------------------------------------------------------
 |
-| Next we're ready to determine the application environment. This may be
+| Next, we're ready to determine the application environment. This may be
 | set either via the command line options or via the mapping of URIs to
 | environments that lives in the "paths.php" file for the application
 | and is parsed. When determining the CLI environment, the "--env"
@@ -178,7 +178,7 @@ else
 |
 | Once we have determined the application environment, we will set it on
 | the global server array of the HttpFoundation request. This makes it
-| available throughout the application, thought it is mainly only
+| available throughout the application, though it is mainly only
 | used to determine which configuration files to merge in.
 |
 */
@@ -216,7 +216,7 @@ if (defined('STDIN'))
 |--------------------------------------------------------------------------
 |
 | Finally we will register all of the bundles that have been defined for
-| the application. None of them will be started yet, but will be setup
+| the application. None of them will be started yet, but will be set up
 | so that they may be started by the developer at any time.
 |
 */

+ 1 - 0
laravel/database.php

@@ -1,5 +1,6 @@
 <?php namespace Laravel;
 
+use Closure;
 use Laravel\Database\Expression;
 use Laravel\Database\Connection;
 

+ 4 - 4
laravel/database/connection.php

@@ -185,7 +185,7 @@ class Connection {
 		// The result we return depends on the type of query executed against the
 		// database. On SELECT clauses, we will return the result set, for update
 		// and deletes we will return the affected row count.
-		if (stripos($sql, 'select') === 0)
+		if (stripos($sql, 'select') === 0 || stripos($sql, 'show') === 0)
 		{
 			return $this->fetch($statement, Config::get('database.fetch'));
 		}
@@ -209,7 +209,7 @@ class Connection {
 	/**
 	 * Execute a SQL query against the connection.
 	 *
-	 * The PDO statement and boolean result will be return in an array.
+	 * The PDO statement and boolean result will be returned in an array.
 	 *
 	 * @param  string  $sql
 	 * @param  array   $bindings
@@ -265,7 +265,7 @@ class Connection {
 			throw $exception;
 		}
 
-		// Once we have execute the query, we log the SQL, bindings, and
+		// Once we have executed the query, we log the SQL, bindings, and
 		// execution time in a static array that is accessed by all of
 		// the connections actively being used by the application.
 		if (Config::get('database.profile'))
@@ -287,7 +287,7 @@ class Connection {
 	{
 		// If the fetch style is "class", we'll hydrate an array of PHP
 		// stdClass objects as generic containers for the query rows,
-		// otherwise we'll just use the fetch styel value.
+		// otherwise we'll just use the fetch style value.
 		if ($style === PDO::FETCH_CLASS)
 		{
 			return $statement->fetchAll(PDO::FETCH_CLASS, 'stdClass');

+ 7 - 0
laravel/database/connectors/postgres.php

@@ -44,6 +44,13 @@ class Postgres extends Connector {
 			$connection->prepare("SET NAMES '{$config['charset']}'")->execute();
 		}
 
+		// If a schema has been specified, we'll execute a query against
+		// the database to set the search path.
+		if (isset($config['schema']))
+		{
+			$connection->prepare("SET search_path TO '{$config['schema']}'")->execute();
+		}
+
 		return $connection;
 	}
 

+ 10 - 15
laravel/database/eloquent/model.php

@@ -257,26 +257,21 @@ abstract class Model {
 	{
 		$includes = (array) $includes;
 
-		$all_includes = array();
+		$this->includes = array();
 
-		foreach($includes as $include)
+		foreach ($includes as $relationship => $constraints)
 		{
-			$nested = explode('.', $include);
-
-			$inc = array();
-
-			foreach($nested as $relation)
+			// When eager loading relationships, constraints may be set on the eager
+			// load definition; however, is none are set, we need to swap the key
+			// and the value of the array since there are no constraints.
+			if (is_numeric($relationship))
 			{
-				$inc[] = $relation;
-
-				$all_includes[] = implode('.', $inc);
+				list($relationship, $constraints) = array($constraints, null);
 			}
 
+			$this->includes[$relationship] = $constraints;
 		}
 
-		//remove duplicates and reset the array keys.
-		$this->includes = array_values(array_unique($all_includes));
-
 		return $this;
 	}
 
@@ -758,7 +753,7 @@ abstract class Model {
 	{
 		$meta = array('key', 'table', 'connection', 'sequence', 'per_page', 'timestamps');
 
-		// If the method is actually the name of a static property on the model we'll
+		// If the method is actually the name of a static property on the model, we'll
 		// return the value of the static property. This makes it convenient for
 		// relationships to access these values off of the instances.
 		if (in_array($method, $meta))
@@ -768,7 +763,7 @@ abstract class Model {
 
 		$underscored = array('with', 'find');
 
-		// Some methods need to be accessed both staticly and non-staticly so we'll
+		// Some methods need to be accessed both statically and non-statically so we'll
 		// keep underscored methods of those methods and intercept calls to them
 		// here so they can be called either way on the model instance.
 		if (in_array($method, $underscored))

+ 16 - 15
laravel/database/eloquent/query.php

@@ -38,7 +38,7 @@ class Query {
 	);
 
 	/**
-	 * Creat a new query instance for a model.
+	 * Create a new query instance for a model.
 	 *
 	 * @param  Model  $model
 	 * @return void
@@ -118,7 +118,7 @@ class Query {
 			$new = new $class(array(), true);
 
 			// We need to set the attributes manually in case the accessible property is
-			// set on the array which will prevent the mass assignemnt of attributes if
+			// set on the array which will prevent the mass assignment of attributes if
 			// we were to pass them in using the constructor or fill methods.
 			$new->fill_raw($result);
 
@@ -141,7 +141,7 @@ class Query {
 			}
 		}
 
-		// The many to many relationships may have pivot table column on them
+		// The many to many relationships may have pivot table columns on them
 		// so we will call the "clean" method on the relationship to remove
 		// any pivot columns that are on the model.
 		if ($this instanceof Relationships\Has_Many_And_Belongs_To)
@@ -199,7 +199,7 @@ class Query {
 		foreach ($this->model_includes() as $include => $constraints)
 		{
 			// To get the nested includes, we want to find any includes that begin
-			// the relationship and a dot, then we will strip off the leading
+			// the relationship with a dot, then we will strip off the leading
 			// nesting indicator and set the include in the array.
 			if (starts_with($include, $relationship.'.'))
 			{
@@ -217,22 +217,23 @@ class Query {
 	 */
 	protected function model_includes()
 	{
-		$includes = array();
+		$relationships = array_keys($this->model->includes);
+		$implicits = array();
 
-		foreach ($this->model->includes as $relationship => $constraints)
+		foreach ($relationships as $relationship)
 		{
-			// When eager loading relationships, constraints may be set on the eager
-			// load definition; however, is none are set, we need to swap the key
-			// and the value of the array since there are no constraints.
-			if (is_numeric($relationship))
+			$parts = explode('.', $relationship);
+
+			$prefix = '';
+			foreach ($parts as $part)
 			{
-				list($relationship, $constraints) = array($constraints, null);
+				$implicits[$prefix.$part] = NULL;
+				$prefix .= $part.'.';
 			}
-
-			$includes[$relationship] = $constraints;
 		}
 
-		return $includes;
+		// Add all implicit includes to the explicit ones
+		return $this->model->includes + $implicits;
 	}
 
 	/**
@@ -277,4 +278,4 @@ class Query {
 		return $this;
 	}
 
-}
+}

+ 2 - 2
laravel/database/eloquent/relationships/has_many_and_belongs_to.php

@@ -44,7 +44,7 @@ class Has_Many_And_Belongs_To extends Relationship {
 		$this->joining = $table ?: $this->joining($model, $associated);
 
 		// If the Pivot table is timestamped, we'll set the timestamp columns to be
-		// fetched when the pivot table models are fetched by the developer else
+		// fetched when the pivot table models are fetched by the developer, or else
 		// the ID will be the only "extra" column fetched in by default.
 		if (Pivot::$timestamps)
 		{
@@ -131,7 +131,7 @@ class Has_Many_And_Belongs_To extends Relationship {
 		}
 
 		// Next we will take the difference of the current and given IDs and detach
-		// all of the entities that exists in the current array but are not in
+		// all of the entities that exist in the current array but are not in
 		// the array of IDs given to the method, finishing the sync.
 		$detach = array_diff($current, $ids);
 

+ 2 - 2
laravel/database/grammar.php

@@ -35,7 +35,7 @@ abstract class Grammar {
 	 */
 	public function wrap_table($table)
 	{
-		// Expressions should be injected into the query as raw strings so
+		// Expressions should be injected into the query as raw strings
 		// so we do not want to wrap them in any way. We will just return
 		// the string value from the expression to be included.
 		if ($table instanceof Expression)
@@ -64,7 +64,7 @@ abstract class Grammar {
 	 */
 	public function wrap($value)
 	{
-		// Expressions should be injected into the query as raw strings so
+		// Expressions should be injected into the query as raw strings
 		// so we do not want to wrap them in any way. We will just return
 		// the string value from the expression to be included.
 		if ($value instanceof Expression)

+ 12 - 12
laravel/database/query.php

@@ -2,7 +2,7 @@
 
 use Closure;
 use Laravel\Database;
-use Laravel\Paginator;
+use Paginator;
 use Laravel\Database\Query\Grammars\Postgres;
 use Laravel\Database\Query\Grammars\SQLServer;
 
@@ -158,7 +158,7 @@ class Query {
 	{
 		// If the "column" is really an instance of a Closure, the developer is
 		// trying to create a join with a complex "ON" clause. So, we will add
-		// the join, and then call the Closure with the join/
+		// the join, and then call the Closure with the join.
 		if ($column1 instanceof Closure)
 		{
 			$this->joins[] = new Query\Join($type, $table);
@@ -168,7 +168,7 @@ class Query {
 
 		// If the column is just a string, we can assume that the join just
 		// has a simple on clause, and we'll create the join instance and
-		// add the clause automatically for the develoepr.
+		// add the clause automatically for the developer.
 		else
 		{
 			$join = new Query\Join($type, $table);
@@ -283,7 +283,7 @@ class Query {
 	 */
 	public function or_where_id($value)
 	{
-		return $this->or_where('id', '=', $value);		
+		return $this->or_where('id', '=', $value);
 	}
 
 	/**
@@ -436,7 +436,7 @@ class Query {
 
 		foreach ($segments as $segment)
 		{
-			// If the segment is not a boolean connector, we can assume it it is
+			// If the segment is not a boolean connector, we can assume it is
 			// a column name, and we'll add it to the query as a new constraint
 			// of the query's where clause and keep iterating the segments.
 			if ($segment != '_and_' and $segment != '_or_')
@@ -659,7 +659,7 @@ class Query {
 	public function aggregate($aggregator, $columns)
 	{
 		// We'll set the aggregate value so the grammar does not try to compile
-		// a SELECT clause on the query. If an aggregator is present, it's own
+		// a SELECT clause on the query. If an aggregator is present, its own
 		// grammar function will be used to build the SQL syntax.
 		$this->aggregate = compact('aggregator', 'columns');
 
@@ -686,7 +686,7 @@ class Query {
 	{
 		// Because some database engines may throw errors if we leave orderings
 		// on the query when retrieving the total number of records, we'll drop
-		// all of the ordreings and put them back on the query.
+		// all of the orderings and put them back on the query.
 		list($orderings, $this->orderings) = array($this->orderings, null);
 
 		$total = $this->count(reset($columns));
@@ -713,12 +713,12 @@ class Query {
 	{
 		// Force every insert to be treated like a batch insert to make creating
 		// the binding array simpler since we can just spin through the inserted
-		// rows as if there/ was more than one every time.
+		// rows as if there was more than one every time.
 		if ( ! is_array(reset($values))) $values = array($values);
 
 		$bindings = array();
 
-		// We need to merge the the insert values into the array of the query
+		// We need to merge the insert values into the array of the query
 		// bindings so that they will be bound to the PDO statement when it
 		// is executed by the database connection.
 		foreach ($values as $value)
@@ -819,7 +819,7 @@ class Query {
 	/**
 	 * Execute the query as a DELETE statement.
 	 *
-	 * Optionally, an ID may be passed to the method do delete a specific row.
+	 * Optionally, an ID may be passed to the method to delete a specific row.
 	 *
 	 * @param  int   $id
 	 * @return int
@@ -836,7 +836,7 @@ class Query {
 
 		$sql = $this->grammar->delete($this);
 
-		return $this->connection->query($sql, $this->bindings);		
+		return $this->connection->query($sql, $this->bindings);
 	}
 
 	/**
@@ -852,7 +852,7 @@ class Query {
 		}
 
 		// All of the aggregate methods are handled by a single method, so we'll
-		// catch them all here and then pass them off to the agregate method
+		// catch them all here and then pass them off to the aggregate method
 		// instead of creating methods for each one of them.
 		if (in_array($method, array('count', 'min', 'max', 'avg', 'sum')))
 		{

+ 10 - 10
laravel/database/query/grammars/grammar.php

@@ -13,7 +13,7 @@ class Grammar extends \Laravel\Database\Grammar {
 	public $datetime = 'Y-m-d H:i:s';
 
 	/**
-	 * All of the query componenets in the order they should be built.
+	 * All of the query components in the order they should be built.
 	 *
 	 * @var array
 	 */
@@ -125,7 +125,7 @@ class Grammar extends \Laravel\Database\Grammar {
 	protected function joins(Query $query)
 	{
 		// We need to iterate through each JOIN clause that is attached to the
-		// query an translate it into SQL. The table and the columns will be
+		// query and translate it into SQL. The table and the columns will be
 		// wrapped in identifiers to avoid naming collisions.
 		foreach ($query->joins as $join)
 		{
@@ -135,7 +135,7 @@ class Grammar extends \Laravel\Database\Grammar {
 
 			// Each JOIN statement may have multiple clauses, so we will iterate
 			// through each clause creating the conditions then we'll join all
-			// of the together at the end to build the clause.
+			// of them together at the end to build the clause.
 			foreach ($join->clauses as $clause)
 			{
 				extract($clause);
@@ -149,7 +149,7 @@ class Grammar extends \Laravel\Database\Grammar {
 
 			// The first clause will have a connector on the front, but it is
 			// not needed on the first condition, so we will strip it off of
-			// the condition before adding it to the arrya of joins.
+			// the condition before adding it to the array of joins.
 			$search = array('AND ', 'OR ');
 
 			$clauses[0] = str_replace($search, '', $clauses[0]);
@@ -343,7 +343,7 @@ class Grammar extends \Laravel\Database\Grammar {
 	}
 
 	/**
-	 * Compile a SQL INSERT statment from a Query instance.
+	 * Compile a SQL INSERT statement from a Query instance.
 	 *
 	 * This method handles the compilation of single row inserts and batch inserts.
 	 *
@@ -366,7 +366,7 @@ class Grammar extends \Laravel\Database\Grammar {
 		$columns = $this->columnize(array_keys(reset($values)));
 
 		// Build the list of parameter place-holders of values bound to the query.
-		// Each insert should have the same number of bound paramters, so we can
+		// Each insert should have the same number of bound parameters, so we can
 		// just use the first array of values.
 		$parameters = $this->parameterize(reset($values));
 
@@ -376,7 +376,7 @@ class Grammar extends \Laravel\Database\Grammar {
 	}
 
 	/**
-	 * Compile a SQL INSERT and get ID statment from a Query instance.
+	 * Compile a SQL INSERT and get ID statement from a Query instance.
 	 *
 	 * @param  Query   $query
 	 * @param  array   $values
@@ -389,7 +389,7 @@ class Grammar extends \Laravel\Database\Grammar {
 	}
 
 	/**
-	 * Compile a SQL UPDATE statment from a Query instance.
+	 * Compile a SQL UPDATE statement from a Query instance.
 	 *
 	 * @param  Query   $query
 	 * @param  array   $values
@@ -410,13 +410,13 @@ class Grammar extends \Laravel\Database\Grammar {
 		$columns = implode(', ', $columns);
 
 		// UPDATE statements may be constrained by a WHERE clause, so we'll run
-		// the entire where compilation process for those contraints. This is
+		// the entire where compilation process for those constraints. This is
 		// easily achieved by passing it to the "wheres" method.
 		return trim("UPDATE {$table} SET {$columns} ".$this->wheres($query));
 	}
 
 	/**
-	 * Compile a SQL DELETE statment from a Query instance.
+	 * Compile a SQL DELETE statement from a Query instance.
 	 *
 	 * @param  Query   $query
 	 * @return string

+ 1 - 1
laravel/database/query/grammars/postgres.php

@@ -5,7 +5,7 @@ use Laravel\Database\Query;
 class Postgres extends Grammar {
 
 	/**
-	 * Compile a SQL INSERT and get ID statment from a Query instance.
+	 * Compile a SQL INSERT and get ID statement from a Query instance.
 	 *
 	 * @param  Query   $query
 	 * @param  array   $values

+ 1 - 1
laravel/database/query/grammars/sqlserver.php

@@ -95,7 +95,7 @@ class SQLServer extends Grammar {
 
 		// Next we need to calculate the constraint that should be placed on
 		// the row number to get the correct offset and limit on the query.
-		// If there is not limit, we'll just handle the offset.
+		// If there is not a limit, we'll just handle the offset.
 		if ($query->limit > 0)
 		{
 			$finish = $query->offset + $query->limit;

+ 21 - 2
laravel/database/schema.php

@@ -40,6 +40,25 @@ class Schema {
 		return static::execute($table);
 	}
 
+	/**
+	 * Rename a database table in the schema.
+	 *
+	 * @param  string  $table
+	 * @param  string  $name
+	 * @return void
+	 */
+	public static function rename($table, $new_name)
+	{
+		$table = new Schema\Table($table);
+
+		// To indicate that the table needs to be renamed, we will run the
+		// "rename" command on the table instance and pass the instance to
+		// the execute method as calling a Closure isn't needed.
+		$table->rename($new_name);
+
+		return static::execute($table);
+	}
+
 	/**
 	 * Drop a database table from the schema.
 	 *
@@ -71,7 +90,7 @@ class Schema {
 	{
 		// The implications method is responsible for finding any fluently
 		// defined indexes on the schema table and adding the explicit
-		// commands that are needed to tbe schema instance.
+		// commands that are needed for the schema instance.
 		static::implications($table);
 
 		foreach ($table->commands as $command)
@@ -171,4 +190,4 @@ class Schema {
 		throw new \Exception("Schema operations not supported for [$driver].");
 	}
 
-}
+}

+ 15 - 0
laravel/database/schema/grammars/grammar.php

@@ -96,4 +96,19 @@ abstract class Grammar extends \Laravel\Database\Grammar {
 		return $this->{'type_'.$column->type}($column);
 	}
 
+	/**
+	 * Format a value so that it can be used in SQL DEFAULT clauses.
+	 * @param  mixed   $value
+	 * @return string
+	 */
+	protected function default_value($value)
+	{
+		if (is_bool($value))
+		{
+			return intval($value);
+		}
+
+		return strval($value);
+	}
+
 }

+ 17 - 5
laravel/database/schema/grammars/mysql.php

@@ -37,7 +37,7 @@ class MySQL extends Grammar {
 	}
 
 	/**
-	 * Geenrate the SQL statements for a table modification command.
+	 * Generate the SQL statements for a table modification command.
 	 *
 	 * @param  Table   $table
 	 * @param  Fluent  $command
@@ -47,7 +47,7 @@ class MySQL extends Grammar {
 	{
 		$columns = $this->columns($table);
 
-		// Once we the array of column definitions, we need to add "add" to the
+		// Once we have the array of column definitions, we need to add "add" to the
 		// front of each definition, then we'll concatenate the definitions
 		// using commas like normal and generate the SQL.
 		$columns = implode(', ', array_map(function($column)
@@ -128,7 +128,7 @@ class MySQL extends Grammar {
 	{
 		if ( ! is_null($column->default))
 		{
-			return " DEFAULT '".$column->default."'";
+			return " DEFAULT '".$this->default_value($column->default)."'";
 		}
 	}
 
@@ -212,6 +212,18 @@ class MySQL extends Grammar {
 		return 'ALTER TABLE '.$this->wrap($table)." ADD {$type} {$name}({$keys})";
 	}
 
+	/**
+	 * Generate the SQL statement for a rename table command.
+	 *
+	 * @param  Table    $table
+	 * @param  Fluent   $command
+	 * @return string
+	 */
+	public function rename(Table $table, Fluent $command)
+	{
+		return 'RENAME TABLE '.$this->wrap($table).' TO '.$this->wrap($command->name);
+	}
+
 	/**
 	 * Generate the SQL statement for a drop table command.
 	 *
@@ -284,7 +296,7 @@ class MySQL extends Grammar {
 	}
 
 	/**
-	 * Generate the SQL statement for a drop unqique key command.
+	 * Generate the SQL statement for a drop unique key command.
 	 *
 	 * @param  Table    $table
 	 * @param  Fluent   $command
@@ -353,7 +365,7 @@ class MySQL extends Grammar {
 	}
 
 	/**
-	 * Generate the data-type definintion for a decimal.
+	 * Generate the data-type definition for a decimal.
 	 *
 	 * @param  Fluent  $column
 	 * @return string

+ 18 - 6
laravel/database/schema/grammars/postgres.php

@@ -25,7 +25,7 @@ class Postgres extends Grammar {
 	}
 
 	/**
-	 * Geenrate the SQL statements for a table modification command.
+	 * Generate the SQL statements for a table modification command.
 	 *
 	 * @param  Table    $table
 	 * @param  Fluent   $command
@@ -35,7 +35,7 @@ class Postgres extends Grammar {
 	{
 		$columns = $this->columns($table);
 
-		// Once we the array of column definitions, we need to add "add" to the
+		// Once we have the array of column definitions, we need to add "add" to the
 		// front of each definition, then we'll concatenate the definitions
 		// using commas like normal and generate the SQL.
 		$columns = implode(', ', array_map(function($column)
@@ -101,7 +101,7 @@ class Postgres extends Grammar {
 	{
 		if ( ! is_null($column->default))
 		{
-			return " DEFAULT '".$column->default."'";
+			return " DEFAULT '".$this->default_value($column->default)."'";
 		}
 	}
 
@@ -198,6 +198,18 @@ class Postgres extends Grammar {
 		return $create." INDEX {$command->name} ON ".$this->wrap($table)." ({$columns})";
 	}
 
+	/**
+	 * Generate the SQL statement for a rename table command.
+	 *
+	 * @param  Table    $table
+	 * @param  Fluent   $command
+	 * @return string
+	 */
+	public function rename(Table $table, Fluent $command)
+	{
+		return 'ALTER TABLE '.$this->wrap($table).' RENAME TO '.$this->wrap($command->name);
+	}
+
 	/**
 	 * Generate the SQL statement for a drop table command.
 	 *
@@ -246,7 +258,7 @@ class Postgres extends Grammar {
 	}
 
 	/**
-	 * Generate the SQL statement for a drop unqique key command.
+	 * Generate the SQL statement for a drop unique key command.
 	 *
 	 * @param  Table    $table
 	 * @param  Fluent   $command
@@ -302,7 +314,7 @@ class Postgres extends Grammar {
 	 */
 	public function drop_foreign(Table $table, Fluent $command)
 	{
-		return $this->drop_constraint($table, $command);		
+		return $this->drop_constraint($table, $command);
 	}
 
 	/**
@@ -339,7 +351,7 @@ class Postgres extends Grammar {
 	}
 
 	/**
-	 * Generate the data-type definintion for a decimal.
+	 * Generate the data-type definition for a decimal.
 	 *
 	 * @param  Fluent  $column
 	 * @return string

+ 20 - 8
laravel/database/schema/grammars/sqlite.php

@@ -29,7 +29,7 @@ class SQLite extends Grammar {
 			return $value->type == 'primary';
 		});
 
-		// If we found primary key in the array of commands, we'll create the SQL for
+		// If we found primary keys in the array of commands, we'll create the SQL for
 		// the key addition and append it to the SQL table creation statement for
 		// the schema table so the index is properly generated.
 		if ( ! is_null($primary))
@@ -43,7 +43,7 @@ class SQLite extends Grammar {
 	}
 
 	/**
-	 * Geenrate the SQL statements for a table modification command.
+	 * Generate the SQL statements for a table modification command.
 	 *
 	 * @param  Table   $table
 	 * @param  Fluent  $command
@@ -53,7 +53,7 @@ class SQLite extends Grammar {
 	{
 		$columns = $this->columns($table);
 
-		// Once we the array of column definitions, we need to add "add" to the
+		// Once we have the array of column definitions, we need to add "add" to the
 		// front of each definition, then we'll concatenate the definitions
 		// using commas like normal and generate the SQL.
 		$columns = array_map(function($column)
@@ -87,7 +87,7 @@ class SQLite extends Grammar {
 		{
 			// Each of the data type's have their own definition creation method
 			// which is responsible for creating the SQL for the type. This lets
-			// us to keep the syntax easy and fluent, while translating the
+			// us keep the syntax easy and fluent, while translating the
 			// types to the types used by the database.
 			$sql = $this->wrap($column).' '.$this->type($column);
 
@@ -127,7 +127,7 @@ class SQLite extends Grammar {
 	{
 		if ( ! is_null($column->default))
 		{
-			return ' DEFAULT '.$this->wrap($column->default);
+			return ' DEFAULT '.$this->wrap($this->default_value($column->default));
 		}
 	}
 
@@ -201,6 +201,18 @@ class SQLite extends Grammar {
 		return $create." INDEX {$command->name} ON ".$this->wrap($table)." ({$columns})";
 	}
 
+	/**
+	 * Generate the SQL statement for a rename table command.
+	 *
+	 * @param  Table    $table
+	 * @param  Fluent   $command
+	 * @return string
+	 */
+	public function rename(Table $table, Fluent $command)
+	{
+		return 'ALTER TABLE '.$this->wrap($table).' RENAME TO '.$this->wrap($command->name);
+	}
+
 	/**
 	 * Generate the SQL statement for a drop table command.
 	 *
@@ -214,7 +226,7 @@ class SQLite extends Grammar {
 	}
 
 	/**
-	 * Generate the SQL statement for a drop unqique key command.
+	 * Generate the SQL statement for a drop unique key command.
 	 *
 	 * @param  Table   $table
 	 * @param  Fluent  $command
@@ -226,7 +238,7 @@ class SQLite extends Grammar {
 	}
 
 	/**
-	 * Generate the SQL statement for a drop unqique key command.
+	 * Generate the SQL statement for a drop unique key command.
 	 *
 	 * @param  Table   $table
 	 * @param  Fluent  $command
@@ -283,7 +295,7 @@ class SQLite extends Grammar {
 	}
 
 	/**
-	 * Generate the data-type definintion for a decimal.
+	 * Generate the data-type definition for a decimal.
 	 *
 	 * @param  Fluent  $column
 	 * @return string

+ 19 - 7
laravel/database/schema/grammars/sqlserver.php

@@ -32,7 +32,7 @@ class SQLServer extends Grammar {
 	}
 
 	/**
-	 * Geenrate the SQL statements for a table modification command.
+	 * Generate the SQL statements for a table modification command.
 	 *
 	 * @param  Table   $table
 	 * @param  Fluent  $command
@@ -42,7 +42,7 @@ class SQLServer extends Grammar {
 	{
 		$columns = $this->columns($table);
 
-		// Once we the array of column definitions, we need to add "add" to the
+		// Once we have the array of column definitions, we need to add "add" to the
 		// front of each definition, then we'll concatenate the definitions
 		// using commas like normal and generate the SQL.
 		$columns = implode(', ', array_map(function($column)
@@ -108,7 +108,7 @@ class SQLServer extends Grammar {
 	{
 		if ( ! is_null($column->default))
 		{
-			return " DEFAULT '".$column->default."'";
+			return " DEFAULT '".$this->default_value($column->default)."'";
 		}
 	}
 
@@ -212,6 +212,18 @@ class SQLServer extends Grammar {
 		return $create." INDEX {$command->name} ON ".$this->wrap($table)." ({$columns})";
 	}
 
+	/**
+	 * Generate the SQL statement for a rename table command.
+	 *
+	 * @param  Table    $table
+	 * @param  Fluent   $command
+	 * @return string
+	 */
+	public function rename(Table $table, Fluent $command)
+	{
+		return 'ALTER TABLE '.$this->wrap($table).' RENAME TO '.$this->wrap($command->name);
+	}
+
 	/**
 	 * Generate the SQL statement for a drop table command.
 	 *
@@ -235,7 +247,7 @@ class SQLServer extends Grammar {
 	{
 		$columns = array_map(array($this, 'wrap'), $command->columns);
 
-		// Once we the array of column names, we need to add "drop" to the front
+		// Once we have the array of column names, we need to add "drop" to the front
 		// of each column, then we'll concatenate the columns using commas and
 		// generate the alter statement SQL.
 		$columns = implode(', ', array_map(function($column)
@@ -260,7 +272,7 @@ class SQLServer extends Grammar {
 	}
 
 	/**
-	 * Generate the SQL statement for a drop unqiue key command.
+	 * Generate the SQL statement for a drop unique key command.
 	 *
 	 * @param  Table   $table
 	 * @param  Fluent  $command
@@ -320,7 +332,7 @@ class SQLServer extends Grammar {
 	 */
 	public function drop_foreign(Table $table, Fluent $command)
 	{
-		return $this->drop_constraint($table, $command);		
+		return $this->drop_constraint($table, $command);
 	}
 
 	/**
@@ -357,7 +369,7 @@ class SQLServer extends Grammar {
 	}
 
 	/**
-	 * Generate the data-type definintion for a decimal.
+	 * Generate the data-type definition for a decimal.
 	 *
 	 * @param  Fluent  $column
 	 * @return string

+ 11 - 0
laravel/database/schema/table.php

@@ -144,6 +144,17 @@ class Table {
 		return $this->command($type, compact('name', 'columns'));
 	}
 
+	/**
+	 * Rename the database table.
+	 *
+	 * @param  string  $name
+	 * @return Fluent
+	 */
+	public function rename($name)
+	{
+		return $this->command(__FUNCTION__, compact('name'));
+	}
+
 	/**
 	 * Drop the database table.
 	 *

+ 8 - 0
laravel/documentation/artisan/commands.md

@@ -2,6 +2,7 @@
 
 ## Contents
 
+- [Help](#help)
 - [Application Configuration](#application-configuration)
 - [Sessions](#sessions)
 - [Migrations](#migrations)
@@ -12,6 +13,13 @@
 - [Application Keys](#keys)
 - [CLI Options](#cli-options)
 
+<a name="help"></a>
+## Help
+
+Description  | Command
+------------- | -------------
+View a list of available artisan commands. | `php artisan help:commands`
+
 <a name="application-configuration"></a>
 ## Application Configuration <small>[(More Information)](/docs/install#basic-configuration)</small>
 

+ 1 - 1
laravel/documentation/bundles.md

@@ -21,7 +21,7 @@ Bundles are the heart of the improvements that were made in Laravel 3.0. They ar
 <a name="creating-and-registering"></a>
 ## Creating Bundles
 
-The first step in creating a bundle is to create a folder for the bundle within your **bundles** directory. For this example, let's create an "admin" bundle, which could house the administrator back-end to our application. The **application/start.php** file provides some basic configuration that helps to define how our application will run. Likewise we'll create a **start.php** file within our new bundle folder for the same purpose. It is run everytime the bundle is loaded. Let's create it:
+The first step in creating a bundle is to create a folder for the bundle within your **bundles** directory. For this example, let's create an "admin" bundle, which could house the administrator back-end to our application. The **application/start.php** file provides some basic configuration that helps to define how our application will run. Likewise we'll create a **start.php** file within our new bundle folder for the same purpose. It is run every time the bundle is loaded. Let's create it:
 
 #### Creating a bundle start.php file:
 

+ 1 - 0
laravel/documentation/changes.md

@@ -38,6 +38,7 @@
 
 - Speed up many to many eager loading mapping.
 - Tweak the Eloquent::changed() method.
+- Added support for locales in the URI.
 
 <a name="upgrade-3.2.3"></a>
 ## Upgrading From 3.2.3

+ 9 - 2
laravel/documentation/contents.md

@@ -18,7 +18,8 @@
 	- [Route Groups](/docs/routing#groups)
 	- [Named Routes](/docs/routing#named-routes)
 	- [HTTPS Routes](/docs/routing#https-routes)
-	- [Bundle Routing](/docs/routing#bundle-routing)
+	- [Bundle Routes](/docs/routing#bundle-routes)
+	- [Controller Routing](/docs/routing#controller-routing)
 	- [CLI Route Testing](/docs/routing#cli-route-testing)
 - [Controllers](/docs/controllers)
 	- [The Basics](/docs/controllers#the-basics)
@@ -108,4 +109,10 @@
 	- [Creating & Running Tasks](/docs/artisan/tasks#creating-tasks)
 	- [Bundle Tasks](/docs/artisan/tasks#bundle-tasks)
 	- [CLI Options](/docs/artisan/tasks#cli-options)
-- [Commands](/docs/artisan/commands)
+- [Commands](/docs/artisan/commands)
+
+### Contributing
+
+- [Laravel on GitHub](docs/contrib/github)
+- [Command Line](docs/contrib/command-line)
+- [TortoiseGit](docs/contrib/tortoisegit)

+ 127 - 0
laravel/documentation/contrib/command-line.md

@@ -0,0 +1,127 @@
+# Contributing to Laravel via Command-Line
+
+## Contents
+ - [Getting Started](#getting-started)
+ - [Forking Laravel](#forking-laravel)
+ - [Cloning Laravel](#cloning-laravel)
+ - [Adding your Fork](#adding-your-fork)
+ - [Creating Branches](#creating-branches)
+ - [Committing](#committing)
+ - [Submitting a Pull Request](#submitting-a-pull-request)
+ - [What's Next?](#whats-next)
+
+<a name='getting-started'></a>
+## Getting Started
+
+This tutorial explains the basics of contributing to a project on [GitHub](https://github.com/) via the command-line. The workflow can apply to most projects on GitHub, but in this case, we will be focused on the [Laravel](https://github.com/laravel/laravel) project. This tutorial is applicable to OSX, Linux and Windows.
+
+This tutorial assumes you have installed [Git](http://git-scm.com/) and you have created a [GitHub account](https://github.com/signup/free). If you haven't already, look at the [Laravel on GitHub](/docs/contrib/github) documentation in order to familiarize yourself with Laravel's repositories and branches.
+
+<a name='forking-laravel'></a>
+## Forking Laravel
+
+Login to GitHub and visit the [Laravel Repository](https://github.com/laravel/laravel). Click on the **Fork** button. This will create your own fork of Laravel in your own GitHub account. Your Laravel fork will be located at **https://github.com/username/laravel** (your GitHub username will be used in place of *username*).
+
+<a name='cloning-laravel'></a>
+## Cloning Laravel
+
+Open up the command-line or terminal and make a new directory where you can make development changes to Laravel:
+
+	# mkdir laravel-develop
+	# cd laravel-develop
+
+Next, clone the Laravel repository (not your fork you made):
+
+	# git clone https://github.com/laravel/laravel.git .
+
+> **Note**: The reason you are cloning the original Laravel repository (and not the fork you made) is so you can always pull down the most recent changes from the Laravel repository to your local repository.
+
+<a name='adding-your-fork'></a>
+## Adding your Fork
+
+Next, it's time to add the fork you made as a **remote repository**:
+
+	# git remote add fork git@github.com:username/laravel.git
+
+Remember to replace *username** with your GitHub username. *This is case-sensitive*. You can verify that your fork was added by typing:
+
+	# git remote
+
+Now you have a pristine clone of the Laravel repository along with your fork as a remote repository. You are ready to begin branching for new features or fixing bugs.
+
+<a name='creating-branches'></a>
+## Creating Branches
+
+First, make sure you are working in the **develop** branch. If you submit changes to the **master** branch, it is unlikely they will be pulled in anytime in the near future. For more information on this, read the documentation for [Laravel on GitHub](/docs/contrib/github). To switch to the develop branch:
+
+	# git checkout develop
+
+Next, you want to make sure you are up-to-date with the latest Laravel repository. If any new features or bug fixes have been added to the Laravel project since you cloned it, this will ensure that your local repository has all of those changes. This important step is the reason we originally cloned the Laravel repository instead of your own fork.
+
+	# git pull origin develop
+
+Now you are ready to create a new branch for your new feature or bug-fix. When you create a new branch, use a self-descriptive naming convention. For example, if you are going to fix a bug in Eloquent, name your branch *bug/eloquent*:
+
+	# git branch bug/eloquent
+	# git checkout bug/eloquent
+	Switched to branch 'bug/eloquent'
+
+Or if there is a new feature to add or change to the documentation that you want to make, for example, the localization documentation:
+
+	# git branch feature/localization-docs
+	# git checkout feature/localization-docs
+	Switched to branch 'feature/localization-docs'
+
+> **Note:** Create one new branch for every new feature or bug-fix. This will encourage organization, limit interdependency between new features/fixes and will make it easy for the Laravel team to merge your changes into the Laravel core.
+
+Now that you have created your own branch and have switched to it, it's time to make your changes to the code. Add your new feature or fix that bug.
+
+<a name='committing'></a>
+## Committing
+
+Now that you have finished coding and testing your changes, it's time to commit them to your local repository. First, add the files that you changed/added:
+
+	# git add laravel/documentation/localization.md
+
+Next, commit the changes to the repository:
+
+	# git commit -s -m "I added some more stuff to the Localization documentation."
+
+ - **-s** means that you are signing-off on your commit with your name. This tells the Laravel team know that you personally agree to your code being added to the Laravel core.
+ - **-m** is the message that goes with your commit. Provide a brief explanation of what you added or changed.
+
+<a name='pushing-to-your-fork'></a>
+## Pushing to your Fork
+
+Now that your local repository has your committed changes, it's time to push (or sync) your new branch to your fork that is hosted in GitHub:
+
+	# git push fork feature/localization-docs
+
+Your branch has been successfully pushed to your fork on GitHub.
+
+<a name='submitting-a-pull-request'></a>
+## Submitting a Pull Request
+
+The final step is to submit a pull request to the Laravel repository. This means that you are requesting that the Laravel team pull and merge your changes to the Laravel core. In your browser, visit your Laravel fork at [https://github.com/username/laravel](https://github.com/username/laravel). Click on **Pull Request**. Next, make sure you choose the proper base and head repositories and branches:
+
+ - **base repo:** laravel/laravel
+ - **base branch:** develop
+ - **head repo:** username/laravel
+ - **head branch:** feature/localization-docs
+
+Use the form to write a more detailed description of the changes you made and why you made them. Finally, click **Send pull request**. That's it! The changes you made have been submitted to the Laravel team.
+
+<a name='whats-next'></a>
+## What's Next?
+
+Do you have another feature you want to add or another bug you need to fix? First, make sure you always base your new branch off of the develop branch:
+
+	# git checkout develop
+
+Then, pull down the latest changes from Laravel's repository:
+
+	# git pull origin develop
+
+Now you are ready to create a new branch and start coding again!
+
+> [Jason Lewis](http://jasonlewis.me/)'s blog post [Contributing to a GitHub Project](http://jasonlewis.me/blog/2012/06/how-to-contributing-to-a-github-project) was the primary inspiration for this tutorial.

+ 35 - 0
laravel/documentation/contrib/github.md

@@ -0,0 +1,35 @@
+# Laravel on GitHub
+
+## Contents
+
+- [The Basics](#the-basics)
+- [Repositories](#repositoriess)
+- [Branches](#branches)
+
+<a name='the-basics'></a>
+## The Basics
+
+Because Laravel's development and source control is done through GitHub, anyone is able to make contributions to it. Anyone can fix bugs, add features or improve the documentation.
+
+After submitting proposed changes to the project, the Laravel team will review the changes and make the decision to commit them to Laravel's core.
+
+<a name='repositories'></a>
+## Repositories
+
+Laravel's home on GitHub is at [github.com/laravel](https://github.com/laravel). Laravel has several repositories. For basic contributions, the only repository you need to pay attention to is the **laravel** repository, located at [github.com/laravel/laravel](https://github.com/laravel/laravel).
+
+<a name='branches'></a>
+## Branches
+
+The **laravel** repository has multiple branches, each serving a specific purpose:
+
+- **master** - This is the Laravel release branch. Active development does not happen on this branch. This branch is only for the most recent, stable Laravel core code. When you download Laravel from [laravel.com](http://laravel.com/), you are downloading directly from this master branch. *Do not make pull requests to this branch.*
+- **staging** - I'm not sure what this is for... Last minute testing before pushing develop to master?
+- **develop** - This is the working development branch. All proposed code changes and contributions by the community are pulled into this branch. *When you make a pull request to the Laravel project, this is the branch you want to pull-request into.*
+
+Once certain milestones have been reached and/or Taylor Otwell and the Laravel team is happy with the stability and additional features of the current development branch, the changes in the **develop** branch are pulled into the **master** branch, thus creating and releasing the newest stable version of Laravel for the world to use.
+
+*Further Reading*
+
+ - [Contributing to Laravel via Command-Line](docs/contrib/command-line)
+ - [Contributing to Laravel using TortoiseGit](docs/contrib/tortoisegit)

+ 113 - 0
laravel/documentation/contrib/tortoisegit.md

@@ -0,0 +1,113 @@
+# Contributing to Laravel using TortoiseGit
+
+## Contents
+ - [Getting Started](#getting-started)
+ - [Forking Laravel](#forking-laravel)
+ - [Cloning Laravel](#cloning-laravel)
+ - [Adding your Fork](#adding-your-fork)
+ - [Creating Branches](#creating-branches)
+ - [Committing](#committing)
+ - [Submitting a Pull Request](#submitting-a-pull-request)
+ - [What's Next?](#whats-next)
+
+<a name='getting-started'></a>
+## Getting Started
+
+This tutorial explains the basics of contributing to a project on [GitHub](https://github.com/) using [TortoiseGit](http://code.google.com/p/tortoisegit/) for Windows. The workflow can apply to most projects on GitHub, but in this case, we will be focused on the [Laravel](https://github.com/laravel/laravel) project.
+
+This tutorial assumes you have installed TortoiseGit for Windows and you have created a GitHub account. If you haven't already, look at the [Laravel on GitHub](/docs/contrib/github) documentation in order to familiarize yourself with Laravel's repositories and branches.
+
+<a name='forking-laravel'></a>
+## Forking Laravel
+
+Login to GitHub and visit the [Laravel Repository](https://github.com/laravel/laravel). Click on the **Fork** button. This will create your own fork of Laravel in your own GitHub account. Your Laravel fork will be located at **https://github.com/username/laravel** (your GitHub username will be used in place of *username*).
+
+<a name='cloning-laravel'></a>
+## Cloning Laravel
+
+Open up Windows Explorer and create a new directory where you can make development changes to Laravel.
+
+ - Right-click the Laravel directory to bring up the context menu. Click on **Git Clone...**
+ - Git clone
+  - **Url:** https://github.com/laravel/laravel.git
+  - **Directory:** the directory that you just created in the previous step
+  - Click **OK**
+
+> **Note**: The reason you are cloning the original Laravel repository (and not the fork you made) is so you can always pull down the most recent changes from the Laravel repository to your local repository.
+
+<a name='adding-your-fork'></a>
+## Adding your Fork
+
+After the cloning process is complete, it's time to add the fork you made as a **remote repository**.
+
+ - Right-click the Laravel directory and goto **TortoiseGit > Settings**
+ - Goto the **Git/Remote** section. Add a new remote:
+  - **Remote**: fork
+  - **URL**: https://github.com/username/laravel.git
+  - Click **Add New/Save**
+  - Click **OK**
+
+Remember to replace *username* with your GitHub username. *This is case-sensitive*.
+
+<a name='creating-branches'></a>
+## Creating Branches
+
+Now you are ready to create a new branch for your new feature or bug-fix. When you create a new branch, use a self-descriptive naming convention. For example, if you are going to fix a bug in Eloquent, name your branch *bug/eloquent*. Or if you were going to make changes to the localization documentation, name your branch *feature/localization-docs*. A good naming convention will encourage organization and help others understand the purpose of your branch.
+
+ - Right-click the Laravel directory and goto **TortoiseGit > Create Branch**
+  - **Branch:** feature/localization-docs
+  - **Base On Branch:** remotes/origin/develop
+  - **Check** *Track*
+  - **Check** *Switch to new branch*
+  - Click **OK**
+
+This will create your new *feature/localization-docs* branch and switch you to it.
+
+> **Note:** Create one new branch for every new feature or bug-fix. This will encourage organization, limit interdependency between new features/fixes and will make it easy for the Laravel team to merge your changes into the Laravel core.
+
+Now that you have created your own branch and have switched to it, it's time to make your changes to the code. Add your new feature or fix that bug.
+
+<a name='committing'></a>
+##Committing
+
+Now that you have finished coding and testing your changes, it's time to commit them to your local repository:
+
+ - Right-click the Laravel directory and goto **Git Commit -> "feature/localization-docs"...**
+ - Commit
+  - **Message:** Provide a brief explaination of what you added or changed
+  - Click **Sign** - This tells the Laravel team know that you personally agree to your code being added to the Laravel core
+  - **Changes made:** Check all changed/added files
+  - Click **OK**
+
+<a name='pushing-to-your-fork'></a>
+## Pushing to your Fork
+
+Now that your local repository has your committed changes, it's time to push (or sync) your new branch to your fork that is hosted in GitHub:
+
+- Right-click the Laravel directory and goto **Git Sync...**
+- Git Syncronization
+ - **Local Branch:** feature/localization-docs
+ - **Remote Branch:** leave this blank
+ - **Remote URL:** fork
+ - Click **Push**
+ - When asked for "username:" enter your GitHub *case-sensitive* username
+ - When asked for "password:" enter your GitHub *case-sensitive* account
+
+Your branch has been successfully pushed to your fork on GitHub.
+
+<a name='submitting-a-pull-request'></a>
+## Submitting a Pull Request
+
+The final step is to submit a pull request to the Laravel repository. This means that you are requesting that the Laravel team pull and merge your changes to the Laravel core. In your browser, visit your Laravel fork at [https://github.com/username/laravel](https://github.com/username/laravel). Click on **Pull Request**. Next, make sure you choose the proper base and head repositories and branches:
+
+ - **base repo:** laravel/laravel
+ - **base branch:** develop
+ - **head repo:** username/laravel
+ - **head branch:** feature/localization-docs
+
+Use the form to write a more detailed description of the changes you made and why you made them. Finally, click **Send pull request**. That's it! The changes you made have been submitted to the Laravel team.
+
+<a name='whats-next'></a>
+## What's Next?
+
+Do you have another feature you want to add or another bug you need to fix? Just follow the same instructions as before in the [Creating Branches](#creating-branches) section. Just remember to always create a new branch for every new feature/fix and don't forget to always base your new branches off of the *remotes/origin/develop* branch.

+ 1 - 1
laravel/documentation/controllers.md

@@ -49,7 +49,7 @@ Check [the routing page](/docs/routing#controller-routing) for more information
 <a name="bundle-controllers"></a>
 ## Bundle Controllers
 
-Bundles are Laravel's modular package system. Bundles can easily configured to handle requests to your application. We'll be going over [bundles in more detail](/docs/bundles) in another document.
+Bundles are Laravel's modular package system. Bundles can be easily configured to handle requests to your application. We'll be going over [bundles in more detail](/docs/bundles) in another document.
 
 Creating controllers that belong to bundles is almost identical to creating your application controllers. Just prefix the controller class name with the name of the bundle, so if your bundle is named "admin", your controller classes would look like this:
 

+ 25 - 1
laravel/documentation/database/config.md

@@ -5,6 +5,7 @@
 - [Quick Start Using SQLite](#quick)
 - [Configuring Other Databases](#server)
 - [Setting The Default Connection Name](#default)
+- [Overwriting The Default PDO Options](#options)
 
 Laravel supports the following databases out of the box:
 
@@ -43,4 +44,27 @@ As you have probably noticed, each database connection defined in the **applicat
 
 	'default' => 'sqlite';
 
-The default connection will always be used by the [fluent query builder](/docs/database/fluent). If you need to change the default connection during a request, use the **Config::set** method.
+The default connection will always be used by the [fluent query builder](/docs/database/fluent). If you need to change the default connection during a request, use the **Config::set** method.
+
+<a href="options"></a>
+##Overwriting The Default PDO Options
+
+The PDO connector class (**laravel/database/connectors/connector.php**) has a set of default PDO attributes defined which can be overwritten in the options array for each system. For example, one of the default attributes is to force column names to lowercase (**PDO::CASE_LOWER**) even if they are defined in UPPERCASE or CamelCase in the table. Therefore, under the default attributes, query result object variables would only be accessible in lowercase.
+An example of the MySQL system settings with added default PDO attributes:
+
+	'mysql' => array(
+		'driver'   => 'mysql',
+		'host'     => 'localhost',
+		'database' => 'database',
+		'username' => 'root',
+		'password' => '',
+		'charset'  => 'utf8',
+		'prefix'   => '',
+		PDO::ATTR_CASE              => PDO::CASE_LOWER,
+		PDO::ATTR_ERRMODE           => PDO::ERRMODE_EXCEPTION,
+		PDO::ATTR_ORACLE_NULLS      => PDO::NULL_NATURAL,
+		PDO::ATTR_STRINGIFY_FETCHES => false,
+		PDO::ATTR_EMULATE_PREPARES  => false,
+	),
+
+More about the PDO connection attributes can be found [in the PHP manual](http://php.net/manual/en/pdo.setattribute.php).

+ 28 - 6
laravel/documentation/database/eloquent.md

@@ -15,6 +15,7 @@
 - [Setter & Getter Methods](#getter-and-setter-methods)
 - [Mass-Assignment](#mass-assignment)
 - [Converting Models To Arrays](#to-array)
+- [Deleting Models](#delete)
 
 <a name="the-basics"></a>
 ## The Basics
@@ -223,7 +224,7 @@ Want to join on a different foreign key? No problem. Just pass it in the second
 
 	return $this->has_many('Comment', 'my_foreign_key');
 
-You may be wondering: _If the dynamic properties return the relationship and require less keystokes, why would I ever use the relationship methods?_ Actually, relationship methods are very powerful. They allow you to continue to chain query methods before retrieving the relationship. Check this out:
+You may be wondering: _If the dynamic properties return the relationship and require less keystrokes, why would I ever use the relationship methods?_ Actually, relationship methods are very powerful. They allow you to continue to chain query methods before retrieving the relationship. Check this out:
 
 	echo Post::find(1)->comments()->order_by('votes', 'desc')->take(10)->get();
 
@@ -242,8 +243,9 @@ Many-to-many relationships are the most complicated of the three relationships.
 	id   - INTEGER
 	name - VARCHAR
 
-**Roles_Users:**
+**Role_User:**
 
+    id      - INTEGER
 	user_id - INTEGER
 	role_id - INTEGER
 
@@ -277,6 +279,17 @@ As you may have noticed, the default name of the intermediate table is the singu
 
 	}
 
+By default only certain fields from the pivot table will be returned (the two **id** fields, and the timestamps). If your pivot table contains additional columns, you can fetch them too by using the **with()** method :
+
+	class User extends Eloquent {
+
+	     public function roles()
+	     {
+	          return $this->has_many_and_belongs_to('Role', 'user_roles')->with('column');
+	     }
+
+	}
+
 <a name="inserting-related-models"></a>
 ## Inserting Related Models
 
@@ -319,7 +332,7 @@ However, you may often only want to insert a new record into the intermediate ta
 	$user->roles()->attach($role_id);
 
 It's also possible to attach data for fields in the intermediate table (pivot table), to do this add a second array variable to the attach command containing the data you want to attach:
-	
+
 	$user->roles()->attach($role_id, array('expires' => $expires));
 
 <a name="sync-method"></a>
@@ -415,14 +428,14 @@ If you find yourself eager loading the same models often, you may want to use **
 	class Book extends Eloquent {
 
 	     public $includes = array('author');
-	     
+
 	     public function author()
 	     {
 	          return $this->belongs_to('Author');
 	     }
 
 	}
-	
+
 **$includes** takes the same arguments that **with** takes. The following is now eagerly loaded.
 
 	foreach (Book::all() as $book)
@@ -524,4 +537,13 @@ Sometimes you may wish to limit the attributes that are included in your model's
 
 		public static $hidden = array('password');
 
-	}
+	}
+
+<a name="delete"></a>
+## Deleting Models
+
+Because Eloquent inherits all the features and methods of Fluent queries, deleting models is a snap:
+
+	$author->delete();
+
+Note, however, than this won't delete any related models (e.g. all the author's Book models will still exist), unless you have set up [foreign keys](/docs/database/schema#foreign-keys) and cascading deletes.

+ 1 - 1
laravel/documentation/database/fluent.md

@@ -169,7 +169,7 @@ You may also specify multiple conditions for an **ON** clause by passing a Closu
 			$join->on('users.id', '=', 'phone.user_id');
 			$join->or_on('users.id', '=', 'phone.contact_id');
 		})
-		->get(array('users.email', 'phone.numer'));
+		->get(array('users.email', 'phone.number'));
 
 <a name="ordering"></a>
 ## Ordering Results

+ 2 - 1
laravel/documentation/database/schema.md

@@ -13,7 +13,7 @@
 <a name="the-basics"></a>
 ## The Basics
 
-The Schema Bulder provides methods for creating and modifying your database tables. Using a fluent syntax, you can work with your tables without using any vendor specific SQL.
+The Schema Builder provides methods for creating and modifying your database tables. Using a fluent syntax, you can work with your tables without using any vendor specific SQL.
 
 *Further Reading:*
 
@@ -69,6 +69,7 @@ Command  | Description
 `$table->text('description');`  |  TEXT equivalent to the table
 `$table->blob('data');`  |  BLOB equivalent to the table
 `->nullable()`  |  Designate that the column allows NULL values
+`->default($value)`  |  Declare a default value for a column
 
 > **Note:** Laravel's "boolean" type maps to a small integer column on all database systems.
 

+ 9 - 1
laravel/documentation/files.md

@@ -4,6 +4,7 @@
 
 - [Reading Files](#get)
 - [Writing Files](#put)
+- [Removing files](#delete)
 - [File Uploads](#upload)
 - [File Extensions](#ext)
 - [Checking File Types](#is)
@@ -29,6 +30,13 @@
 
 	File::append('path/to/file', 'appended file content');
 
+<a name="delete"></a>
+## Removing Files
+
+#### Deleting a single file:
+
+	File::delete('path/to/file');
+
 <a name="upload"></a>
 ## File Uploads
 
@@ -65,7 +73,7 @@ The **is** method does not simply check the file extension. The Fileinfo PHP ext
 
 #### Getting the MIME type associated with an extension:
 
-	echo File::mime('gif');
+	echo File::mime('gif'); // outputs 'image/gif'
 
 > **Note:** This method simply returns the MIME type defined for the extension in the **application/config/mimes.php** file.
 

+ 1 - 1
laravel/documentation/ioc.md

@@ -24,7 +24,7 @@ IoC containers help make your application more flexible and testable. Since you
 	});
 
 
-Great! Now we have registered a resolver for SwiftMailer in our container. But, what if we don't want the container to create a new mailer instance every time we need one? Maybe we just want the container to return the same instance after the intial instance is created. Just tell the container the object should be a singleton:
+Great! Now we have registered a resolver for SwiftMailer in our container. But, what if we don't want the container to create a new mailer instance every time we need one? Maybe we just want the container to return the same instance after the initial instance is created. Just tell the container the object should be a singleton:
 
 #### Registering a singleton in the container:
 

+ 1 - 1
laravel/documentation/localization.md

@@ -55,7 +55,7 @@ Need to retrieve the line in a language other than your default? Not a problem.
 <a name="replace"></a>
 ## Place Holders & Replacements
 
-Now, let's work on our welcome message. "Welcome to our website!" is a pretty generic message. It would be helpful to be able to specify the name of the person we are welcoming. But, creating a language line for each user of our application would be time-consuming and ridiculous. Thankfully, you don't have to. You can specify "place-holders" within your language lines. Place-holders are preceeded by a colon:
+Now, let's work on our welcome message. "Welcome to our website!" is a pretty generic message. It would be helpful to be able to specify the name of the person we are welcoming. But, creating a language line for each user of our application would be time-consuming and ridiculous. Thankfully, you don't have to. You can specify "place-holders" within your language lines. Place-holders are preceded by a colon:
 
 #### Creating a language line with place-holders:
 

+ 1 - 1
laravel/documentation/logging.md

@@ -24,7 +24,7 @@ The **detail** option indicates if the framework should display the error messag
 
 To enable logging, set the **log** option in the error configuration to "true". When enabled, the Closure defined by the **logger** configuration item will be executed when an error occurs. This gives you total flexibility in how the error should be logged. You can even e-mail the errors to your development team!
 
-By default, logs are stored in the **storage/logs** direcetory, and a new log file is created for each day. This keeps your log files from getting crowded with too many messages.
+By default, logs are stored in the **storage/logs** directory, and a new log file is created for each day. This keeps your log files from getting crowded with too many messages.
 
 <a name="the-logger-class"></a>
 ## The Logger Class

+ 1 - 1
laravel/documentation/requests.md

@@ -62,7 +62,7 @@ Sometimes you may need to determine if the current URI is a given string, or beg
 		// This request is over HTTPS!
 	}
 
-#### Determing if the current request is an AJAX request:
+#### Determining if the current request is an AJAX request:
 
 	if (Request::ajax())
 	{

+ 3 - 3
laravel/documentation/routing.md

@@ -4,7 +4,7 @@
 
 - [The Basics](#the-basics)
 - [Wildcards](#wildcards)
-- [The 404 Events](#the-404-event)
+- [The 404 Event](#the-404-event)
 - [Filters](#filters)
 - [Pattern Filters](#pattern-filters)
 - [Global Filters](#global-filters)
@@ -99,14 +99,14 @@ If a request enters your application but does not match any existing route, the
 
 You are free to change this to fit the needs of your application!
 
-*Futher Reading:*
+*Further Reading:*
 
 - *[Events](/docs/events)*
 
 <a name="filters"></a>
 ## Filters
 
-Route filters may be run before or after a route is executed. If a "before" filter returns a value, that value is considered the response to the request and the route is not executed, which is conveniont when implementing authentication filters, etc. Filters are typically defined in **application/routes.php**.
+Route filters may be run before or after a route is executed. If a "before" filter returns a value, that value is considered the response to the request and the route is not executed, which is convenient when implementing authentication filters, etc. Filters are typically defined in **application/routes.php**.
 
 #### Registering a filter:
 

+ 2 - 2
laravel/documentation/validation.md

@@ -366,7 +366,7 @@ In the example above, the custom required message will be used for the email att
 
 However, if you are using many custom error messages, specifying inline may become cumbersome and messy. For that reason, you can specify your custom messages in the **custom** array within the validation language file:
 
-#### Adding custom error messages to the validation langauge file:
+#### Adding custom error messages to the validation language file:
 
 	'custom' => array(
 		'email_required' => 'We need to know your e-mail address!',
@@ -417,7 +417,7 @@ As mentioned above, you may even specify and receive a list of parameters in you
 	Validator::register('awesome', function($attribute, $value, $parameters)
 	{
 	    return $value == $parameters[0];
-	}
+	});
 
 In this case, the parameters argument of your validation rule would receive an array containing one element: "yes".
 

+ 3 - 3
laravel/documentation/views/home.md

@@ -54,9 +54,9 @@ Sometimes you will need a little more control over the response sent to the brow
 		return Response::make('Hello World!', 200, $headers);
 	});
 
-#### Returning a custom response containing a view:
+#### Returning a custom response containing a view, with binding data:
 
-	return Response::view('home', 200, $headers);
+	return Response::view('home', array('foo' => 'bar'));
 
 #### Returning a JSON response:
 
@@ -257,4 +257,4 @@ To generating proper error responses simply specify the response code that you w
 
 #### Generating a 500 error response:
 
-	return Response::error('500');
+	return Response::error('500');

+ 1 - 1
laravel/documentation/views/html.md

@@ -15,7 +15,7 @@
 <a name="entities"></a>
 ## Entities
 
-When displaying user input in your Views, it is important to convert all characters which have signifance in HTML to their "entity" representation.
+When displaying user input in your Views, it is important to convert all characters which have significance in HTML to their "entity" representation.
 
 For example, the < symbol should be converted to its entity representation. Converting HTML characters to their entity representation helps protect your application from cross-site scripting:
 

+ 20 - 16
laravel/documentation/views/pagination.md

@@ -22,6 +22,10 @@ Let's walk through a complete example of paginating using the [Fluent Query Buil
 
 	$orders = DB::table('orders')->paginate($per_page);
 
+You can also pass an optional array of table columns to select in the query:
+
+	$orders = DB::table('orders')->paginate($per_page, array('id', 'name', 'created_at'));
+
 #### Display the results in a view:
 
 	<?php foreach ($orders->results as $order): ?>
@@ -75,30 +79,30 @@ Sometimes you may need to create a Paginator instance manually, without using th
 
 All pagination link elements can be style using CSS classes. Here is an example of the HTML elements generated by the links method:
 
-    <div class="pagination">
-        <a href="foo" class="previous_page">Previous</a>
+	<div class="pagination">
+		<a href="foo" class="previous_page">Previous</a>
 
-        <a href="foo">1</a>
-        <a href="foo">2</a>
+		<a href="foo">1</a>
+		<a href="foo">2</a>
 
-        <span class="dots">...</span>
+		<span class="dots">...</span>
 
-        <a href="foo">11</a>
-        <a href="foo">12</a>
+		<a href="foo">11</a>
+		<a href="foo">12</a>
 
-        <span class="current">13</span>
+		<span class="current">13</span>
 
-        <a href="foo">14</a>
-        <a href="foo">15</a>
+		<a href="foo">14</a>
+		<a href="foo">15</a>
 
-        <span class="dots">...</span>
+		<span class="dots">...</span>
 
-        <a href="foo">25</a>
-        <a href="foo">26</a>
+		<a href="foo">25</a>
+		<a href="foo">26</a>
 
-        <a href="foo" class="next_page">Next</a>
-    </div>
+		<a href="foo" class="next_page">Next</a>
+	</div>
 
 When you are on the first page of results, the "Previous" link will be disabled. Likewise, the "Next" link will be disabled when you are on the last page of results. The generated HTML will look like this:
 
-	<span class="disabled prev_page">Previous</span>
+	<span class="disabled prev_page">Previous</span>

+ 16 - 7
laravel/documentation/views/templating.md

@@ -10,7 +10,7 @@
 <a name="the-basics"></a>
 ## The Basics
 
-Your application probably uses a common layout across most of its pages. Manually creating this layout within every controller action can be a pain. Specifying a controller layout will make your develompent much more enjoyable. Here's how to get started:
+Your application probably uses a common layout across most of its pages. Manually creating this layout within every controller action can be a pain. Specifying a controller layout will make your development much more enjoyable. Here's how to get started:
 
 #### Specify a "layout" property on your controller:
 
@@ -64,18 +64,21 @@ Blade makes writing your views pure bliss. To create a blade view, simply name y
 #### Echoing a variable using Blade:
 
 	Hello, {{$name}}.
-	
+
 #### Echoing function results using Blade:
 
 	{{ Asset::styles() }}
 
-#### Rendering a view:
+#### Render a view:
 
-	<h1>Profile</hi>
+You can use **@include** to render a view into another view. The rendered view will automatically inherit all of the data from the current view.
 
+	<h1>Profile</hi>
 	@include('user.profile')
 
-> **Note:** When using the **@include** Blade expression, the view will automatically inherit all of the current view data.
+Similarly, you can use **@render**, which behaves the same as **@include** except the rendered view will **not** inherit the data from the current view.
+
+	@render('admin.list')
 
 #### Creating loops using Blade:
 
@@ -124,11 +127,17 @@ Blade makes writing your views pure bliss. To create a blade view, simply name y
 
 <a name="blade-comments"></a>
 #### Blade comments:
-	
+
 	@if ($check)
 		{{-- This is a comment --}}
 		...
 	@endif
+	
+	{{--
+		This is
+		a multi-line
+		comment.
+	--}}
 
 > **Note:** Blade comments, unlike HTML comments, are not visible in the HTML source.
 
@@ -179,4 +188,4 @@ Sometimes you may want to only append to a section of a layout rather than overw
 		Welcome to the profile page!
 	@endsection
 
-Notice the **@parent** Blade construct? It will be replaced with the contents of the layout's navigation section, providing you with a beautiful and powerful method of performing layout extension and inheritance.
+Notice the **@parent** Blade construct? It will be replaced with the contents of the layout's navigation section, providing you with a beautiful and powerful method of performing layout extension and inheritance.

+ 2 - 2
laravel/error.php

@@ -60,7 +60,7 @@ class Error {
 	{
 		if (error_reporting() === 0) return;
 
-		// For a PHP error, we'll create an ErrorExcepetion and then feed that
+		// For a PHP error, we'll create an ErrorException and then feed that
 		// exception to the exception method, which will create a simple view
 		// of the exception details for the developer.
 		$exception = new \ErrorException($error, $code, 0, $file, $line);
@@ -80,7 +80,7 @@ class Error {
 	 */
 	public static function shutdown()
 	{
-		// If a fatal error occured that we have not handled yet, we will
+		// If a fatal error occurred that we have not handled yet, we will
 		// create an ErrorException and feed it to the exception handler,
 		// as it will not yet have been handled.
 		$error = error_get_last();

+ 1 - 1
laravel/event.php

@@ -125,7 +125,7 @@ class Event {
 	}
 
 	/**
-	 * Fire an event and return the the first response.
+	 * Fire an event and return the first response.
 	 *
 	 * Execution will be halted after the first valid response is found.
 	 *

+ 4 - 4
laravel/file.php

@@ -161,7 +161,7 @@ class File {
 	}
 
 	/**
-	 * Determine if a file is a given type.
+	 * Determine if a file is of a given type.
 	 *
 	 * The Fileinfo PHP extension is used to determine the file's MIME type.
 	 *
@@ -184,7 +184,7 @@ class File {
 		$mime = finfo_file(finfo_open(FILEINFO_MIME_TYPE), $path);
 
 		// The MIME configuration file contains an array of file extensions and
-		// their associated MIME types. We will spin through each extension the
+		// their associated MIME types. We will loop through each extension the
 		// developer wants to check and look for the MIME type.
 		foreach ((array) $extensions as $extension)
 		{
@@ -296,7 +296,7 @@ class File {
 		{
 			// If the item is a directory, we can just recurse into the
 			// function and delete that sub-directory, otherwise we'll
-			// just deleete the file and keep going!
+			// just delete the file and keep going!
 			if ($item->isDir())
 			{
 				static::rmdir($item->getRealPath());
@@ -335,7 +335,7 @@ class File {
 
 		$items = new fIterator($directory, $options);
 
-		// To get the latest created file, we'll simply spin through the
+		// To get the latest created file, we'll simply loop through the
 		// directory, setting the latest file if we encounter a file
 		// with a UNIX timestamp greater than the latest one.
 		foreach ($items as $item)

+ 17 - 2
laravel/helpers.php

@@ -34,7 +34,10 @@ function __($key, $replacements = array(), $language = null)
  */
 function dd($value)
 {
-	die(var_dump($value));
+	echo "<pre>";
+	var_dump($value);
+	echo "</pre>";
+	die;
 }
 
 /**
@@ -462,7 +465,7 @@ function root_namespace($class, $separator = '\\')
 /**
  * Get the "class basename" of a class or object.
  *
- * The basename is considered the name of the class minus all namespaces.
+ * The basename is considered to be the name of the class minus all namespaces.
  *
  * @param  object|string  $class
  * @return string
@@ -580,4 +583,16 @@ function get_cli_option($option, $default = null)
 	}
 
 	return value($default);
+}
+	
+/**
+ * Calculate the human-readable file size (with proper units).
+ *
+ * @param  int     $size
+ * @return string
+ */
+function get_file_size($size)
+{
+	$units = array('Bytes', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB');
+	return @round($size / pow(1024, ($i = floor(log($size, 1024)))), 2).' '.$units[$i];
 }

+ 17 - 15
laravel/html.php

@@ -9,13 +9,13 @@ class HTML {
 	 */
 	public static $macros = array();
 
-    /**
-     * Registers a custom macro.
-     *
-     * @param  string   $name
-     * @param  Closure  $input
-     * @return void
-     */
+	/**
+	 * Registers a custom macro.
+	 *
+	 * @param  string   $name
+	 * @param  Closure  $input
+	 * @return void
+	 */
 	public static function macro($name, $macro)
 	{
 		static::$macros[$name] = $macro;
@@ -137,10 +137,12 @@ class HTML {
 	 * @param  bool    $https
 	 * @return string
 	 */
-	public static function link($url, $title, $attributes = array(), $https = null)
+	public static function link($url, $title = null, $attributes = array(), $https = null)
 	{
 		$url = URL::to($url, $https);
 
+		if (is_null($title)) $title = $url;
+
 		return '<a href="'.$url.'"'.static::attributes($attributes).'>'.static::entities($title).'</a>';
 	}
 
@@ -152,7 +154,7 @@ class HTML {
 	 * @param  array   $attributes
 	 * @return string
 	 */
-	public static function link_to_secure($url, $title, $attributes = array())
+	public static function link_to_secure($url, $title = null, $attributes = array())
 	{
 		return static::link($url, $title, $attributes, true);
 	}
@@ -168,7 +170,7 @@ class HTML {
 	 * @param  bool    $https
 	 * @return string
 	 */
-	public static function link_to_asset($url, $title, $attributes = array(), $https = null)
+	public static function link_to_asset($url, $title = null, $attributes = array(), $https = null)
 	{
 		$url = URL::to_asset($url, $https);
 
@@ -183,7 +185,7 @@ class HTML {
 	 * @param  array   $attributes
 	 * @return string
 	 */
-	public static function link_to_secure_asset($url, $title, $attributes = array())
+	public static function link_to_secure_asset($url, $title = null, $attributes = array())
 	{
 		return static::link_to_asset($url, $title, $attributes, true);
 	}
@@ -207,7 +209,7 @@ class HTML {
 	 * @param  array   $attributes
 	 * @return string
 	 */
-	public static function link_to_route($name, $title, $parameters = array(), $attributes = array())
+	public static function link_to_route($name, $title = null, $parameters = array(), $attributes = array())
 	{
 		return static::link(URL::to_route($name, $parameters), $title, $attributes);
 	}
@@ -231,7 +233,7 @@ class HTML {
 	 * @param  array   $attributes
 	 * @return string
 	 */
-	public static function link_to_action($action, $title, $parameters = array(), $attributes = array())
+	public static function link_to_action($action, $title = null, $parameters = array(), $attributes = array())
 	{
 		return static::link(URL::to_action($action, $parameters), $title, $attributes);
 	}
@@ -359,7 +361,7 @@ class HTML {
 		foreach ((array) $attributes as $key => $value)
 		{
 			// For numeric keys, we will assume that the key and the value are the
-			// same, as this will conver HTML attributes such as "required" that
+			// same, as this will convert HTML attributes such as "required" that
 			// may be specified as required="required", etc.
 			if (is_numeric($key)) $key = $value;
 
@@ -418,7 +420,7 @@ class HTML {
 	    {
 	        return call_user_func_array(static::$macros[$method], $parameters);
 	    }
-	    
+
 	    throw new \Exception("Method [$method] does not exist.");
 	}
 

+ 4 - 4
laravel/ioc.php

@@ -124,7 +124,7 @@ class IoC {
 		// If the requested type is registered as a singleton, we want to cache off
 		// the instance in memory so we can return it later without creating an
 		// entirely new instances of the object on each subsequent request.
-		if (isset(static::$registry[$type]['singleton']))
+		if (isset(static::$registry[$type]['singleton']) && static::$registry[$type]['singleton'] === true)
 		{
 			static::$singletons[$type] = $object;
 		}
@@ -154,7 +154,7 @@ class IoC {
 		$reflector = new \ReflectionClass($type);
 
 		// If the type is not instantiable, the developer is attempting to resolve
-		// an abstract type such as an Interface of Abstract Class and there is
+		// an abstract type such as an Interface of an Abstract Class and there is
 		// no binding registered for the abstraction so we need to bail out.
 		if ( ! $reflector->isInstantiable())
 		{
@@ -179,7 +179,7 @@ class IoC {
 	/**
 	 * Resolve all of the dependencies from the ReflectionParameters.
 	 *
-	 * @param  array  $parameterrs
+	 * @param  array  $parameters
 	 * @return array
 	 */
 	protected static function dependencies($parameters)
@@ -191,7 +191,7 @@ class IoC {
 			$dependency = $parameter->getClass();
 
 			// If the class is null, it means the dependency is a string or some other
-			// primitive type, which we can not esolve since it is not a class and
+			// primitive type, which we can not resolve since it is not a class and
 			// we'll just bomb out with an error since we have nowhere to go.
 			if (is_null($dependency))
 			{

+ 1 - 1
laravel/lang.php

@@ -134,7 +134,7 @@ class Lang {
 		$line = array_get($lines, $line, $default);
 
 		// If the line is not a string, it probably means the developer asked for
-		// the entire langauge file and the value of the requested value will be
+		// the entire language file and the value of the requested value will be
 		// an array containing all of the lines in the file.
 		if (is_string($line))
 		{

+ 43 - 5
laravel/laravel.php

@@ -54,7 +54,7 @@ register_shutdown_function(function()
 |--------------------------------------------------------------------------
 |
 | By setting error reporting to -1, we essentially force PHP to report
-| every error, and this is guranteed to show every error on future
+| every error, and this is guaranteed to show every error on future
 | releases of PHP. This allows everything to be fixed early!
 |
 */
@@ -107,6 +107,46 @@ Routing\Router::register('*', '(:all)', function()
 	return Event::first('404');
 });
 
+/*
+|--------------------------------------------------------------------------
+| Gather The URI And Locales
+|--------------------------------------------------------------------------
+|
+| When routing, we'll need to grab the URI and the supported locales for
+| the route so we can properly set the language and route the request
+| to the proper end-point in the application.
+|
+*/
+
+$uri = URI::current();
+
+$locales = Config::get('application.languages', array());
+
+$locales[] = Config::get('application.language');
+
+/*
+|--------------------------------------------------------------------------
+| Set The Locale Based On Route
+|--------------------------------------------------------------------------
+|
+| If the URI starts with one of the supported languages, we will set
+| the default language to match that URI segment and shorten the
+| URI we'll pass to the router to not include the lang segment.
+|
+*/
+
+foreach ($locales as $locale)
+{
+	if (starts_with($uri, $locale))
+	{
+		Config::set('application.language', $locale);
+
+		$uri = trim(substr($uri, strlen($locale)), '/'); break;
+	}
+}
+
+if ($uri === '') $uri = '/';
+
 /*
 |--------------------------------------------------------------------------
 | Route The Incoming Request
@@ -118,8 +158,6 @@ Routing\Router::register('*', '(:all)', function()
 |
 */
 
-$uri = URI::current();
-
 Request::$route = Routing\Router::route(Request::method(), $uri);
 
 $response = Request::$route->call();
@@ -143,7 +181,7 @@ $response->render();
 |--------------------------------------------------------------------------
 |
 | If a session driver has been configured, we will save the session to
-| storage so it is avaiable for the next request. This will also set
+| storage so it is available for the next request. This will also set
 | the session cookie in the cookie jar to be sent to the user.
 |
 */
@@ -172,7 +210,7 @@ $response->send();
 | And We're Done!
 |--------------------------------------------------------------------------
 |
-| Raise the "done" event so extra output can be attached to the response
+| Raise the "done" event so extra output can be attached to the response.
 | This allows the adding of debug toolbars, etc. to the view, or may be
 | used to do some kind of logging by the application.
 |

+ 2 - 2
laravel/log.php

@@ -28,7 +28,7 @@ class Log {
 	 * Write a message to the log file.
 	 *
 	 * <code>
-	 *		// Write an "error" messge to the log file
+	 *		// Write an "error" message to the log file
 	 *		Log::write('error', 'Something went horribly wrong!');
 	 *
 	 *		// Write an "error" message using the class' magic method
@@ -51,7 +51,7 @@ class Log {
 
 		// If there aren't listeners on the log event, we'll just write to the
 		// log files using the default conventions, writing one log file per
-		// day so they files don't get too crowded.
+		// day so the files don't get too crowded.
 		else
 		{
 			$message = static::format($type, $message);

+ 1 - 1
laravel/memcached.php

@@ -68,7 +68,7 @@ class Memcached {
 	 */
 	public static function __callStatic($method, $parameters)
 	{
-		return call_user_func_array(array(static::instance(), $method), $parameters);
+		return call_user_func_array(array(static::connection(), $method), $parameters);
 	}
 
 }

+ 1 - 1
laravel/paginator.php

@@ -47,7 +47,7 @@ class Paginator {
 	/**
 	 * The compiled appendage that will be appended to the links.
 	 *
-	 * This consists of a sprintf format  with a page place-holder and query string.
+	 * This consists of a sprintf format with a page place-holder and query string.
 	 *
 	 * @var string
 	 */

+ 3 - 3
laravel/pluralizer.php

@@ -48,7 +48,7 @@ class Pluralizer {
 		}
 
 		// English words may be automatically inflected using regular expressions.
-		// If the word is english, we'll just pass off the word to the automatic
+		// If the word is English, we'll just pass off the word to the automatic
 		// inflection method and return the result, which is cached.
 		$irregular = $this->config['irregular'];
 
@@ -77,7 +77,7 @@ class Pluralizer {
 		}
 
 		// English words may be automatically inflected using regular expressions.
-		// If the word is english, we'll just pass off the word to the automatic
+		// If the word is English, we'll just pass off the word to the automatic
 		// inflection method and return the result, which is cached.
 		$irregular = array_flip($this->config['irregular']);
 
@@ -104,7 +104,7 @@ class Pluralizer {
 			return $value;
 		}
 
-		// Next we will check the "irregular" patterns, which contains words
+		// Next, we will check the "irregular" patterns, which contain words
 		// like "children" and "teeth" which can not be inflected using the
 		// typically used regular expression matching approach.
 		foreach ($irregular as $irregular => $pattern)

+ 7 - 1
laravel/profiling/profiler.php

@@ -5,6 +5,7 @@ use Laravel\File;
 use Laravel\Event;
 use Laravel\Config;
 use Laravel\Request;
+use Laravel\Database;
 
 class Profiler {
 
@@ -14,7 +15,7 @@ class Profiler {
 	 * @var array
 	 */
 	protected static $data = array('queries' => array(), 'logs' => array());
-
+	
 	/**
 	 * Get the rendered contents of the Profiler.
 	 *
@@ -28,6 +29,9 @@ class Profiler {
 		// type applications, so we will not send anything in those scenarios.
 		if ( ! Request::ajax())
 		{
+			static::$data['memory'] = get_file_size(memory_get_usage(true));
+			static::$data['memory_peak'] = get_file_size(memory_get_peak_usage(true));
+			static::$data['time'] = number_format((microtime(true) - LARAVEL_START) * 1000, 2);
 			return render('path: '.__DIR__.'/template'.BLADE_EXT, static::$data);
 		}
 	}
@@ -54,6 +58,8 @@ class Profiler {
 	{
 		foreach ($bindings as $binding)
 		{
+			$binding = Database::connection()->pdo->quote($binding);
+
 			$sql = preg_replace('/\?/', $binding, $sql, 1);
 		}
 

+ 2 - 0
laravel/profiling/template.blade.php

@@ -61,6 +61,8 @@
 				@endif
 			</a>
 		</li>
+		<li><a class="anbu-tab">Time <span class="anbu-count">{{ $time }}ms</span></a></li>
+		<li><a class="anbu-tab">Memory <span class="anbu-count">{{ $memory }} ({{ $memory_peak }})</span></a></li>
 		<li class="anbu-tab-right"><a id="anbu-hide" href="#">&#8614;</a></li>
 		<li class="anbu-tab-right"><a id="anbu-close" href="#">&times;</a></li>
 		<li class="anbu-tab-right"><a id="anbu-zoom" href="#">&#8645;</a></li>

+ 1 - 1
laravel/redis.php

@@ -17,7 +17,7 @@ class Redis {
 	protected $port;
 
 	/**
-	 * The databse number the connection selects on load.
+	 * The database number the connection selects on load.
 	 *
 	 * @var int
 	 */

+ 10 - 0
laravel/request.php

@@ -177,6 +177,16 @@ class Request {
 	{
 		return static::foundation()->headers->get('referer');
 	}
+	
+	/**
+	 * Get the timestamp of the time when the request was started.
+	 *
+	 * @return int
+	 */
+	public static function time()
+	{
+		return (int) LARAVEL_START;
+	}
 
 	/**
 	 * Determine if the current request is via the command line.

+ 2 - 2
laravel/response.php

@@ -106,7 +106,7 @@ class Response {
 	 *		return Response::eloquent($data, 200, array('header' => 'value'));
 	 * </code>
 	 *
-	 * @param  Eloquenet|array  $data
+	 * @param  Eloquent|array   $data
 	 * @param  int              $status
 	 * @param  array            $headers
 	 * @return Response
@@ -239,7 +239,7 @@ class Response {
 	public function render()
 	{
 		// If the content is a stringable object, we'll go ahead and call
-		// to toString method so that we can get the string content of
+		// the toString method so that we can get the string content of
 		// the content object. Otherwise we'll just cast to string.
 		if (str_object($this->content))
 		{

+ 1 - 1
laravel/routing/filter.php

@@ -14,7 +14,7 @@ class Filter {
 	public static $filters = array();
 
 	/**
-	 * The route filters that are based on pattern.
+	 * The route filters that are based on a pattern.
 	 *
 	 * @var array
 	 */

+ 4 - 4
laravel/routing/route.php

@@ -10,7 +10,7 @@ use Laravel\Response;
 class Route {
 
 	/**
-	 * The URI the route response to.
+	 * The URI the route responds to.
 	 *
 	 * @var string
 	 */
@@ -52,7 +52,7 @@ class Route {
 	public $action;
 
 	/**
-	 * The parameters that will passed to the route callback.
+	 * The parameters that will be passed to the route callback.
 	 *
 	 * @var array
 	 */
@@ -79,7 +79,7 @@ class Route {
 
 		// We'll set the parameters based on the number of parameters passed
 		// compared to the parameters that were needed. If more parameters
-		// are needed, we'll merge in defaults.
+		// are needed, we'll merge in the defaults.
 		$this->parameters($action, $parameters);
 	}
 
@@ -96,7 +96,7 @@ class Route {
 
 		// If there are less parameters than wildcards, we will figure out how
 		// many parameters we need to inject from the array of defaults and
-		// merge them in into the main array for the route.
+		// merge them into the main array for the route.
 		if (count($defaults) > count($parameters))
 		{
 			$defaults = array_slice($defaults, count($parameters));

+ 5 - 5
laravel/routing/router.php

@@ -55,7 +55,7 @@ class Router {
 	public static $group;
 
 	/**
-	 * The "handes" clause for the bundle currently being routed.
+	 * The "handles" clause for the bundle currently being routed.
 	 *
 	 * @var string
 	 */
@@ -303,7 +303,7 @@ class Router {
 		{
 			list($bundle, $controller) = Bundle::parse($identifier);
 
-			// First we need to replace the dots with slashes in thte controller name
+			// First we need to replace the dots with slashes in the controller name
 			// so that it is in directory format. The dots allow the developer to use
 			// a cleaner syntax when specifying the controller. We will also grab the
 			// root URI for the controller's bundle.
@@ -311,7 +311,7 @@ class Router {
 
 			$root = Bundle::option($bundle, 'handles');
 
-			// If the controller is a "home" controller, we'll need to also build a
+			// If the controller is a "home" controller, we'll need to also build an
 			// index method route for the controller. We'll remove "home" from the
 			// route root and setup a route to point to the index method.
 			if (ends_with($controller, 'home'))
@@ -428,7 +428,7 @@ class Router {
 
 		// To find the route, we'll simply spin through the routes looking
 		// for a route with a "uses" key matching the action, and if we
-		// find one we cache and return it.
+		// find one, we cache and return it.
 		foreach (static::routes() as $method => $routes)
 		{
 			foreach ($routes as $key => $value)
@@ -484,7 +484,7 @@ class Router {
 	{
 		foreach (static::method($method) as $route => $action)
 		{
-			// We only need to check routes with regular expression since all other
+			// We only need to check routes with regular expression since all others
 			// would have been able to be matched by the search for literal matches
 			// we just did before we started searching.
 			if (str_contains($route, '('))

+ 1 - 1
laravel/session.php

@@ -24,7 +24,7 @@ class Session {
 	const csrf_token = 'csrf_token';
 
 	/**
-	 * Create the session payload and the load the session.
+	 * Create the session payload and load the session.
 	 *
 	 * @return void
 	 */

+ 1 - 1
laravel/session/drivers/database.php

@@ -84,7 +84,7 @@ class Database extends Driver implements Sweeper {
 	}
 
 	/**
-	 * Delete all expired sessions from persistant storage.
+	 * Delete all expired sessions from persistent storage.
 	 *
 	 * @param  int   $expiration
 	 * @return void

Some files were not shown because too many files changed in this diff