Commit 6c55f9cf authored by Vincent Talbot's avatar Vincent Talbot

Merge pull request #2 from laravel/develop

Develop
parents 1b062499 0dc124d3
language: php
php:
- 5.3
script: "php artisan test:core"
\ No newline at end of file
# Pull request guidelines
[GitHub pull requests](https://help.github.com/articles/using-pull-requests) are a great way for everyone in the community to contribute to the Laravel codebase. Found a bug? Just fix it in your fork and submit a pull request. This will then be reviewed, and, if found as good, merged into the main repository.
In order to keep the codebase clean, stable and at high quality, even with so many people contributing, some guidelines are necessary for high-quality pull requests:
- **Branch:** Unless they are immediate documentation fixes relevant for old versions, pull requests should be sent to the `develop` branch only. Make sure to select that branch as target when creating the pull request (GitHub will not automatically select it.)
- **Documentation:** If you are adding a new feature or changing the API in any relevant way, this should be documented. The documentation files can be found directly in the core repository.
- **Unit tests:** To keep old bugs from re-appearing and generally hold quality at a high level, the Laravel core is thoroughly unit-tested. Thus, when you create a pull request, it is expected that you unit test any new code you add. For any bug you fix, you should also add regression tests to make sure the bug will never appear again. If you are unsure about how to write tests, the core team or other contributors will gladly help.
\ No newline at end of file
......@@ -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.
|
......
......@@ -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.
|
*/
......
......@@ -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(
......
......@@ -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.
|
*/
......
......@@ -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.
|
......
......@@ -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.
......@@ -96,6 +96,8 @@ return array(
'sheep',
'species',
'moose',
'chassis',
'traffic',
),
/*
......@@ -185,4 +187,4 @@ return array(
),
);
\ No newline at end of file
);
<?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' => '→ السابق',
'next' => 'التالي ←',
);
\ No newline at end of file
<?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" => "القيمة :attribute يجب أن تكون مقبولة.",
"active_url" => "القيمة :attribute تمثل عنوان موقع إنترنت غير صحيح.",
"after" => "القيمة :attribute يجب أن تكون بعد تاريخ :date.",
"alpha" => "القيمة :attribute يمكنها أن تحتوي على أحرف فقط.",
"alpha_dash" => "القيمة :attribute يمكنها أن تحتوي على أحرف و أرقام و إشارة الناقص فقط.",
"alpha_num" => "القيمة :attribute يمكنها أن تحتوي على أحرف و أرقام فقط.",
"array" => "The :attribute must have selected elements.",
"before" => "القيمة :attribute يجب أن تكون قبل تاريخ :date.",
"between" => array(
"numeric" => "القيمة :attribute يجب أن تكون بين :min و :max.",
"file" => "الملف :attribute يجب أن يكون بحجم من :min إلى :max كيلوبايت.",
"string" => "النص :attribute يجب أن يكون بطول من :min إلى :max حرف.",
),
"confirmed" => "القيمة :attribute التأكيدية غير مطابقة.",
"count" => "The :attribute must have exactly :count selected elements.",
"countbetween" => "The :attribute must have between :min and :max selected elements.",
"countmax" => "The :attribute must have less than :max selected elements.",
"countmin" => "The :attribute must have at least :min selected elements.",
"different" => "القيمتان :attribute و :other يجب أن تختلفان.",
"email" => "القيمة :attribute تمثل بريد إلكتروني غير صحيح.",
"exists" => "القيمة المختارة :attribute غير موجودة.",
"image" => "القيمة :attribute يجب أن تكون صورة.",
"in" => "القيمة المختارة :attribute غير موجودة.",
"integer" => "القيمة :attribute يجب أن تكون رقماً.",
"ip" => "القيمة :attribute يجب أن تمثل عنوان بروتوكول إنترنت صحيح.",
"match" => "القيمة :attribute هي بتنسيق غير صحيح.",
"max" => array(
"numeric" => "القيمة :attribute يجب أن تكون أقل من :max.",
"file" => "الملف :attribute يجب أن يكون بحجم أقل من :max كيلوبايت.",
"string" => "النص :attribute يجب أن يكون بطول أقل من :max حرف.",
),
"mimes" => "القيمة :attribute يجب أن تكون ملف من نوع: :values.",
"min" => array(
"numeric" => "القيمة :attribute يجب أن تساوي :min على الأقل.",
"file" => "الملف :attribute يجب أن يكون بحجم :min كيلوبايت على الأقل.",
"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!
|
*/
'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(),
);
\ No newline at end of file
<?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; Назад',
'next' => 'Напред &raquo;',
);
\ No newline at end of file
<?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" => "Трябва да приемете :attribute.",
"active_url" => "Полето :attribute не е валиден URL адрес.",
"after" => "Полето :attribute трябва да бъде дата след :date.",
"alpha" => "Полето :attribute трябва да съдържа само букви.",
"alpha_dash" => "Полето :attribute трябва да съдържа само букви, цифри, долна черта и тире.",
"alpha_num" => "Полето :attribute трябва да съдържа само букви и цифри.",
"array" => "Полето :attribute трябва да има избрани елементи.",
"before" => "Полето :attribute трябва да бъде дата преди :date.",
"between" => array(
"numeric" => "Полето :attribute трябва да бъде между :min и :max.",
"file" => "Полето :attribute трябва да бъде между :min и :max килобайта.",
"string" => "Полето :attribute трябва да бъде между :min и :max знака.",
),
"confirmed" => "Полето :attribute не е потвърдено.",
"count" => "Полето :attribute трябва да има точно :count избрани елементи.",
"countbetween" => "Полето :attribute трябва да има от :min до :max избрани елементи.",
"countmax" => "Полето :attribute трябва да има по-малко от :max избрани елементи.",
"countmin" => "Полето :attribute трябва да има минимум :min избрани елементи.",
"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 килобайта.",
"string" => "Полето :attribute трябва да бъде по-малко от :max знака.",
),
"mimes" => "Полето :attribute трябва да бъде файл от тип: :values.",
"min" => array(
"numeric" => "Полето :attribute трябва да бъде минимум :min.",
"file" => "Полето :attribute трябва да бъде минимум :min килобайта.",
"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!
|
*/
'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(),
);
\ No newline at end of file
<?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; Forrige',
'next' => 'N&aelig;ste &raquo;',
);
\ No newline at end of file
<?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" => ":attribute skal accepteres.",
"active_url" => ":attribute er ikke en gyldig URL.",
"after" => ":attribute skal v&aelig;re en dato efter :date.",
"alpha" => ":attribute m&aring; kun indeholde bogstaver.",
"alpha_dash" => ":attribute m&aring; kun indeholde bogstaver, numre, og skr&aring;streg.",
"alpha_num" => ":attribute m&aring; kun indeholde bogstaver og numre.",
"array" => ":attribute skal have valgte elementer.",
"before" => ":attribute skal have en dato f&oslash;r :date.",
"between" => array(
"numeric" => ":attribute skal v&aelig;re mellem :min - :max.",
"file" => ":attribute skal v&aelig;re mellem :min - :max kilobytes.",
"string" => ":attribute skal v&aelig;re mellem :min - :max karakterer.",
),
"confirmed" => ":attribute bekr&aelig;ftelse stemmer ikke overens.",
"count" => ":attribute skal v&aelig;re pr&aelig;cis :count valgte elementer.",
"countbetween" => ":attribute skal v&aelig;re mellem :min and :max valgte elementer.",
"countmax" => ":attribute skal have mindre end :max valgte elementer.",
"countmin" => ":attribute skal have minimum :min valgte elementer.",
"different" => ":attribute og :other skal v&aelig;re forskellige.",
"email" => "Formatet for :attribute er ugyldigt.",
"exists" => "Den valgte :attribute er ugyldig.",
"image" => ":attribute skal v&aelig;re et billede.",
"in" => "Den valgte :attribute er ugyldig.",
"integer" => ":attribute m&aring; kun indeholde tal.",
"ip" => ":attribute skal v&aelig;re en gyldig IP adresse.",
"match" => "Formatet for :attribute er ugyldigt.",
"max" => array(
"numeric" => ":attribute skal v&aelig;re mindre end :max.",
"file" => ":attribute skal v&aelig;re mindre end :max kilobytes.",
"string" => ":attribute skal v&aelig;re mindre end :max karakterer.",
),
"mimes" => ":attribute skal have filtypen type: :values.",
"min" => array(
"numeric" => ":attribute ska minimum v&aelig;re :min.",
"file" => ":attribute skal v&aelig;re mindst :min kilobytes.",
"string" => ":attribute skal v&aelig;re mindst :min karakterer.",
),
"not_in" => "Den valgte :attribute er ugyldig.",
"numeric" => ":attribute skal v&aelig;re et nummer.",
"required" => ":attribute er kr&aelig;vet.",
"same" => ":attribute og :other stemmer ikke overens.",
"size" => array(
"numeric" => ":attribute skal v&aelig;re :size.",
"file" => ":attribute skal v&aelig;re :size kilobyte.",
"string" => ":attribute skal v&aelig;re :size karakterer.",
),
"unique" => ":attribute er allerede optaget.",
"url" => ":attribute formatet er ugyldigt.",
/*
|--------------------------------------------------------------------------
| 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(),
);
\ No newline at end of file
<?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; Zur&uuml;ck',
'next' => 'Weiter &raquo;',
);
\ No newline at end of file
<?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" => ":attribute muss akzeptiert werden.",
"active_url" => ":attribute ist keine g&uuml;ltige URL.",
"after" => ":attribute muss ein Datum nach dem :date sein.",
"alpha" => ":attribute darf nur Buchstaben beinhalten.",
"alpha_dash" => ":attribute darf nur aus Buchstaben, Nummern und Bindestrichen bestehen.",
"alpha_num" => ":attribute darf nur aus Buchstaben und Nummern bestehen.",
"array" => ":attribute muss ausgew&auml;hlte Elemente haben.",
"before" => ":attribute muss ein Datum vor dem :date sein.",
"between" => array(
"numeric" => ":attribute muss zwischen :min und :max liegen.",
"file" => ":attribute muss zwischen :min und :max Kilobytes gro&szlig; sein.",
"string" => ":attribute muss zwischen :min und :max Zeichen lang sein.",
),
"confirmed" => ":attribute stimmt nicht mit der Best&auml;tigung &uuml;berein.",
"count" => ":attribute muss genau :count ausgew&auml;hlte Elemente haben.",
"countbetween" => ":attribute muss zwischen :min und :max ausgew&auml;hlte Elemente haben.",
"countmax" => ":attribute muss weniger als :max ausgew&auml;hlte Elemente haben.",
"countmin" => ":attribute muss mindestens :min ausgew&auml;hlte Elemente haben.",
"different" => ":attribute und :other m&uuml;ssen verschieden sein.",
"email" => ":attribute ist keine g&uuml;ltige Email-Adresse.",
"exists" => "Der gew&auml;hlte Wert f&uuml;r :attribute ist ung&uuml;ltig.",
"image" => ":attribute muss ein Bild sein.",
"in" => "Der gew&auml;hlte Wert f&uuml;r :attribute ist ung&uuml;ltig.",
"integer" => ":attribute muss eine ganze Zahl sein.",
"ip" => ":attribute muss eine g&uuml;ltige IP-Adresse sein.",
"match" => ":attribute hat ein ung&uuml;ltiges Format.",
"max" => array(
"numeric" => ":attribute muss kleiner als :max sein.",
"file" => ":attribute muss kleiner als :max Kilobytes gro&szlig; sein.",
"string" => ":attribute muss k&uuml;rzer als :max Zeichen sein.",
),
"mimes" => ":attribute muss den Dateityp :values haben.",
"min" => array(
"numeric" => ":attribute muss gr&ouml;&szlig;er als :min sein.",
"file" => ":attribute muss gr&ouml;&szlig;er als :min Kilobytes gro&szlig; sein.",
"string" => ":attribute muss l&auml;nger als :min Zeichen sein.",
),
"not_in" => "Der gew&auml;hlte Wert f&uuml;r :attribute ist ung&uuml;ltig.",
"numeric" => ":attribute muss eine Zahl sein.",
"required" => ":attribute muss ausgef&uuml;llt sein.",
"same" => ":attribute und :other m&uuml;ssen &uuml;bereinstimmen.",
"size" => array(
"numeric" => ":attribute muss gleich :size sein.",
"file" => ":attribute muss :size Kilobyte gro&szlig; sein.",
"string" => ":attribute muss :size Zeichen lang sein.",
),
"unique" => ":attribute ist schon vergeben.",
"url" => "Das Format von :attribute ist ung&uuml;ltig.",
/*
|--------------------------------------------------------------------------
| 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(),
);
\ No newline at end of file
<?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; Προηγούμενο',
'next' => 'Επόμενο &raquo;',
);
\ No newline at end of file
<?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" => "Το πεδίο :attribute πρέπει να εγκριθεί.",
"active_url" => "Το πεδίο :attribute δεν ειναι σωστό URL.",
"after" => "Το πεδίο :attribute πρέπει η ημερομηνία να ειναι μετά :date.",
"alpha" => "Το πεδίο :attribute μπορεί να περιλαμβάνει μόνο γράμματα.",
"alpha_dash" => "Το πεδίο :attribute μπορεί να περιλαμβάνει μόνο γράμματα, αριθμούς και παύλες.",
"alpha_num" => "Το πεδίο :attribute μπορεί να περιλαμβάνει μόνο γράμματα και αριθμούς.",
"array" => "Το πεδίο :attribute πρέπει να περιλαμβάνει επιλεγμένα αντικείμενα.",
"before" => "Το πεδίο :attribute πρέπει η ημερομηνία να ειναι πριν από :date.",
"between" => array(
"numeric" => "Το πεδίο :attribute πρέπει να έχει τιμές μεταξύ :min - :max.",
"file" => "Το πεδίο :attribute πρέπει να ειναι ανάμεσα σε :min - :max kb.",
"string" => "Το πεδίο :attribute πρέπει να περιλαμβάνει :min - :max χαρακτήρες.",
),
"confirmed" => "Το πεδίο :attribute δεν πέρασε τον έλεγχο.",
"count" => "Το πεδίο :attribute πρέπει να έχει ακριβώς :count επιλεγμένα αντικείμενα.",
"countbetween" => "Το πεδίο :attribute πρέπει να είναι ανάμεσα σε :min και :max επιλεγμένα αντικείμενα.",
"countmax" => "Το πεδίο :attribute πρέπει να έχει λιγότερα από :max επιλεγμένα αντικείμενα.",
"countmin" => "Το πεδίο :attribute πρέπει να έχει τουλάχιστον :min επιλεγμένα αντικείμενα.",
"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 πρέπει να είναι μικρότερο από :max kb.",
"string" => "Το πεδίο :attribute πρέπει να έχει λιγότερους από :max χαρακτήρες.",
),
"not_in" => "Το επιλεγμένο πεδίο :attribute είναι άκυρο.",
"numeric" => "Το πεδίο :attribute πρέπει να είναι αριθμός.",
"required" => "Το πεδίο :attribute είναι απαραίτητο.",
"same" => "Τα πεδία :attribute και :other πρέπει να είναι ίδια.",
"size" => array(
"numeric" => "Το πεδίο :attribute πρέπει να ειναι :size.",
"file" => "Το πεδίο :attribute πρέπει να έχει μέγεθος :size kb.",
"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!
|
*/
'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(),
);
\ No newline at end of file
......@@ -24,6 +24,7 @@ return array(
"alpha" => "The :attribute may only contain letters.",
"alpha_dash" => "The :attribute may only contain letters, numbers, and dashes.",
"alpha_num" => "The :attribute may only contain letters and numbers.",
"array" => "The :attribute must have selected elements.",
"before" => "The :attribute must be a date before :date.",
"between" => array(
"numeric" => "The :attribute must be between :min - :max.",
......@@ -31,6 +32,10 @@ return array(
"string" => "The :attribute must be between :min - :max characters.",
),
"confirmed" => "The :attribute confirmation does not match.",
"count" => "The :attribute must have exactly :count selected elements.",
"countbetween" => "The :attribute must have between :min and :max selected elements.",
"countmax" => "The :attribute must have less than :max selected elements.",
"countmin" => "The :attribute must have at least :min selected elements.",
"different" => "The :attribute and :other must be different.",
"email" => "The :attribute format is invalid.",
"exists" => "The selected :attribute is invalid.",
......
<?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;',
);
<?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.",
"array" => "The :attribute must have selected elements.",
"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.",
"count" => "The :attribute must have exactly :count selected elements.",
"countbetween" => "The :attribute must have between :min and :max selected elements.",
"countmax" => "The :attribute must have less than :max selected elements.",
"countmin" => "The :attribute must have at least :min selected elements.",
"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(),
);
<?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; Προηγούμενο',
'next' => 'Επόμενο &raquo;',
);
\ No newline at end of file
<?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" => "Το πεδίο :attribute πρέπει να εγκριθεί.",
"active_url" => "Το πεδίο :attribute δεν ειναι σωστό URL.",
"after" => "Το πεδίο :attribute πρέπει η ημερομηνία να ειναι μετά :date.",
"alpha" => "Το πεδίο :attribute μπορεί να περιλαμβάνει μόνο γράμματα.",
"alpha_dash" => "Το πεδίο :attribute μπορεί να περιλαμβάνει μόνο γράμματα, αριθμούς και παύλες.",
"alpha_num" => "Το πεδίο :attribute μπορεί να περιλαμβάνει μόνο γράμματα και αριθμούς.",
"array" => "Το πεδίο :attribute πρέπει να περιλαμβάνει επιλεγμένα αντικείμενα.",
"before" => "Το πεδίο :attribute πρέπει η ημερομηνία να ειναι πριν από :date.",
"between" => array(
"numeric" => "Το πεδίο :attribute πρέπει να έχει τιμές μεταξύ :min - :max.",
"file" => "Το πεδίο :attribute πρέπει να ειναι ανάμεσα σε :min - :max kb.",
"string" => "Το πεδίο :attribute πρέπει να περιλαμβάνει :min - :max χαρακτήρες.",
),
"confirmed" => "Το πεδίο :attribute δεν πέρασε τον έλεγχο.",
"count" => "Το πεδίο :attribute πρέπει να έχει ακριβώς :count επιλεγμένα αντικείμενα.",
"countbetween" => "Το πεδίο :attribute πρέπει να είναι ανάμεσα σε :min και :max επιλεγμένα αντικείμενα.",
"countmax" => "Το πεδίο :attribute πρέπει να έχει λιγότερα από :max επιλεγμένα αντικείμενα.",
"countmin" => "Το πεδίο :attribute πρέπει να έχει τουλάχιστον :min επιλεγμένα αντικείμενα.",
"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 πρέπει να είναι μικρότερο από :max kb.",
"string" => "Το πεδίο :attribute πρέπει να έχει λιγότερους από :max χαρακτήρες.",
),
"not_in" => "Το επιλεγμένο πεδίο :attribute είναι άκυρο.",
"numeric" => "Το πεδίο :attribute πρέπει να είναι αριθμός.",
"required" => "Το πεδίο :attribute είναι απαραίτητο.",
"same" => "Τα πεδία :attribute και :other πρέπει να είναι ίδια.",
"size" => array(
"numeric" => "Το πεδίο :attribute πρέπει να ειναι :size.",
"file" => "Το πεδίο :attribute πρέπει να έχει μέγεθος :size kb.",
"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!
|
*/
'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(),
);
\ No newline at end of file
<?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' => '&rarr; אחורה',
'next' => 'קדימה &larr;',
);
\ No newline at end of file
<?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.
|
| Hebrew Translation:
| Nir Lahad - www.nirlah.com
|
*/
"accepted" => "חובה להסכים ל-:attribute.",
"active_url" => "הערך :attribute חייב להכיל כתובת אינטרנט פעילה.",
"after" => "הערך :attribute חייב להכיל תאריך אחרי :date.",
"alpha" => "הערך :attribute יכול להכיל רק אותיות.",
"alpha_dash" => "הערך :attribute יכול להכיל רק אותיות, מספרים ומקפים.",
"alpha_num" => "הערך :attribute יכול להכיל רק אותיות ומספרים.",
"array" => "The :attribute must have selected elements.",
"before" => "הערך :attribute חייב להכיל תאריך לפני :date.",
"between" => array(
"numeric" => "הערך :attribute חייב להיות בין :min ל-:max.",
"file" => "הערך :attribute חייב לשקול בין :min ל-:max ק&quot;ב.",
"string" => "הערך :attribute חייב להכיל בין :min ל-:max תווים.",
),
"confirmed" => "הערכים של :attribute חייבים להיות זהים.",
"count" => "The :attribute must have exactly :count selected elements.",
"countbetween" => "The :attribute must have between :min and :max selected elements.",
"countmax" => "The :attribute must have less than :max selected elements.",
"countmin" => "The :attribute must have at least :min selected elements.",
"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 ק&quotב.",
"string" => "הערך :attribute חייב להכיל פחות מ-:max תווים.",
),
"mimes" => "הערך :attribute חייב להיות קובץ מסוג: :values.",
"min" => array(
"numeric" => "הערך :attribute חייב להיות לפחות :min.",
"file" => "הערך :attribute חייב לשקול לפחות :min ק&quot;ב.",
"string" => "הערך :attribute חייב להכיל לפחות :min תווים.",
),
"not_in" => "הערך :attribute נמצא ברשימה השחורה.",
"numeric" => "הערך :attribute חייב להיות מספר.",
"required" => "חובה למלא את הערך :attribute.",
"same" => "הערכים :attribute ו-:other חייבים להיות זהים.",
"size" => array(
"numeric" => "הערך :attribute חייב להיות :size.",
"file" => "הערך :attribute חייב לשקול :size ק&quot;ב.",
"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!
|
*/
'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(),
);
\ No newline at end of file
<?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;',
);
\ No newline at end of file
<?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.",
"array" => "The :attribute must have selected elements.",
"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.",
"count" => "The :attribute must have exactly :count selected elements.",
"countbetween" => "The :attribute must have between :min and :max selected elements.",
"countmax" => "The :attribute must have less than :max selected elements.",
"countmin" => "The :attribute must have at least :min selected elements.",
"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(),
);
\ No newline at end of file
<?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;',
);
\ No newline at end of file
<?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.",
"array" => "The :attribute must have selected elements.",
"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.",
"count" => "The :attribute must have exactly :count selected elements.",
"countbetween" => "The :attribute must have between :min and :max selected elements.",
"countmax" => "The :attribute must have less than :max selected elements.",
"countmin" => "The :attribute must have at least :min selected elements.",
"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(),
);
\ No newline at end of file
<?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;',
);
<?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は英数字がご利用できます。",
"array" => "The :attribute must have selected elements.",
"before" => ":attributeには、:date以前の日付をご利用ください。",
"between" => array(
"numeric" => ":attributeは、:minから、:maxまでの数字をご指定ください。",
"file" => ":attributeには、:min kBから:max kBまでのサイズのファイルをご指定ください。",
"string" => ":attributeは、:min文字から:max文字の間でご指定ください。",
),
"confirmed" => ":attributeと、確認フィールドとが、一致していません。",
"count" => "The :attribute must have exactly :count selected elements.",
"countbetween" => "The :attribute must have between :min and :max selected elements.",
"countmax" => "The :attribute must have less than :max selected elements.",
"countmin" => "The :attribute must have at least :min selected elements.",
"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(),
);
<?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;',
);
<?php
return array(
/*
|--------------------------------------------------------------------------
| Dutch validation language file
|--------------------------------------------------------------------------
|
*/
"accepted" => "Het :attribute moet geaccepteerd zijn.",
"active_url" => "Het :attribute is geen geldige 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 bevatten.",
"array" => "Het :attribute moet geselecteerde elementen bevatten.",
"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 karakters zijn.",
),
"confirmed" => "Het :attribute bevestiging komt niet overeen.",
"count" => "Het :attribute moet precies :count geselecteerde elementen bevatten.",
"countbetween" => "Het :attribute moet tussen :min en :max geselecteerde elementen bevatten.",
"countmax" => "Het :attribute moet minder dan :max geselecteerde elementen bevatten.",
"countmin" => "Het :attribute moet minimaal :min geselecteerde elementen bevatten.",
"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 zijn.",
"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 karakters 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 karakters 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(),
);
<?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; Poprzednia',
'next' => 'Następna &raquo;',
);
\ No newline at end of file
<?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" => ":attribute musi zostać zaakceptowane.",
"active_url" => ":attribute nie jest prawidłowym adresem URL.",
"after" => ":attribute musi zawierać datę, która jest po :date.",
"alpha" => ":attribute może zawierać jedynie litery.",
"alpha_dash" => ":attribute może zawierać jedynie litery, cyfry i myślniki.",
"alpha_num" => ":attribute może zawierać jedynie litery i cyfry.",
"array" => "The :attribute must have selected elements.",
"before" => ":attribute musi zawierać datę, która jest przed :date.",
"between" => array(
"numeric" => ":attribute musi mieścić się w granicach :min - :max.",
"file" => ":attribute musi mieć :min - :max kilobajtów.",
"string" => ":attribute musi mieć :min - :max znaków.",
),
"confirmed" => "Potwierdzenie :attribute się nie zgadza.",
"count" => "The :attribute must have exactly :count selected elements.",
"countbetween" => "The :attribute must have between :min and :max selected elements.",
"countmax" => "The :attribute must have less than :max selected elements.",
"countmin" => "The :attribute must have at least :min selected elements.",
"different" => ":attribute i :other muszą się od siebie różnić.",
"email" => "The :attribute format is invalid.",
"exists" => "Zaznaczona opcja :attribute jest nieprawidłowa.",
"image" => ":attribute musi być obrazkiem.",
"in" => "Zaznaczona opcja :attribute jest nieprawidłowa.",
"integer" => ":attribute musi być liczbą całkowitą.",
"ip" => ":attribute musi być prawidłowym adresem IP.",
"match" => "Format :attribute jest nieprawidłowy.",
"max" => array(
"numeric" => ":attribute musi być poniżej :max.",
"file" => ":attribute musi mieć poniżej :max kilobajtów.",
"string" => ":attribute musi mieć poniżej :max znaków.",
),
"mimes" => ":attribute musi być plikiem rodzaju :values.",
"min" => array(
"numeric" => ":attribute musi być co najmniej :min.",
"file" => "Plik :attribute musi mieć co najmniej :min kilobajtów.",
"string" => ":attribute musi mieć co najmniej :min znaków.",
),
"not_in" => "Zaznaczona opcja :attribute jest nieprawidłowa.",
"numeric" => ":attribute musi być numeryczne.",
"required" => "Pole :attribute jest wymagane.",
"same" => ":attribute i :other muszą być takie same.",
"size" => array(
"numeric" => ":attribute musi mieć rozmiary :size.",
"file" => ":attribute musi mieć :size kilobajtów.",
"string" => ":attribute musi mieć :size znaków.",
),
"unique" => ":attribute zostało już użyte.",
"url" => "Format pola :attribute jest nieprawidłowy.",
/*
|--------------------------------------------------------------------------
| 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(),
);
\ No newline at end of file
<?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; Anterior',
'next' => 'Próxima &raquo;',
);
\ No newline at end of file
<?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" => "O :attribute deve ser aceito.",
"active_url" => "O :attribute não é uma URL válida.",
"after" => "O :attribute deve ser uma data após :date.",
"alpha" => "O :attribute só pode conter letras.",
"alpha_dash" => "O :attribute só pode conter letras, números e traços.",
"alpha_num" => "O :attribute só pode conter letras e números.",
"before" => "O :attribute deve ser uma data anterior à :date.",
"between" => array(
"numeric" => "O :attribute deve estar entre :min - :max.",
"file" => "O :attribute deve estar entre :min - :max kilobytes.",
"string" => "O :attribute deve estar entre :min - :max caracteres.",
),
"confirmed" => "O :attribute confirmação não coincide.",
"different" => "O :attribute e :other devem ser diferentes.",
"email" => "O :attribute não é um e-mail válido",
"exists" => "O :attribute selecionado é inválido.",
"image" => "O :attribute deve ser uma imagem.",
"in" => "O :attribute selecionado é inválido.",
"integer" => "O :attribute deve ser um inteiro",
"ip" => "O :attribute deve ser um endereço IP válido.",
"match" => "O formato :attribute é inválido.",
"max" => array(
"numeric" => "O :attribute deve ser inferior a :max.",
"file" => "O :attribute deve ser inferior a :max kilobytes.",
"string" => "O :attribute deve ser inferior a :max caracteres.",
),
"mimes" => "O :attribute deve ser um arquivo do tipo: :values.",
"min" => array(
"numeric" => "O :attribute deve conter pelo menos :min.",
"file" => "O :attribute deve conter pelo menos :min kilobytes.",
"string" => "O :attribute deve conter pelo menos :min caracteres.",
),
"not_in" => "O :attribute selecionado é inválido.",
"numeric" => "O :attribute deve ser um número.",
"required" => "O campo :attribute deve ser preenchido.",
"same" => "O :attribute e :other devem ser iguais",
"size" => array(
"numeric" => "O :attribute deve ser :size.",
"file" => "O :attribute deve ter :size kilobyte.",
"string" => "O :attribute deve ter :size caracteres.",
),
"unique" => "O :attribute já existe",
"url" => "O formato :attribute é inválido.",
/*
|--------------------------------------------------------------------------
| 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(),
);
\ No newline at end of file
......@@ -24,6 +24,7 @@ return array(
"alpha" => "Поле :attribute может содержать только буквы.",
"alpha_dash" => "Поле :attribute может содержать только буквы, цифры и тире.",
"alpha_num" => "Поле :attribute может содержать только буквы и цифры.",
"array" => "The :attribute must have selected elements.",
"before" => "Поле :attribute должно быть датой перед :date.",
"between" => array(
"numeric" => "Поле :attribute должно быть между :min и :max.",
......@@ -31,6 +32,10 @@ return array(
"string" => "Поле :attribute должно быть от :min до :max символов.",
),
"confirmed" => "Поле :attribute не совпадает с подтверждением.",
"count" => "The :attribute must have exactly :count selected elements.",
"countbetween" => "The :attribute must have between :min and :max selected elements.",
"countmax" => "The :attribute must have less than :max selected elements.",
"countmin" => "The :attribute must have at least :min selected elements.",
"different" => "Поля :attribute и :other должны различаться.",
"email" => "Поле :attribute имеет неверный формат.",
"exists" => "Выбранное значение для :attribute уже существует.",
......
<?php
/**
* Laravel - A PHP Framework For Web Artisans
*
* @package Language
* @version 3.2.3
* @author Sinan Eldem <sinan@sinaneldem.com.tr>
* @link http://sinaneldem.com.tr
*/
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; Önceki',
'next' => 'Sonraki &raquo;',
);
\ No newline at end of file
<?php
/**
* Laravel - A PHP Framework For Web Artisans
*
* @package Language
* @version 3.2.3
* @author Sinan Eldem <sinan@sinaneldem.com.tr>
* @link http://sinaneldem.com.tr
*/
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" => ":attribute kabul edilmelidir.",
"active_url" => ":attribute geçerli bir URL olmalıdır.",
"after" => ":attribute şundan daha eski bir tarih olmalıdır :date.",
"alpha" => ":attribute sadece harflerden oluşmalıdır.",
"alpha_dash" => ":attribute sadece harfler, rakamlar ve tirelerden oluşmalıdır.",
"alpha_num" => ":attribute sadece harfler ve rakamlar içermelidir.",
"before" => ":attribute şundan daha önceki bir tarih olmalıdır :date.",
"between" => array(
"numeric" => ":attribute :min - :max arasında olmalıdır.",
"file" => ":attribute :min - :max arasındaki kilobyte değeri olmalıdır.",
"string" => ":attribute :min - :max arasında karakterden oluşmalıdır.",
),
"confirmed" => ":attribute onayı eşleşmiyor.",
"different" => ":attribute ile :other birbirinden farklı olmalıdır.",
"email" => ":attribute biçimi geçersiz.",
"exists" => "Seçili :attribute geçersiz.",
"image" => ":attribute resim dosyası olmalıdır.",
"in" => "selected :attribute geçersiz.",
"integer" => ":attribute rakam olmalıdır.",
"ip" => ":attribute geçerli bir IP adresi olmalıdır.",
"match" => ":attribute biçimi geçersiz.",
"max" => array(
"numeric" => ":attribute şundan küçük olmalıdır :max.",
"file" => ":attribute şundan küçük olmalıdır :max kilobyte.",
"string" => ":attribute şundan küçük olmalıdır :max karakter.",
),
"mimes" => ":attribute dosya biçimi :values olmalıdır.",
"min" => array(
"numeric" => ":attribute en az :min olmalıdır.",
"file" => ":attribute en az :min kilobyte olmalıdır.",
"string" => ":attribute en az :min karakter olmalıdır.",
),
"not_in" => "Seçili :attribute geçersiz.",
"numeric" => ":attribute rakam olmalıdır.",
"required" => ":attribute alanı gereklidir.",
"same" => ":attribute ile :other eşleşmelidir.",
"size" => array(
"numeric" => ":attribute :size olmalıdır.",
"file" => ":attribute :size kilobyte olmalıdır.",
"string" => ":attribute :size karakter olmalıdır.",
),
"unique" => ":attribute daha önceden kayıt edilmiş.",
"url" => ":attribute biçimi geçersiz.",
/*
|--------------------------------------------------------------------------
| 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(),
);
\ No newline at end of file
......@@ -29,7 +29,7 @@
<p>And the view sitting before you can be found at:</p>
<pre>{{ path('app') }}views/home/index.php</pre>
<pre>{{ path('app') }}views/home/index.blade.php</pre>
<h2>Grow in knowledge.</h2>
......
......@@ -4,7 +4,7 @@
* Laravel - A PHP Framework For Web Artisans
*
* @package Laravel
* @version 3.2.3
* @version 3.2.8
* @author Taylor Otwell <taylorotwell@gmail.com>
* @link http://laravel.com
*/
......
......@@ -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';
......
......@@ -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>
\ No newline at end of file
</html>
......@@ -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
*/
......
......@@ -7,37 +7,50 @@ class Eloquent extends Driver {
*
* If the user is a guest, null should be returned.
*
* @param int $id
* @param int|object $token
* @return mixed|null
*/
public function retrieve($id)
public function retrieve($token)
{
if (filter_var($id, FILTER_VALIDATE_INT) !== false)
// We return an object here either if the passed token is an integer (ID)
// or if we are passed a model object of the correct type
if (filter_var($token, FILTER_VALIDATE_INT) !== false)
{
return $this->model()->find($id);
return $this->model()->find($token);
}
else if (get_class($token) == Config::get('auth.model'))
{
return $token;
}
}
/**
* 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'];
$password_field = Config::get('auth.password', 'password');
if ( ! is_null($user) and Hash::check($password, $user->get_attribute($password_field)))
if ( ! is_null($user) and Hash::check($password, $user->{$password_field}))
{
return $this->login($user->id, array_get($arguments, 'remember'));
}
......@@ -57,4 +70,4 @@ class Eloquent extends Driver {
return new $model;
}
}
\ No newline at end of file
}
......@@ -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();
}
}
......@@ -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);
......
......@@ -68,7 +68,7 @@ class Blade {
// Once the view has been compiled, we can simply set the path to the
// compiled view on the view instance and call the typical "get"
// method on the view to evaluate the compiled PHP view.
return $view->get();
return ltrim($view->get());
});
}
......@@ -95,7 +95,6 @@ class Blade {
*
* @param string $view
* @param string $path
* @param string $compiled
* @return bool
*/
public static function expired($view, $path)
......@@ -278,7 +277,7 @@ class Blade {
*/
protected static function compile_structure_closings($value)
{
$pattern = '/(\s*)@(endif|endforeach|endfor|endwhile|break)(\s*)/';
$pattern = '/(\s*)@(endif|endforeach|endfor|endwhile)(\s*)/';
return preg_replace($pattern, '$1<?php $2; ?>$3', $value);
}
......
......@@ -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');
......@@ -191,7 +191,7 @@ class Bundle {
foreach (static::$bundles as $key => $value)
{
if (isset($value['handles']) and starts_with($uri, $value['handles'].'/'))
if (isset($value['handles']) and starts_with($uri, $value['handles'].'/') or $value['handles'] == '/')
{
return $key;
}
......@@ -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')
......@@ -461,4 +461,16 @@ class Bundle {
return array_keys(static::$bundles);
}
/**
* Expand given bundle path of form "[bundle::]path/...".
*
* @param string $path
* @return string
*/
public static function expand($path)
{
list($bundle, $element) = static::parse($path);
return static::path($bundle).$element;
}
}
\ No newline at end of file
......@@ -67,6 +67,7 @@ abstract class Driver {
* @param string $key
* @param mixed $default
* @param int $minutes
* @param string $function
* @return mixed
*/
public function remember($key, $default, $minutes, $function = 'put')
......
......@@ -20,6 +20,7 @@ class Memcached extends Sectionable {
* Create a new Memcached cache driver instance.
*
* @param Memcached $memcache
* @param string $key
* @return void
*/
public function __construct(\Memcached $memcache, $key)
......
......@@ -63,6 +63,7 @@ abstract class Sectionable extends Driver {
* @param string $key
* @param mixed $default
* @param int $minutes
* @param string $function
* @return mixed
*/
public function remember_in_section($section, $key, $default, $minutes, $function = 'put')
......
......@@ -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
......
......@@ -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,11 +121,11 @@ 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))
{
require $path;
require_once $path;
$task = static::format($bundle, $task);
......
......@@ -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;
});
}
\ No newline at end of file
......@@ -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']);
......
......@@ -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');
......@@ -73,7 +73,7 @@ abstract class Provider {
// zip that was put in the storage directory.
if ($remote === false)
{
throw new \Exception("Error downloading bundle [{$bundle}].");
throw new \Exception("Error downloading the requested bundle.");
}
return $remote;
......
{
"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"
}
}
}
\ No newline at end of file
<?php namespace Laravel\CLI\Tasks;
use Laravel\Str;
use Laravel\File;
class Help extends Task {
/**
* List available artisan commands.
*
* @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);
}
}
}
}
\ No newline at end of file
......@@ -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();
......
......@@ -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);
......
......@@ -14,7 +14,7 @@ class Route extends Task {
*/
public function call($arguments = array())
{
if ( ! count($arguments) == 2)
if ( count($arguments) != 2)
{
throw new \Exception("Please specify a request method and URI.");
}
......@@ -41,7 +41,7 @@ class Route extends Task {
// We'll call the router using the method and URI specified by
// the developer on the CLI. If a route is found, we will not
// run the filters, but simply dump the result.
$route = Router::route(Request::method(), URI::current());
$route = Router::route(Request::method(), $_SERVER['REQUEST_URI']);
if ( ! is_null($route))
{
......@@ -53,4 +53,4 @@ class Route extends Task {
}
}
}
\ No newline at end of file
}
<?php
/**
* Laravel - A PHP Framework For Web Artisans
*
* @package Laravel
* @version 3.0.0
* @author Taylor Otwell <taylorotwell@gmail.com>
* @link http://laravel.com
*/
// --------------------------------------------------------------
// Define the directory separator for the environment.
......@@ -18,22 +10,6 @@ define('DS', DIRECTORY_SEPARATOR);
// --------------------------------------------------------------
require 'paths.php';
// --------------------------------------------------------------
// Override the application paths when testing the core.
// --------------------------------------------------------------
$config = file_get_contents('phpunit.xml');
if (strpos($config, 'laravel-tests') !== false)
{
$path = path('bundle').'laravel-tests'.DS;
set_path('app', $path.'application'.DS);
set_path('bundle', $path.'bundles'.DS);
set_path('storage', $path.'storage'.DS);
}
// --------------------------------------------------------------
// Bootstrap the Laravel core.
// --------------------------------------------------------------
......
......@@ -7,9 +7,19 @@ use Laravel\CLI\Tasks\Task;
class Runner extends Task {
/**
* The base directory where the tests will be executed.
*
* A phpunit.xml should also be stored in that directory.
*
* @var string
*/
protected $base_path;
/**
* Run all of the unit tests for the application.
*
* @param array $bundles
* @return void
*/
public function run($bundles = array())
......@@ -26,17 +36,8 @@ class Runner extends Task {
*/
public function core()
{
if ( ! is_dir(path('bundle').'laravel-tests'))
{
throw new \Exception("The bundle [laravel-tests] has not been installed!");
}
// When testing the Laravel core, we will just stub the path directly
// so the test bundle is not required to be registered in the bundle
// configuration, as it is kind of a unique bundle.
$this->stub(path('bundle').'laravel-tests/cases');
$path = path('bundle').'laravel-tests/';
$this->base_path = path('sys').'tests'.DS;
$this->stub(path('sys').'tests'.DS.'cases');
$this->test();
}
......@@ -54,6 +55,8 @@ class Runner extends Task {
$bundles = Bundle::names();
}
$this->base_path = path('sys').'cli'.DS.'tasks'.DS.'test'.DS;
foreach ($bundles as $bundle)
{
// To run PHPUnit for the application, bundles, and the framework
......@@ -77,13 +80,20 @@ class Runner extends Task {
protected function test()
{
// We'll simply fire off PHPUnit with the configuration switch
// pointing to our temporary configuration file. This allows
// pointing to our requested configuration file. This allows
// us to flexibly run tests for any setup.
$path = path('base').'phpunit.xml';
$path = 'phpunit.xml';
// fix the spaced directories problem when using the command line
// strings with spaces inside should be wrapped in quotes.
$esc_path = escapeshellarg($path);
passthru('phpunit --configuration '.$path);
passthru('phpunit --configuration '.$esc_path, $status);
@unlink($path);
// Pass through the exit status
exit($status);
}
/**
......@@ -103,7 +113,7 @@ class Runner extends Task {
// locations depending on what the developer wants to test.
foreach (array('bootstrap', 'directory') as $item)
{
$stub = $this->{"swap_{$item}"}($stub, $path, $directory);
$stub = $this->{"swap_{$item}"}($stub, $directory);
}
File::put(path('base').'phpunit.xml', $stub);
......@@ -113,24 +123,22 @@ class Runner extends Task {
* Swap the bootstrap file in the stub.
*
* @param string $stub
* @param string $path
* @param string $directory
* @return string
*/
protected function swap_bootstrap($stub, $path, $directory)
protected function swap_bootstrap($stub, $directory)
{
return str_replace('{{bootstrap}}', $path.'phpunit.php', $stub);
return str_replace('{{bootstrap}}', $this->base_path.'phpunit.php', $stub);
}
/**
* Swap the directory in the stub.
*
* @param string $stub
* @param string $path
* @param string $directory
* @return string
*/
protected function swap_directory($stub, $path, $directory)
protected function swap_directory($stub, $directory)
{
return str_replace('{{directory}}', $directory, $stub);
}
......
......@@ -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,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);
}
}
\ No newline at end of file
}
......@@ -17,6 +17,20 @@ define('BLADE_EXT', '.blade.php');
define('DEFAULT_BUNDLE', 'application');
define('MB_STRING', (int) function_exists('mb_get_info'));
/*
|--------------------------------------------------------------------------
| Start Output Buffering
|--------------------------------------------------------------------------
|
| Output buffering allows us to capture all output at any time, so that we
| can discard it or treat it accordingly. An example of this is if you have
| echoed a string, but want to return a Redirect object. Because Symfony
| only checks if headers have been sent, your redirect just silently fails.
|
*/
ob_start('mb_output_handler');
/*
|--------------------------------------------------------------------------
| Require Core Classes
......@@ -147,7 +161,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 +192,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 +230,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.
|
*/
......
<?php namespace Laravel;
use Closure;
use Laravel\Database\Expression;
use Laravel\Database\Connection;
......
......@@ -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'));
}
......@@ -194,7 +194,7 @@ class Connection {
return $statement->rowCount();
}
// For insert statements that use the "returning" clause, which is allowed
// by databsae systems such as Postgres, we need to actually return the
// by database systems such as Postgres, we need to actually return the
// real query result so the consumer can get the ID.
elseif (stripos($sql, 'insert') === 0 and stripos($sql, 'returning') !== false)
{
......@@ -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');
......
......@@ -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;
}
......
......@@ -28,8 +28,16 @@ class SQLServer extends Connector {
// also be used to connect to Azure SQL Server databases. The port is defined
// directly after the server name, so we'll create that first.
$port = (isset($port)) ? ','.$port : '';
$dsn = "sqlsrv:Server={$host}{$port};Database={$database}";
//check for dblib for mac users connecting to mssql (utilizes freetds)
if (!empty($dsn_type) and $dsn_type == 'dblib')
{
$dsn = "dblib:host={$host}{$port};dbname={$database}";
}
else
{
$dsn = "sqlsrv:Server={$host}{$port};Database={$database}";
}
return new PDO($dsn, $username, $password, $this->options($config));
}
......
......@@ -218,9 +218,11 @@ abstract class Model {
{
$model = new static(array(), true);
if (static::$timestamps) $attributes['updated_at'] = new \DateTime;
$model->fill($attributes);
return $model->query()->where($model->key(), '=', $id)->update($attributes);
if (static::$timestamps) $model->timestamp();
return $model->query()->where($model->key(), '=', $id)->update($model->attributes);
}
/**
......@@ -253,27 +255,7 @@ abstract class Model {
*/
public function _with($includes)
{
$includes = (array) $includes;
$all_includes = array();
foreach($includes as $include)
{
$nested = explode('.', $include);
$inc = array();
foreach($nested as $relation)
{
$inc[] = $relation;
$all_includes[] = implode('.', $inc);
}
}
//remove duplicates and reset the array keys.
$this->includes = array_values(array_unique($all_includes));
$this->includes = (array) $includes;
return $this;
}
......@@ -463,13 +445,23 @@ abstract class Model {
*
* @return void
*/
protected function timestamp()
public function timestamp()
{
$this->updated_at = new \DateTime;
if ( ! $this->exists) $this->created_at = $this->updated_at;
}
/**
*Updates the timestamp on the model and immediately saves it.
*
* @return void
*/
public function touch(){
$this->timestamp();
$this->save();
}
/**
* Get a new fluent query builder instance for the model.
*
......@@ -500,7 +492,7 @@ abstract class Model {
*/
public function changed($attribute)
{
return array_get($this->attributes, $attribute) !== array_get($this->original, $attribute);
return array_get($this->attributes, $attribute) != array_get($this->original, $attribute);
}
/**
......@@ -635,6 +627,8 @@ abstract class Model {
// to_array method, keying them both by name and ID.
elseif (is_array($models))
{
$attributes[$name] = array();
foreach ($models as $id => $model)
{
$attributes[$name][$id] = $model->to_array();
......
......@@ -26,7 +26,7 @@ class Pivot extends Model {
public function __construct($table, $connection = null)
{
$this->pivot_table = $table;
$this->connection = $connection;
static::$connection = $connection;
parent::__construct(array(), true);
}
......@@ -41,14 +41,4 @@ class Pivot extends Model {
return $this->pivot_table;
}
/**
* Get the connection used by the pivot table.
*
* @return string
*/
public function connection()
{
return $this->connection;
}
}
\ No newline at end of file
......@@ -85,12 +85,14 @@ class Has_Many_And_Belongs_To extends Relationship {
/**
* Insert a new record into the joining table of the association.
*
* @param int $id
* @param array $joining
* @param Model|int $id
* @param array $attributes
* @return bool
*/
public function attach($id, $attributes = array())
{
if ($id instanceof Model) $id = $id->get_key();
$joining = array_merge($this->join_record($id), $attributes);
return $this->insert_joining($joining);
......@@ -99,12 +101,13 @@ class Has_Many_And_Belongs_To extends Relationship {
/**
* Detach a record from the joining table of the association.
*
* @param int $ids
* @param array|Model|int $ids
* @return bool
*/
public function detach($ids)
{
if ( ! is_array($ids)) $ids = array($ids);
if ($ids instanceof Model) $ids = array($ids->get_key());
elseif ( ! is_array($ids)) $ids = array($ids);
return $this->pivot()->where_in($this->other_key(), $ids)->delete();
}
......
......@@ -7,16 +7,25 @@ class Has_One_Or_Many extends Relationship {
/**
* Insert a new record for the association.
*
* If save is successful, the model will be returned, otherwise false.
*
* @param Model|array $attributes
* @return bool
* @return Model|false
*/
public function insert($attributes)
{
$attributes = ($attributes instanceof Model) ? $attributes->attributes : $attributes;
$attributes[$this->foreign_key()] = $this->base->get_key();
if ($attributes instanceof Model)
{
$attributes->set_attribute($this->foreign_key(), $this->base->get_key());
return $attributes->save() ? $attributes : false;
}
else
{
$attributes[$this->foreign_key()] = $this->base->get_key();
return $this->model->create($attributes);
return $this->model->create($attributes);
}
}
/**
......
......@@ -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)
......
......@@ -621,7 +621,7 @@ class Query {
// set the keys on the array of values using the array_combine
// function provided by PHP, which should give us the proper
// array form to return from the method.
if ( ! is_null($key))
if ( ! is_null($key) && count($results))
{
return array_combine(array_map(function($row) use ($key)
{
......
......@@ -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
......
......@@ -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
......
......@@ -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;
......
......@@ -40,6 +40,25 @@ class Schema {
return static::execute($table);
}
/**
* Rename a database table in the schema.
*
* @param string $table
* @param string $new_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].");
}
}
\ No newline at end of file
}
......@@ -9,7 +9,7 @@ abstract class Grammar extends \Laravel\Database\Grammar {
* Generate the SQL statement for creating a foreign key.
*
* @param Table $table
* @param Command $command
* @param Fluent $command
* @return string
*/
public function foreign(Table $table, Fluent $command)
......@@ -50,11 +50,23 @@ abstract class Grammar extends \Laravel\Database\Grammar {
return $sql;
}
/**
* Generate the SQL statement for a drop table command.
*
* @param Table $table
* @param Fluent $command
* @return string
*/
public function drop(Table $table, Fluent $command)
{
return 'DROP TABLE '.$this->wrap($table);
}
/**
* Drop a constraint from the table.
*
* @param Table $table
* @param Fluent $fluent
* @param Fluent $command
* @return string
*/
protected function drop_constraint(Table $table, Fluent $command)
......@@ -96,4 +108,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);
}
}
\ No newline at end of file
......@@ -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)
......@@ -99,7 +99,7 @@ class MySQL extends Grammar {
*/
protected function unsigned(Table $table, Fluent $column)
{
if ($column->type == 'integer' && $column->unsigned)
if ($column->type == 'integer' && ($column->unsigned || $column->increment))
{
return ' UNSIGNED';
}
......@@ -128,7 +128,7 @@ class MySQL extends Grammar {
{
if ( ! is_null($column->default))
{
return " DEFAULT '".$column->default."'";
return " DEFAULT '".$this->default_value($column->default)."'";
}
}
......@@ -143,7 +143,7 @@ class MySQL extends Grammar {
{
if ($column->type == 'integer' and $column->increment)
{
return ' UNSIGNED AUTO_INCREMENT PRIMARY KEY';
return ' AUTO_INCREMENT PRIMARY KEY';
}
}
......@@ -213,15 +213,15 @@ class MySQL extends Grammar {
}
/**
* Generate the SQL statement for a drop table command.
* Generate the SQL statement for a rename table command.
*
* @param Table $table
* @param Fluent $command
* @return string
*/
public function drop(Table $table, Fluent $command)
public function rename(Table $table, Fluent $command)
{
return 'DROP TABLE '.$this->wrap($table);
return 'RENAME TABLE '.$this->wrap($table).' TO '.$this->wrap($command->name);
}
/**
......@@ -260,7 +260,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
......@@ -284,7 +284,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
......@@ -311,7 +311,7 @@ class MySQL extends Grammar {
* Drop a foreign key constraint from the table.
*
* @param Table $table
* @param Fluent $fluent
* @param Fluent $command
* @return string
*/
public function drop_foreign(Table $table, Fluent $command)
......@@ -353,7 +353,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
......@@ -371,7 +371,7 @@ class MySQL extends Grammar {
*/
protected function type_boolean(Fluent $column)
{
return 'TINYINT';
return 'TINYINT(1)';
}
/**
......@@ -418,4 +418,4 @@ class MySQL extends Grammar {
return 'BLOB';
}
}
\ No newline at end of file
}
......@@ -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)."'";
}
}
......@@ -199,15 +199,15 @@ class Postgres extends Grammar {
}
/**
* Generate the SQL statement for a drop table command.
* Generate the SQL statement for a rename table command.
*
* @param Table $table
* @param Fluent $command
* @return string
*/
public function drop(Table $table, Fluent $command)
public function rename(Table $table, Fluent $command)
{
return 'DROP TABLE '.$this->wrap($table);
return 'ALTER TABLE '.$this->wrap($table).' RENAME TO '.$this->wrap($command->name);
}
/**
......@@ -246,7 +246,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
......@@ -297,12 +297,12 @@ class Postgres extends Grammar {
* Drop a foreign key constraint from the table.
*
* @param Table $table
* @param Fluent $fluent
* @param Fluent $command
* @return string
*/
public function drop_foreign(Table $table, Fluent $command)
{
return $this->drop_constraint($table, $command);
return $this->drop_constraint($table, $command);
}
/**
......@@ -339,7 +339,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
......
......@@ -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));
}
}
......@@ -202,19 +202,19 @@ class SQLite extends Grammar {
}
/**
* Generate the SQL statement for a drop table command.
* Generate the SQL statement for a rename table command.
*
* @param Table $table
* @param Fluent $command
* @param Table $table
* @param Fluent $command
* @return string
*/
public function drop(Table $table, Fluent $command)
public function rename(Table $table, Fluent $command)
{
return 'DROP TABLE '.$this->wrap($table);
return 'ALTER TABLE '.$this->wrap($table).' RENAME TO '.$this->wrap($command->name);
}
/**
* 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 +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
......@@ -283,7 +283,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
......
......@@ -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)."'";
}
}
......@@ -213,15 +213,15 @@ class SQLServer extends Grammar {
}
/**
* Generate the SQL statement for a drop table command.
* Generate the SQL statement for a rename table command.
*
* @param Table $table
* @param Fluent $command
* @param Table $table
* @param Fluent $command
* @return string
*/
public function drop(Table $table, Fluent $command)
public function rename(Table $table, Fluent $command)
{
return 'DROP TABLE '.$this->wrap($table);
return 'ALTER TABLE '.$this->wrap($table).' RENAME TO '.$this->wrap($command->name);
}
/**
......@@ -235,7 +235,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 +260,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
......@@ -315,12 +315,12 @@ class SQLServer extends Grammar {
* Drop a foreign key constraint from the table.
*
* @param Table $table
* @param Fluent $fluent
* @param Fluent $command
* @return string
*/
public function drop_foreign(Table $table, Fluent $command)
{
return $this->drop_constraint($table, $command);
return $this->drop_constraint($table, $command);
}
/**
......@@ -357,7 +357,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
......
......@@ -113,6 +113,7 @@ class Table {
*
* @param string|array $columns
* @param string $name
* @return Fluent
*/
public function foreign($columns, $name = null)
{
......@@ -144,6 +145,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.
*
......
......@@ -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>
......
......@@ -38,6 +38,14 @@ Now you can call the "run" method of your task via the command-line. You can eve
php artisan notify taylor
#### Calling a task from your application:
Command::run(array('notify'));
#### Calling a task from your application with arguements:
Command::run(array('notify', 'taylor'));
Remember, you can call specific methods on your task, so, let's add an "urgent" method to the notify task:
#### Adding a method to the task:
......@@ -97,4 +105,4 @@ To run your task just use the usual Laravel double-colon syntax to indicate the
#### Setting the default database connection:
php artisan foo --database=sqlite
\ No newline at end of file
php artisan foo --database=sqlite
......@@ -63,7 +63,7 @@ It is common to limit access to certain routes only to logged in users. In Larav
To protect a route, simply attach the **auth** filter:
Route::get('admin', array('before' => 'auth', function() {});
Route::get('admin', array('before' => 'auth', function() {}));
> **Note:** You are free to edit the **auth** filter however you like. A default implementation is located in **application/routes.php**.
......
......@@ -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:
......
......@@ -2,6 +2,16 @@
## Contents
- [Laravel 3.2.8](#3.2.8)
- [Upgrading From 3.2.7](#upgrade-3.2.8)
- [Laravel 3.2.7](#3.2.7)
- [Upgrading From 3.2.6](#upgrade-3.2.7)
- [Laravel 3.2.6](#3.2.6)
- [Upgrading From 3.2.5](#upgrade-3.2.6)
- [Laravel 3.2.5](#3.2.5)
- [Upgrading From 3.2.4](#upgrade-3.2.5)
- [Laravel 3.2.4](#3.2.4)
- [Upgrading From 3.2.3](#upgrade-3.2.4)
- [Laravel 3.2.3](#3.2.3)
- [Upgrading From 3.2.2](#upgrade-3.2.3)
- [Laravel 3.2.2](#3.2.2)
......@@ -31,6 +41,59 @@
- [Laravel 3.1](#3.1)
- [Upgrading From 3.0](#upgrade-3.1)
<a name="3.2.8"></a>
## Laravel 3.2.8
- Fix double slash bug in URLs when using languages and no "index.php".
<a name="upgrade-3.2.8"></a>
### Upgrading From 3.2.7
- Replace the **laravel** folder.
<a name="3.2.7"></a>
## Laravel 3.2.7
- Fix bug in Eloquent `to_array` method.
- Fix bug in displaying of generic error page.
<a name="upgrade-3.2.7"></a>
### Upgrading From 3.2.6
- Replace the **laravel** folder.
<a name="3.2.6"></a>
## Laravel 3.2.6
- Revert Blade code back to 3.2.3 tag.
<a name="upgrade-3.2.6"></a>
### Upgrading From 3.2.5
- Replace the **laravel** folder.
<a name="3.2.5"></a>
## Laravel 3.2.5
- Revert nested where code back to 3.2.3 tag.
<a name="upgrade-3.2.5"></a>
### Upgrading From 3.2.4
- Replace the **laravel** folder.
<a name="3.2.4"></a>
## Laravel 3.2.4
- Speed up many to many eager loading mapping.
- Tweak the Eloquent::changed() method.
- Various bug fixes and improvements.
<a name="upgrade-3.2.3"></a>
### Upgrading From 3.2.3
- Replace the **laravel** folder.
<a name="3.2.3"></a>
## Laravel 3.2.3
......@@ -38,7 +101,7 @@
- Added `laravel.resolving` event for all IoC resolutions.
<a name="upgrade-3.2.3"></a>
## Upgrading From 3.2.2
### Upgrading From 3.2.2
- Replace the **laravel** folder.
......@@ -54,7 +117,7 @@
- Added `password` option to Auth configuration.
<a name="upgrade-3.2.2"></a>
## Upgrading From 3.2.1
### Upgrading From 3.2.1
- Replace the **laravel** folder.
......@@ -69,7 +132,7 @@
- Added `format` method to message container.
<a name="upgrade-3.2.1"></a>
## Upgrading From 3.2
### Upgrading From 3.2
- Replace the **laravel** folder.
......@@ -126,7 +189,7 @@
- Added `array_except` and `array_only` helpers, similar to `Input::except` and `Input::only` but for arbitrary arrays.
<a name="upgrade-3.2"></a>
## Upgrading From 3.1
### Upgrading From 3.1
- Add new `asset_url` and `profiler` options to application configuration.
- Replace **auth** configuration file.
......@@ -151,7 +214,7 @@ Add the following code above `Blade::sharpen()` in `application/start.php`..
- Fixes cookie session driver bug that caused infinite loop on some occasions.
<a name="upgrade-3.1.9"></a>
## Upgrading From 3.1.8
### Upgrading From 3.1.8
- Replace the **laravel** folder.
......@@ -161,7 +224,7 @@ Add the following code above `Blade::sharpen()` in `application/start.php`..
- Fixes possible WSOD when using Blade's @include expression.
<a name="upgrade-3.1.8"></a>
## Upgrading From 3.1.7
### Upgrading From 3.1.7
- Replace the **laravel** folder.
......@@ -173,7 +236,7 @@ Add the following code above `Blade::sharpen()` in `application/start.php`..
- Classify migration names.
<a name="upgrade-3.1.7"></a>
## Upgrading From 3.1.6
### Upgrading From 3.1.6
- Replace the **laravel** folder.
......@@ -183,7 +246,7 @@ Add the following code above `Blade::sharpen()` in `application/start.php`..
- Fixes many-to-many eager loading in Eloquent.
<a name="upgrade-3.1.6"></a>
## Upgrading From 3.1.5
### Upgrading From 3.1.5
- Replace the **laravel** folder.
......@@ -193,7 +256,7 @@ Add the following code above `Blade::sharpen()` in `application/start.php`..
- Fixes bug that could allow secure cookies to be sent over HTTP.
<a name="upgrade-3.1.5"></a>
## Upgrading From 3.1.4
### Upgrading From 3.1.4
- Replace the **laravel** folder.
......@@ -204,7 +267,7 @@ Add the following code above `Blade::sharpen()` in `application/start.php`..
- Fixes SQL "where in" (...) short-cut bug.
<a name="upgrade-3.1.4"></a>
## Upgrading From 3.1.3
### Upgrading From 3.1.3
- Replace the **laravel** folder.
......@@ -214,7 +277,7 @@ Add the following code above `Blade::sharpen()` in `application/start.php`..
- Fixes **delete** method in Eloquent models.
<a name="upgrade-3.1.3"></a>
## Upgrade From 3.1.2
### Upgrade From 3.1.2
- Replace the **laravel** folder.
......@@ -224,7 +287,7 @@ Add the following code above `Blade::sharpen()` in `application/start.php`..
- Fixes Eloquent query method constructor conflict.
<a name="upgrade-3.1.2"></a>
## Upgrade From 3.1.1
### Upgrade From 3.1.1
- Replace the **laravel** folder.
......@@ -234,7 +297,7 @@ Add the following code above `Blade::sharpen()` in `application/start.php`..
- Fixes Eloquent model hydration bug involving custom setters.
<a name="upgrade-3.1.1"></a>
## Upgrading From 3.1
### Upgrading From 3.1
- Replace the **laravel** folder.
......@@ -272,48 +335,48 @@ Add the following code above `Blade::sharpen()` in `application/start.php`..
- Added "before" and "after" validation checks for dates.
<a name="upgrade-3.1"></a>
## Upgrading From 3.0
### Upgrading From 3.0
### Replace your **application/start.php** file.
#### Replace your **application/start.php** file.
The default **start.php** file has been expanded in order to give you more flexibility over the loading of your language, configuration, and view files. To upgrade your file, copy your current file and paste it at the bottom of a copy of the new Laravel 3.1 start file. Next, scroll up in the **start** file until you see the default Autoloader registrations (line 61 and line 76). Delete both of these sections since you just pasted your previous auto-loader registrations at the bottom of the file.
### Remove the **display** option from your **errors** configuration file.
#### Remove the **display** option from your **errors** configuration file.
This option is now set at the beginning of your **application/start** file.
### Call the parent controller's constructor from your controller.
#### Call the parent controller's constructor from your controller.
Simply add a **parent::__construct();** to to any of your controllers that have a constructor.
### Prefix Laravel migration created indexes with their table name.
#### Prefix Laravel migration created indexes with their table name.
If you have created indexes on tables using the Laravel migration system and you used to the default index naming scheme provided by Laravel, prefix the index names with their table name on your database. So, if the current index name is "id_unique" on the "users" table, make the index name "users_id_unique".
### Add alias for Eloquent in your application configuration.
#### Add alias for Eloquent in your application configuration.
Add the following to the **aliases** array in your **application/config/application.php** file:
'Eloquent' => 'Laravel\\Database\\Eloquent\\Model',
'Blade' => 'Laravel\\Blade',
### Update Eloquent many-to-many tables.
#### Update Eloquent many-to-many tables.
Eloquent now maintains **created_at** and **updated_at** column on many-to-many intermediate tables by default. Simply add these columns to your tables. Also, many-to-many tables are now the singular model names concatenated with an underscore. For example, if the relationship is between User and Role, the intermediate table name should be **role_user**.
### Remove Eloquent bundle.
#### Remove Eloquent bundle.
If you are using the Eloquent bundle with your installation, you can remove it from your bundles directory and your **application/bundles.php** file. Eloquent version 2 is included in the core in Laravel 3.1. Your models can also now extend simply **Eloquent** instead of **Eloquent\Model**.
### Update your **config/strings.php** file.
#### Update your **config/strings.php** file.
English pluralization and singularization is now automatic. Just completely replace your **application/config/strings.php** file.
### Add the **fetch** option to your database configuration file.
#### Add the **fetch** option to your database configuration file.
A new **fetch** option allows you to specify in which format you receive your database results. Just copy and paste the option from the new **application/config/database.php** file.
### Add **database** option to your Redis configuration.
#### Add **database** option to your Redis configuration.
If you are using Redis, add the "database" option to your Redis connection configurations. The "database" value can be zero by default.
......
......@@ -4,6 +4,7 @@
- [Installation & Setup](/docs/install)
- [Requirements](/docs/install#requirements)
- [Installation](/docs/install#installation)
- [Server Configuration](/docs/install#server-configuration)
- [Basic Configuration](/docs/install#basic-configuration)
- [Environments](/docs/install#environments)
- [Cleaner URLs](/docs/install#cleaner-urls)
......@@ -17,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)
......@@ -107,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)
\ No newline at end of file
- [Commands](/docs/artisan/commands)
### Contributing
- [Laravel on GitHub](/docs/contrib/github)
- [Command Line](/docs/contrib/command-line)
- [TortoiseGit](/docs/contrib/tortoisegit)
# 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.
# Laravel on GitHub
## Contents
- [The Basics](#the-basics)
- [Repositories](#repositories)
- [Branches](#branches)
- [Pull Requests](#pull-requests)
<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.*
- **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.
<a name="pull-requests"></a>
## Pull Requests
[GitHub pull requests](https://help.github.com/articles/using-pull-requests) are a great way for everyone in the community to contribute to the Laravel codebase. Found a bug? Just fix it in your fork and submit a pull request. This will then be reviewed, and, if found as good, merged into the main repository.
In order to keep the codebase clean, stable and at high quality, even with so many people contributing, some guidelines are necessary for high-quality pull requests:
- **Branch:** Unless they are immediate documentation fixes relevant for old versions, pull requests should be sent to the `develop` branch only. Make sure to select that branch as target when creating the pull request (GitHub will not automatically select it.)
- **Documentation:** If you are adding a new feature or changing the API in any relevant way, this should be documented. The documentation files can be found directly in the core repository.
- **Unit tests:** To keep old bugs from re-appearing and generally hold quality at a high level, the Laravel core is thoroughly unit-tested. Thus, when you create a pull request, it is expected that you unit test any new code you add. For any bug you fix, you should also add regression tests to make sure the bug will never appear again. If you are unsure about how to write tests, the core team or other contributors will gladly help.
*Further Reading*
- [Contributing to Laravel via Command-Line](docs/contrib/command-line)
- [Contributing to Laravel using TortoiseGit](docs/contrib/tortoisegit)
# 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.
......@@ -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:
......
......@@ -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.
\ No newline at end of file
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).
\ No newline at end of file
......@@ -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
......@@ -65,7 +66,7 @@ Need to retrieve an entire table? Just use the static **all** method:
echo $user->email;
}
Of course, retrieving an entire table isn't very helpful. Thankfully, **every method that is available through the fluent query builder is available in Eloquent**. Just begin querying your model with a static call to one of the [query builder](/docs/database/query) methods, and execute the query using the **get** or **first** method. The get method will return an array of models, while the first method will return a single model:
Of course, retrieving an entire table isn't very helpful. Thankfully, **every method that is available through the fluent query builder is available in Eloquent**. Just begin querying your model with a static call to one of the [query builder](/docs/database/fluent) methods, and execute the query using the **get** or **first** method. The get method will return an array of models, while the first method will return a single model:
$user = User::where('email', '=', $email)->first();
......@@ -131,6 +132,18 @@ Need to maintain creation and update timestamps on your database records? With E
Next, add **created_at** and **updated_at** date columns to your table. Now, whenever you save the model, the creation and update timestamps will be set automatically. You're welcome.
In some cases it may be useful to update the **updated_at** date column without actually modifying any data within the model. Simply use the **touch** method, which will also automatically save the changes immediately:
$comment = Comment::find(1);
$comment->touch();
You can also use the **timestamp** function to update the **updated_at** date column without saving the model immediately. Note that if you are actually modifying the model's data this is handled behind the scenes:
$comment = Comment::find(1);
$comment->timestamp();
//do something else here, but not modifying the $comment model data
$comment->save();
> **Note:** You can change the default timezone of your application in the **application/config/application.php** file.
<a name="relationships"></a>
......@@ -223,7 +236,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 +255,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 +291,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
......@@ -286,7 +311,7 @@ Let's assume you have a **Post** model that has many comments. Often you may wan
$post = Post::find(1);
$post->comments()->insert($comment);
$comment = $post->comments()->insert($comment);
When inserting related models through their parent model, the foreign key will automatically be set. So, in this case, the "post_id" was automatically set to "1" on the newly inserted comment.
......@@ -310,7 +335,7 @@ This is even more helpful when working with many-to-many relationships. For exam
$user = User::find(1);
$user->roles()->insert($role);
$role = $user->roles()->insert($role);
Now, when the Role is inserted, not only is the Role inserted into the "roles" table, but a record in the intermediate table is also inserted for you. It couldn't be easier!
......@@ -318,6 +343,10 @@ 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>
Alternatively, you can use the `sync` method, which accepts an array of IDs to "sync" with the intermediate table. After this operation is complete, only the IDs in the array will be on the intermediate table.
......@@ -406,6 +435,28 @@ You may even eager load nested relationships. For example, let's assume our **Au
$books = Book::with(array('author', 'author.contacts'))->get();
If you find yourself eager loading the same models often, you may want to use **$includes** in the model.
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)
{
echo $book->author->name;
}
> **Note:** Using **with** will override a models **$includes**.
<a name="constraining-eager-loads"></a>
## Constraining Eager Loads
......@@ -498,4 +549,13 @@ Sometimes you may wish to limit the attributes that are included in your model's
public static $hidden = array('password');
}
\ No newline at end of file
}
<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.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment