Commit a56f0b2f authored by Franz Liedke's avatar Franz Liedke

Merge branch 'develop' of https://github.com/laravel/laravel into develop

parents abd30eb3 ec13efb7
language: php
php:
- 5.3
script: "php artisan test:core"
\ 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 غير موجودة.",
......
......@@ -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
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
......@@ -24,6 +24,7 @@ return array(
"alpha" => ":attribute darf nur Buchstaben beinhalten.",
"alpha_dash" => ":attribute sollte nur aus Buchstaben, Nummern und Bindestrichen bestehen.",
"alpha_num" => ":attribute sollte 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.",
......@@ -31,6 +32,10 @@ return array(
"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.",
......
......@@ -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.",
......
......@@ -24,6 +24,7 @@ return array(
"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.",
......@@ -31,6 +32,10 @@ return array(
"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.",
......
<?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
......@@ -27,6 +27,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.",
......@@ -34,6 +35,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 לא קיים.",
......
......@@ -24,6 +24,7 @@ return array(
"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.",
......@@ -31,6 +32,10 @@ return array(
"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ő.",
......
......@@ -24,6 +24,7 @@ return array(
"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.",
......@@ -31,6 +32,10 @@ return array(
"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.",
......
......@@ -40,6 +40,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までの数字をご指定ください。",
......@@ -47,6 +48,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は正しくありません。",
......
......@@ -15,6 +15,7 @@ return array(
"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",
"array" => "The :attribute must have selected elements.",
"before" => "Het :attribute moet een datum voor :date zijn.",
"between" => array(
"numeric" => "Het :attribute moet tussen :min en :max zijn.",
......@@ -22,6 +23,10 @@ return array(
"string" => "Het :attribute moet tussen :min en :max tekens zijn.",
),
"confirmed" => "Het :attribute bevestiging komt niet overeen.",
"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" => "Het :attribute en :other moeten verschillend zijn.",
"email" => "Het :attribute formaat is ongeldig.",
"exists" => "Het gekozen :attribute is al ingebruik.",
......
......@@ -2,98 +2,103 @@
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.
|
*/
/*
|--------------------------------------------------------------------------
| 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.",
"before" => ":attribute musi zawierać datę, która jest przed :date.",
"between" => array(
"numeric" => ":ttribute 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.",
"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.",
"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 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(),
'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.
|
*/
/*
|--------------------------------------------------------------------------
| 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(),
'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.4
* @version 3.2.8
* @author Taylor Otwell <taylorotwell@gmail.com>
* @link http://laravel.com
*/
......
......@@ -7,14 +7,20 @@ 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;
}
}
......
......@@ -95,7 +95,6 @@ class Blade {
*
* @param string $view
* @param string $path
* @param string $compiled
* @return bool
*/
public static function expired($view, $path)
......@@ -150,18 +149,18 @@ class Blade {
}
// First we'll split out the lines of the template so we can get the
// layout from the top of the template. By convention, it must be
// layout from the top of the template. By convention it must be
// located on the first line of the template contents.
preg_replace_callback(
'/^@layout(\s*?\(.+?\))(\r?\n)?/',
function($matches) use (&$value)
{
$value = substr( $value, strlen( $matches[0] ) ).CRLF.'@include'.$matches[1];
},
$value
);
$lines = preg_split("/(\r?\n)/", $value);
return $value;
$pattern = static::matcher('layout');
$lines[] = preg_replace($pattern, '$1@include$2', $lines[0]);
// We will add a "render" statement to the end of the templates and
// then slice off the "@layout" shortcut from the start so the
// sections register before the parent template renders.
return implode(CRLF, array_slice($lines, 1));
}
/**
......@@ -172,10 +171,9 @@ class Blade {
*/
protected static function extract($value, $expression)
{
if ( preg_match("/@layout\s*?\(\s*?'(.+?)'\s*?\)/", $value, $matches))
{
return trim( $matches[1] );
}
preg_match('/@layout(\s*\(.*\))(\s*)/', $value, $matches);
return str_replace(array("('", "')"), '', $matches[1]);
}
/**
......@@ -186,9 +184,9 @@ class Blade {
*/
protected static function compile_comments($value)
{
$value = preg_replace('/\{\{--(.*?)--\}\}/', "<?php // $1 ?>", $value);
return preg_replace('/\{\{--(.*?)--\}\}/s', "<?php /* ?>$1<?php */ ?>", $value);
$value = preg_replace('/\{\{--(.+?)(--\}\})?\n/', "<?php // $1 ?>", $value);
return preg_replace('/\{\{--((.|\s)*?)--\}\}/', "<?php /* $1 */ ?>\n", $value);
}
/**
......@@ -199,7 +197,7 @@ class Blade {
*/
protected static function compile_echos($value)
{
return preg_replace('/\{\{(.+?)\}\}/s', '<?php echo $1; ?>', $value);
return preg_replace('/\{\{(.+?)\}\}/', '<?php echo $1; ?>', $value);
}
/**
......@@ -210,21 +208,27 @@ class Blade {
*/
protected static function compile_forelse($value)
{
preg_match_all('/@forelse\s*?\(\s*?\$(.+?)\s*?as\s*?\$(.+?)\s*?\)/', $value, $matches, PREG_SET_ORDER );
if ( count($matches) < 1 ) return $value;
preg_match_all('/(\s*)@forelse(\s*\(.*\))(\s*)/', $value, $matches);
foreach ($matches as $forelse)
foreach ($matches[0] as $forelse)
{
preg_match('/\s*\(\s*(\S*)\s/', $forelse, $variable);
// Once we have extracted the variable being looped against, we can add
// an if statement to the start of the loop that checks if the count
// of the variable being looped against is greater than zero.
$replace = '<?php if (count($'.$forelse[1].') > 0): foreach ($'.$forelse[1].' as $'.$forelse[2].'): ?>';
$if = "<?php if (count({$variable[1]}) > 0): ?>";
$search = '/(\s*)@forelse(\s*\(.*\))/';
$replace = '$1'.$if.'<?php foreach$2: ?>';
$blade = preg_replace($search, $replace, $forelse);
// Finally, once we have the check prepended to the loop we'll replace
// all instances of this forelse syntax in the view content of the
// view being compiled to Blade syntax with real PHP syntax.
$value = str_replace($forelse[0], $replace, $value);
$value = str_replace($forelse, $blade, $value);
}
return $value;
......@@ -238,7 +242,7 @@ class Blade {
*/
protected static function compile_empty($value)
{
return str_replace('@empty', '<?php endforeach; else: ?>', $value);
return str_replace('@empty', '<?php endforeach; ?><?php else: ?>', $value);
}
/**
......@@ -260,42 +264,9 @@ class Blade {
*/
protected static function compile_structure_openings($value)
{
preg_replace_callback(
'/@(if|elseif|foreach|for|while)(\s*?)(\([^\n\r\t]+\))/',
function($matches) use (&$value)
{
if(count( $matches ) === 4)
{
$open = 0;
$close = 0;
$cut = 0;
$len = strlen($matches[3]);
for($i = 0; $i < $len; $i++)
{
if($matches[3][$i] === '(' )
{
$open++;
}
if($matches[3][$i] === ')' )
{
$close++;
}
if($open !== 0 && ($open === $close))
{
break;
}
}
$condition = substr($matches[3], 0, ($i + 1));
$value = str_replace(
'@'.$matches[1].$matches[2].$condition,
'<?php '.$matches[1].$condition.': ?>',
$value
);
}
},
$value
);
return $value;
$pattern = '/(\s*)@(if|elseif|foreach|for|while)(\s*\(.*\))/';
return preg_replace($pattern, '$1<?php $2$3: ?>', $value);
}
/**
......@@ -306,9 +277,9 @@ class Blade {
*/
protected static function compile_structure_closings($value)
{
$pattern = '/@(endif|endforeach|endfor|endwhile|break|continue)/';
$pattern = '/(\s*)@(endif|endforeach|endfor|endwhile)(\s*)/';
return preg_replace($pattern, '<?php $1; ?>', $value);
return preg_replace($pattern, '$1<?php $2; ?>$3', $value);
}
/**
......@@ -319,7 +290,7 @@ class Blade {
*/
protected static function compile_else($value)
{
return str_replace( '@else', '<?php else: ?>', $value);
return preg_replace('/(\s*)@(else)(\s*)/', '$1<?php $2: ?>$3', $value);
}
/**
......@@ -330,9 +301,9 @@ class Blade {
*/
protected static function compile_unless($value)
{
$pattern = static::matcher('unless');
$pattern = '/(\s*)@unless(\s*\(.*\))/';
return preg_replace($pattern, '<?php if( ! ($1)): ?>', $value);
return preg_replace($pattern, '$1<?php if( ! ($2)): ?>', $value);
}
/**
......@@ -356,7 +327,7 @@ class Blade {
{
$pattern = static::matcher('include');
return preg_replace($pattern, '<?php echo view$1->with(get_defined_vars())->render(); ?>', $value);
return preg_replace($pattern, '$1<?php echo view$2->with(get_defined_vars())->render(); ?>', $value);
}
/**
......@@ -369,7 +340,7 @@ class Blade {
{
$pattern = static::matcher('render');
return preg_replace($pattern, '<?php echo render$1; ?>', $value);
return preg_replace($pattern, '$1<?php echo render$2; ?>', $value);
}
/**
......@@ -382,7 +353,7 @@ class Blade {
{
$pattern = static::matcher('render_each');
return preg_replace($pattern, '<?php echo render_each$1; ?>', $value);
return preg_replace($pattern, '$1<?php echo render_each$2; ?>', $value);
}
/**
......@@ -397,7 +368,7 @@ class Blade {
{
$pattern = static::matcher('yield');
return preg_replace($pattern, '<?php echo \\Laravel\\Section::yield$1; ?>', $value);
return preg_replace($pattern, '$1<?php echo \\Laravel\\Section::yield$2; ?>', $value);
}
/**
......@@ -407,7 +378,9 @@ class Blade {
*/
protected static function compile_yield_sections($value)
{
return str_replace('@yield_section', '<?php echo \\Laravel\\Section::yield_section(); ?>', $value);
$replace = '<?php echo \\Laravel\\Section::yield_section(); ?>';
return str_replace('@yield_section', $replace, $value);
}
/**
......@@ -422,7 +395,7 @@ class Blade {
{
$pattern = static::matcher('section');
return preg_replace($pattern, '<?php \\Laravel\\Section::start$1; ?>', $value);
return preg_replace($pattern, '$1<?php \\Laravel\\Section::start$2; ?>', $value);
}
/**
......@@ -435,7 +408,7 @@ class Blade {
*/
protected static function compile_section_end($value)
{
return str_replace('@endsection', '<?php \\Laravel\\Section::stop(); ?>', $value);
return preg_replace('/@endsection/', '<?php \\Laravel\\Section::stop(); ?>', $value);
}
/**
......@@ -452,7 +425,7 @@ class Blade {
}
return $value;
}
}
/**
* Get the regular expression for a generic Blade function.
......@@ -462,7 +435,7 @@ class Blade {
*/
public static function matcher($function)
{
return '/@'.$function.'\s*?(\(.+?\))/';
return '/(\s*)@'.$function.'(\s*\(.*\))/';
}
/**
......@@ -476,4 +449,4 @@ class Blade {
return path('storage').'views/'.md5($path);
}
}
}
\ No newline at end of file
......@@ -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;
}
......@@ -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')
......
......@@ -8,7 +8,6 @@ class Help extends Task {
/**
* List available artisan commands.
*
* @param array $arguments
* @return void
*/
public function commands()
......
......@@ -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,17 +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.
$path = escapeshellarg($path);
passthru('phpunit --configuration '.$path);
passthru('phpunit --configuration '.$path, $status);
@unlink($path);
// Pass through the exit status
exit($status);
}
/**
......@@ -107,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);
......@@ -117,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);
}
......
......@@ -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
......
......@@ -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));
}
......
......@@ -255,22 +255,7 @@ abstract class Model {
*/
public function _with($includes)
{
$includes = (array) $includes;
$this->includes = array();
foreach ($includes as $relationship => $constraints)
{
// When eager loading relationships, constraints may be set on the eager
// load definition; however, is none are set, we need to swap the key
// and the value of the array since there are no constraints.
if (is_numeric($relationship))
{
list($relationship, $constraints) = array($constraints, null);
}
$this->includes[$relationship] = $constraints;
}
$this->includes = (array) $includes;
return $this;
}
......@@ -460,7 +445,7 @@ abstract class Model {
*
* @return void
*/
protected function timestamp()
public function timestamp()
{
$this->updated_at = new \DateTime;
......@@ -533,7 +518,7 @@ abstract class Model {
foreach ($this->attributes as $key => $value)
{
if ( ! array_key_exists($key, $this->original) or $value !== $this->original[$key])
if ( ! isset($this->original[$key]) or $value !== $this->original[$key])
{
$dirty[$key] = $value;
}
......@@ -632,6 +617,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();
......@@ -722,7 +709,7 @@ abstract class Model {
{
foreach (array('attributes', 'relationships') as $source)
{
if (array_key_exists($key, $this->$source)) return !is_null($this->$source[$key]);
if (array_key_exists($key, $this->$source)) return true;
}
if (method_exists($this, $key)) return true;
......@@ -753,7 +740,7 @@ abstract class Model {
{
$meta = array('key', 'table', 'connection', 'sequence', 'per_page', 'timestamps');
// If the method is actually the name of a static property on the model, we'll
// If the method is actually the name of a static property on the model we'll
// return the value of the static property. This makes it convenient for
// relationships to access these values off of the instances.
if (in_array($method, $meta))
......@@ -763,7 +750,7 @@ abstract class Model {
$underscored = array('with', 'find');
// Some methods need to be accessed both statically and non-statically so we'll
// Some methods need to be accessed both staticly and non-staticly so we'll
// keep underscored methods of those methods and intercept calls to them
// here so they can be called either way on the model instance.
if (in_array($method, $underscored))
......
......@@ -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
......@@ -38,7 +38,7 @@ class Query {
);
/**
* Create a new query instance for a model.
* Creat a new query instance for a model.
*
* @param Model $model
* @return void
......@@ -118,7 +118,7 @@ class Query {
$new = new $class(array(), true);
// We need to set the attributes manually in case the accessible property is
// set on the array which will prevent the mass assignment of attributes if
// set on the array which will prevent the mass assignemnt of attributes if
// we were to pass them in using the constructor or fill methods.
$new->fill_raw($result);
......@@ -141,7 +141,7 @@ class Query {
}
}
// The many to many relationships may have pivot table columns on them
// The many to many relationships may have pivot table column on them
// so we will call the "clean" method on the relationship to remove
// any pivot columns that are on the model.
if ($this instanceof Relationships\Has_Many_And_Belongs_To)
......@@ -199,7 +199,7 @@ class Query {
foreach ($this->model_includes() as $include => $constraints)
{
// To get the nested includes, we want to find any includes that begin
// the relationship with a dot, then we will strip off the leading
// the relationship and a dot, then we will strip off the leading
// nesting indicator and set the include in the array.
if (starts_with($include, $relationship.'.'))
{
......@@ -217,23 +217,22 @@ class Query {
*/
protected function model_includes()
{
$relationships = array_keys($this->model->includes);
$implicits = array();
$includes = array();
foreach ($relationships as $relationship)
foreach ($this->model->includes as $relationship => $constraints)
{
$parts = explode('.', $relationship);
$prefix = '';
foreach ($parts as $part)
// When eager loading relationships, constraints may be set on the eager
// load definition; however, is none are set, we need to swap the key
// and the value of the array since there are no constraints.
if (is_numeric($relationship))
{
$implicits[$prefix.$part] = NULL;
$prefix .= $part.'.';
list($relationship, $constraints) = array($constraints, null);
}
$includes[$relationship] = $constraints;
}
// Add all implicit includes to the explicit ones
return $this->model->includes + $implicits;
return $includes;
}
/**
......@@ -278,4 +277,4 @@ class Query {
return $this;
}
}
}
\ No newline at end of file
......@@ -44,7 +44,7 @@ class Has_Many_And_Belongs_To extends Relationship {
$this->joining = $table ?: $this->joining($model, $associated);
// If the Pivot table is timestamped, we'll set the timestamp columns to be
// fetched when the pivot table models are fetched by the developer, or else
// fetched when the pivot table models are fetched by the developer else
// the ID will be the only "extra" column fetched in by default.
if (Pivot::$timestamps)
{
......@@ -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();
}
......@@ -131,7 +134,7 @@ class Has_Many_And_Belongs_To extends Relationship {
}
// Next we will take the difference of the current and given IDs and detach
// all of the entities that exist in the current array but are not in
// all of the entities that exists in the current array but are not in
// the array of IDs given to the method, finishing the sync.
$detach = array_diff($current, $ids);
......@@ -325,21 +328,14 @@ class Has_Many_And_Belongs_To extends Relationship {
{
$foreign = $this->foreign_key();
$dictionary = array();
foreach ($children as $child)
{
$dictionary[$child->pivot->$foreign][] = $child;
}
foreach ($parents as &$parent)
{
$parent_key = $parent->get_key();
if (isset($dictionary[$parent_key]))
$matching = array_filter($children, function($v) use (&$parent, $foreign)
{
$parent->relationships[$relationship] = $dictionary[$parent_key];
}
return $v->pivot->$foreign == $parent->get_key();
});
$parent->relationships[$relationship] = array_values($matching);
}
}
......
......@@ -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);
}
}
/**
......
......@@ -2,7 +2,7 @@
use Closure;
use Laravel\Database;
use Paginator;
use Laravel\Paginator;
use Laravel\Database\Query\Grammars\Postgres;
use Laravel\Database\Query\Grammars\SQLServer;
......@@ -140,7 +140,7 @@ class Query {
*/
public function select($columns = array('*'))
{
$this->selects = is_array($columns) ? $columns : array($columns);
$this->selects = (array) $columns;
return $this;
}
......@@ -158,7 +158,7 @@ class Query {
{
// If the "column" is really an instance of a Closure, the developer is
// trying to create a join with a complex "ON" clause. So, we will add
// the join, and then call the Closure with the join.
// the join, and then call the Closure with the join/
if ($column1 instanceof Closure)
{
$this->joins[] = new Query\Join($type, $table);
......@@ -168,7 +168,7 @@ class Query {
// If the column is just a string, we can assume that the join just
// has a simple on clause, and we'll create the join instance and
// add the clause automatically for the developer.
// add the clause automatically for the develoepr.
else
{
$join = new Query\Join($type, $table);
......@@ -283,7 +283,7 @@ class Query {
*/
public function or_where_id($value)
{
return $this->or_where('id', '=', $value);
return $this->or_where('id', '=', $value);
}
/**
......@@ -395,7 +395,7 @@ class Query {
}
/**
* Add nested constraints to the query.
* Add a nested where condition to the query.
*
* @param Closure $callback
* @param string $connector
......@@ -403,7 +403,24 @@ class Query {
*/
public function where_nested($callback, $connector = 'AND')
{
call_user_func($callback, $this);
$type = 'where_nested';
// To handle a nested where statement, we will actually instantiate a new
// Query instance and run the callback over that instance, which will
// allow the developer to have a fresh query instance
$query = new Query($this->connection, $this->grammar, $this->from);
call_user_func($callback, $query);
// Once the callback has been run on the query, we will store the nested
// query instance on the where clause array so that it's passed to the
// query's query grammar instance when building.
if ($query->wheres !== null)
{
$this->wheres[] = compact('type', 'query', 'connector');
}
$this->bindings = array_merge($this->bindings, $query->bindings);
return $this;
}
......@@ -436,7 +453,7 @@ class Query {
foreach ($segments as $segment)
{
// If the segment is not a boolean connector, we can assume it is
// If the segment is not a boolean connector, we can assume it it is
// a column name, and we'll add it to the query as a new constraint
// of the query's where clause and keep iterating the segments.
if ($segment != '_and_' and $segment != '_or_')
......@@ -604,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)
{
......@@ -659,7 +676,7 @@ class Query {
public function aggregate($aggregator, $columns)
{
// We'll set the aggregate value so the grammar does not try to compile
// a SELECT clause on the query. If an aggregator is present, its own
// a SELECT clause on the query. If an aggregator is present, it's own
// grammar function will be used to build the SQL syntax.
$this->aggregate = compact('aggregator', 'columns');
......@@ -686,7 +703,7 @@ class Query {
{
// Because some database engines may throw errors if we leave orderings
// on the query when retrieving the total number of records, we'll drop
// all of the orderings and put them back on the query.
// all of the ordreings and put them back on the query.
list($orderings, $this->orderings) = array($this->orderings, null);
$total = $this->count(reset($columns));
......@@ -713,12 +730,12 @@ class Query {
{
// Force every insert to be treated like a batch insert to make creating
// the binding array simpler since we can just spin through the inserted
// rows as if there was more than one every time.
// rows as if there/ was more than one every time.
if ( ! is_array(reset($values))) $values = array($values);
$bindings = array();
// We need to merge the insert values into the array of the query
// We need to merge the the insert values into the array of the query
// bindings so that they will be bound to the PDO statement when it
// is executed by the database connection.
foreach ($values as $value)
......@@ -819,7 +836,7 @@ class Query {
/**
* Execute the query as a DELETE statement.
*
* Optionally, an ID may be passed to the method to delete a specific row.
* Optionally, an ID may be passed to the method do delete a specific row.
*
* @param int $id
* @return int
......@@ -836,7 +853,7 @@ class Query {
$sql = $this->grammar->delete($this);
return $this->connection->query($sql, $this->bindings);
return $this->connection->query($sql, $this->bindings);
}
/**
......@@ -852,7 +869,7 @@ class Query {
}
// All of the aggregate methods are handled by a single method, so we'll
// catch them all here and then pass them off to the aggregate method
// catch them all here and then pass them off to the agregate method
// instead of creating methods for each one of them.
if (in_array($method, array('count', 'min', 'max', 'avg', 'sum')))
{
......
......@@ -44,7 +44,7 @@ class Schema {
* Rename a database table in the schema.
*
* @param string $table
* @param string $name
* @param string $new_name
* @return void
*/
public static function rename($table, $new_name)
......
......@@ -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)
......
......@@ -224,18 +224,6 @@ class MySQL extends Grammar {
return 'RENAME TABLE '.$this->wrap($table).' TO '.$this->wrap($command->name);
}
/**
* 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);
}
/**
* Generate the SQL statement for a drop column command.
*
......@@ -323,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)
......@@ -383,7 +371,7 @@ class MySQL extends Grammar {
*/
protected function type_boolean(Fluent $column)
{
return 'TINYINT';
return 'TINYINT(1)';
}
/**
......
......@@ -210,18 +210,6 @@ class Postgres extends Grammar {
return 'ALTER TABLE '.$this->wrap($table).' RENAME TO '.$this->wrap($command->name);
}
/**
* 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);
}
/**
* Generate the SQL statement for a drop column command.
*
......@@ -309,7 +297,7 @@ 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)
......
......@@ -213,18 +213,6 @@ class SQLite extends Grammar {
return 'ALTER TABLE '.$this->wrap($table).' RENAME TO '.$this->wrap($command->name);
}
/**
* 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);
}
/**
* Generate the SQL statement for a drop unique key command.
*
......
......@@ -224,18 +224,6 @@ class SQLServer extends Grammar {
return 'ALTER TABLE '.$this->wrap($table).' RENAME TO '.$this->wrap($command->name);
}
/**
* 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);
}
/**
* Generate the SQL statement for a drop column command.
*
......@@ -327,7 +315,7 @@ 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)
......
......@@ -113,6 +113,7 @@ class Table {
*
* @param string|array $columns
* @param string $name
* @return Fluent
*/
public function foreign($columns, $name = null)
{
......
......@@ -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
......@@ -2,6 +2,14 @@
## 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)
......@@ -33,15 +41,56 @@
- [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.
- Added support for locales in the URI.
- Various bug fixes and improvements.
<a name="upgrade-3.2.3"></a>
## Upgrading From 3.2.3
### Upgrading From 3.2.3
- Replace the **laravel** folder.
......@@ -52,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.
......@@ -68,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.
......@@ -83,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.
......@@ -140,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.
......@@ -165,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.
......@@ -175,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.
......@@ -187,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.
......@@ -197,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.
......@@ -207,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.
......@@ -218,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.
......@@ -228,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.
......@@ -238,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.
......@@ -248,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.
......@@ -286,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.
......
# 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](#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>
<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>
<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:
......@@ -36,7 +37,7 @@ Next, clone the Laravel repository (not your fork you made):
> **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>
<a name="adding-your-fork"></a>
## Adding your Fork
Next, it's time to add the fork you made as a **remote repository**:
......@@ -49,7 +50,7 @@ Remember to replace *username** with your GitHub username. *This is case-sensiti
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>
<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:
......@@ -76,7 +77,7 @@ Or if there is a new feature to add or change to the documentation that you want
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>
<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:
......@@ -87,10 +88,10 @@ 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.
"- **-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>
<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:
......@@ -99,19 +100,19 @@ Now that your local repository has your committed changes, it's time to push (or
Your branch has been successfully pushed to your fork on GitHub.
<a name='submitting-a-pull-request'></a>
<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
- **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>
<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:
......
......@@ -3,32 +3,43 @@
## Contents
- [The Basics](#the-basics)
- [Repositories](#repositoriess)
- [Repositories](#repositories)
- [Branches](#branches)
- [Pull Requests](#pull-requests)
<a name='the-basics'></a>
<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>
<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>
<a name="branches"></a>
## Branches
The **laravel** repository has multiple branches, each serving a specific purpose:
- **master** - This is the Laravel release branch. Active development does not happen on this branch. This branch is only for the most recent, stable Laravel core code. When you download Laravel from [laravel.com](http://laravel.com/), you are downloading directly from this master branch. *Do not make pull requests to this branch.*
- **staging** - I'm not sure what this is for... Last minute testing before pushing develop to master?
- **develop** - This is the working development branch. All proposed code changes and contributions by the community are pulled into this branch. *When you make a pull request to the Laravel project, this is the branch you want to pull-request into.*
Once certain milestones have been reached and/or Taylor Otwell and the Laravel team is happy with the stability and additional features of the current development branch, the changes in the **develop** branch are pulled into the **master** branch, thus creating and releasing the newest stable version of Laravel for the world to use.
<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
## 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](#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>
<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>
<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
- 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>
<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:
- 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**
......@@ -49,12 +50,12 @@ After the cloning process is complete, it's time to add the fork you made as a *
Remember to replace *username* with your GitHub username. *This is case-sensitive*.
<a name='creating-branches'></a>
<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**
- Right-click the Laravel directory and goto **TortoiseGit > Create Branch**
- **Branch:** feature/localization-docs
- **Base On Branch:** remotes/origin/develop
- **Check** *Track*
......@@ -67,47 +68,47 @@ This will create your new *feature/localization-docs* branch and switch you to i
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>
<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
- 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>
<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
- **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>
<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
- **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>
<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.
......@@ -299,7 +299,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.
......@@ -323,7 +323,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!
......
......@@ -124,7 +124,7 @@ You may discover the need to group portions of a WHERE clause within parentheses
->or_where(function($query)
{
$query->where('age', '>', 25);
$query->where('votes' '>', 100);
$query->where('votes', '>', 100);
})
->get();
......
......@@ -62,6 +62,7 @@ Command | Description
`$table->string('name', 100);` | VARCHAR equivalent with a length
`$table->integer('votes');` | INTEGER equivalent to the table
`$table->float('amount');` | FLOAT equivalent to the table
`$table->decimal('amount', 5, 2);` | DECIMAL equivalent with a precision and scale
`$table->boolean('confirmed');` | BOOLEAN equivalent to the table
`$table->date('created_at');` | DATE equivalent to the table
`$table->timestamp('added_on');` | TIMESTAMP equivalent to the table
......@@ -70,6 +71,7 @@ Command | Description
`$table->blob('data');` | BLOB equivalent to the table
`->nullable()` | Designate that the column allows NULL values
`->default($value)` | Declare a default value for a column
`->unsigned()` | Set INTEGER to UNSIGNED
> **Note:** Laravel's "boolean" type maps to a small integer column on all database systems.
......@@ -143,4 +145,10 @@ You may also specify options for the "on delete" and "on update" actions of the
You may also easily drop a foreign key constraint. The default foreign key names follow the [same convention](#dropping-indexes) as the other indexes created by the Schema builder. Here's an example:
$table->drop_foreign('posts_user_id_foreign');
\ No newline at end of file
$table->drop_foreign('posts_user_id_foreign');
> **Note:** The field referenced in the foreign key is very likely an auto increment and therefore automatically an unsigned integer. Please make sure to create the foreign key field with **unsigned()** as both fields have to be the exact same type, the engine on both tables has to be set to **InnoDB**, and the referenced table must be created **before** the table with the foreign key.
$table->engine = 'InnoDB';
$table->integer('user_id')->unsigned();
\ No newline at end of file
......@@ -145,10 +145,10 @@ Sometimes you may wish to merge or replace the current input. Here's how:
#### Replacing the entire input array with new data:
Input::merge(array('doctor' => 'Bones', 'captain' => 'Kirk'));
Input::replace(array('doctor' => 'Bones', 'captain' => 'Kirk'));
## Clearing Input
To clear all input data for the current request, using the `clear()` method, for example:
To clear all input data for the current request, you may use the `clear` method:
Input::clear();
\ No newline at end of file
......@@ -78,6 +78,13 @@ In the following example the first parameter is the route that you're "registeri
//
});
#### Catching the remaining URI without limitations:
Route::get('files/(:all)', function($path)
{
//
});
#### Allowing a URI segment to be optional:
Route::get('page/(:any?)', function($page = 'index')
......
<a name="config"></a>
# Session Configuration
## Contents
......
......@@ -25,6 +25,7 @@ The **Str** class also provides three convenient methods for manipulating string
#### Limiting the number of characters in a string:
echo Str::limit($string, 10);
echo Str::limit_exact($string, 10);
#### Limiting the number of words in a string:
......
......@@ -85,7 +85,7 @@ For example, the < symbol should be converted to its entity representation. Conv
### Generating a link to a controller action with wildcard values:
echo HTML::link_to_action('user@profile', array($username));
echo HTML::link_to_action('user@profile', 'User Profile', array($username));
<a name="mail-to-links"></a>
## Mail-To Links
......
......@@ -5,6 +5,7 @@
- [The Basics](#the-basics)
- [Sections](#sections)
- [Blade Template Engine](#blade-template-engine)
- [Blade Control Structures](#blade-control-structures)
- [Blade Layouts](#blade-layouts)
<a name="the-basics"></a>
......@@ -63,7 +64,7 @@ Blade makes writing your views pure bliss. To create a blade view, simply name y
#### Echoing a variable using Blade:
Hello, {{$name}}.
Hello, {{ $name }}.
#### Echoing function results using Blade:
......@@ -80,15 +81,46 @@ Similarly, you can use **@render**, which behaves the same as **@include** excep
@render('admin.list')
#### Creating loops using Blade:
#### Blade comments:
{{-- This is a comment --}}
<h1>Comments</h1>
{{--
This is a
multi-line
comment.
--}}
> **Note:** Unlike HTML comments, Blade comments are not visible in the HTML source.
<a name='blade-control-structures'></a>
## Blade Control Structures
#### For Loop:
@for ($i = 0; $i <= count($comments); $i++)
The comment body is {{ $comments[$i] }}
@endfor
#### Foreach Loop:
@foreach ($comments as $comment)
The comment body is {{$comment->body}}.
The comment body is {{ $comment->body }}.
@endforeach
#### Other Blade control structures:
#### While Loop:
@while ($something)
I am still looping!
@endwhile
#### If Statement:
@if ( $message == true )
I'm displaying the message!
@endif
#### If Else Statement:
@if (count($comments) > 0)
I have comments!
......@@ -96,15 +128,17 @@ Similarly, you can use **@render**, which behaves the same as **@include** excep
I have no comments!
@endif
@for ($i =0; $i < count($comments) - 1; $i++)
The comment body is {{$comments[$i]}}
@endfor
#### Else If Statement:
@while ($something)
I am still looping!
@endwhile
@if ( $message == 'success' )
It was a success!
@elseif ( $message == 'error' )
An error occurred.
@else
Did it work?
@endif
#### The "for-else" control structure:
#### For Else Statement:
@forelse ($posts as $post)
{{ $post->body }}
......@@ -112,35 +146,18 @@ Similarly, you can use **@render**, which behaves the same as **@include** excep
There are not posts in the array!
@endforelse
<a name="blade-unless"></a>
#### The "unless" control structure:
#### Unless Statement:
@unless(Auth::check())
{{ HTML::link_to_route('login', 'Login'); }}
Login
@endunless
// Equivalent...
// Equivalent to...
<?php if ( ! Auth::check()): ?>
...
Login
<?php endif; ?>
<a name="blade-comments"></a>
#### Blade comments:
@if ($check)
{{-- This is a comment --}}
...
@endif
{{--
This is
a multi-line
comment.
--}}
> **Note:** Blade comments, unlike HTML comments, are not visible in the HTML source.
<a name="blade-layouts"></a>
## Blade Layouts
......@@ -173,7 +190,9 @@ Great! Now, we can simply return the "profile" view from our route:
The profile view will automatically use the "master" template thanks to Blade's **@layout** expression.
**Important:** The **@layout** call must always be on the very first line of the file, with no leading whitespaces or newline breaks.
> **Important:** The **@layout** call must always be on the very first line of the file, with no leading whitespaces or newline breaks.
#### Appending with @parent
Sometimes you may want to only append to a section of a layout rather than overwrite it. For example, consider the navigation list in our "master" layout. Let's assume we just want to append a new list item. Here's how to do it:
......@@ -188,4 +207,4 @@ Sometimes you may want to only append to a section of a layout rather than overw
Welcome to the profile page!
@endsection
Notice the **@parent** Blade construct? It will be replaced with the contents of the layout's navigation section, providing you with a beautiful and powerful method of performing layout extension and inheritance.
**@parent** will be replaced with the contents of the layout's *navigation* section, providing you with a beautiful and powerful method of performing layout extension and inheritance.
......@@ -41,7 +41,7 @@ class Error {
{
$response = Event::first('500');
return Response::prepare($response)->send();
echo Response::prepare($response)->render();
}
exit(1);
......
......@@ -176,7 +176,7 @@ class Event {
* $responses = Event::fire(array('start', 'loading'), $parameters);
* </code>
*
* @param string|array $event
* @param string|array $events
* @param array $parameters
* @param bool $halt
* @return array
......
......@@ -20,7 +20,7 @@ class Form {
* Registers a custom macro.
*
* @param string $name
* @param Closure $input
* @param Closure $macro
* @return void
*/
public static function macro($name, $macro)
......@@ -526,7 +526,7 @@ class Form {
* @param array $attributes
* @return string
*/
public static function submit($value, $attributes = array())
public static function submit($value = null, $attributes = array())
{
return static::input('submit', null, $value, $attributes);
}
......@@ -538,7 +538,7 @@ class Form {
* @param array $attributes
* @return string
*/
public static function reset($value, $attributes = array())
public static function reset($value = null, $attributes = array())
{
return static::input('reset', null, $value, $attributes);
}
......@@ -570,7 +570,7 @@ class Form {
* @param array $attributes
* @return string
*/
public static function button($value, $attributes = array())
public static function button($value = null, $attributes = array())
{
return '<button'.HTML::attributes($attributes).'>'.HTML::entities($value).'</button>';
}
......
......@@ -543,7 +543,7 @@ function render($view, $data = array())
/**
* Get the rendered contents of a partial from a loop.
*
* @param string $view
* @param string $partial
* @param array $data
* @param string $iterator
* @param string $empty
......
......@@ -13,7 +13,7 @@ class HTML {
* Registers a custom macro.
*
* @param string $name
* @param Closure $input
* @param Closure $macro
* @return void
*/
public static function macro($name, $macro)
......
......@@ -85,6 +85,7 @@ class IoC {
* </code>
*
* @param string $type
* @param array $parameters
* @return mixed
*/
public static function resolve($type, $parameters = array())
......@@ -158,7 +159,7 @@ class IoC {
// no binding registered for the abstraction so we need to bail out.
if ( ! $reflector->isInstantiable())
{
throw new Exception("Resolution target [$type] is not instantiable.");
throw new \Exception("Resolution target [$type] is not instantiable.");
}
$constructor = $reflector->getConstructor();
......@@ -195,7 +196,7 @@ class IoC {
// we'll just bomb out with an error since we have nowhere to go.
if (is_null($dependency))
{
throw new Exception("Unresolvable dependency resolving [$parameter].");
throw new \Exception("Unresolvable dependency resolving [$parameter].");
}
$dependencies[] = static::resolve($dependency->name);
......
......@@ -120,32 +120,34 @@ Routing\Router::register('*', '(:all)', function()
$uri = URI::current();
$locales = Config::get('application.languages', array());
$languages = Config::get('application.languages', array());
$locales[] = Config::get('application.language');
$languages[] = Config::get('application.language');
/*
|--------------------------------------------------------------------------
| Set The Locale Based On Route
| Set The Locale Based On The Route
|--------------------------------------------------------------------------
|
| If the URI starts with one of the supported languages, we will set
| the default language to match that URI segment and shorten the
| the default lagnauge to match that URI segment and shorten the
| URI we'll pass to the router to not include the lang segment.
|
*/
foreach ($locales as $locale)
foreach ($languages as $language)
{
if (starts_with($uri, $locale))
if (starts_with($uri, $language))
{
Config::set('application.language', $locale);
Config::set('application.language', $language);
$uri = trim(substr($uri, strlen($locale)), '/'); break;
$uri = trim(substr($uri, strlen($language)), '/'); break;
}
}
if ($uri === '') $uri = '/';
if ($uri == '') $uri = '/';
URI::$uri = $uri;
/*
|--------------------------------------------------------------------------
......@@ -216,4 +218,18 @@ $response->send();
|
*/
Event::fire('laravel.done', array($response));
\ No newline at end of file
Event::fire('laravel.done', array($response));
/*
|--------------------------------------------------------------------------
| Finish the request for PHP-FastCGI
|--------------------------------------------------------------------------
|
| Stopping the PHP process for PHP-FastCGI users to speed up some
| PHP queries. Acceleration is possible when there are actions in the
| process of script execution that do not affect server response.
| For example, saving the session in memcached can occur after the page
| has been formed and passed to a web server.
*/
$response->foundation->finish();
......@@ -64,7 +64,8 @@ class Log {
* Format a log message for logging.
*
* @param string $type
* @param
* @param string $message
* @return string
*/
protected static function format($type, $message)
{
......
......@@ -24,6 +24,7 @@ class Pluralizer {
/**
* Create a new pluralizer instance.
*
* @param array $config
* @return void
*/
public function __construct($config)
......
......@@ -6,20 +6,20 @@ var anbu = {
// the DOM every time they are used.
el: {
main: $('.anbu'),
close: $('#anbu-close'),
zoom: $('#anbu-zoom'),
hide: $('#anbu-hide'),
show: $('#anbu-show'),
tab_pane: $('.anbu-tab-pane'),
hidden_tab_pane: $('.anbu-tab-pane:visible'),
tab: $('.anbu-tab'),
tabs: $('.anbu-tabs'),
tab_links: $('.anbu-tabs a'),
window: $('.anbu-window'),
closed_tabs: $('#anbu-closed-tabs'),
open_tabs: $('#anbu-open-tabs'),
content_area: $('.anbu-content-area')
main: jQuery('.anbu'),
close: jQuery('#anbu-close'),
zoom: jQuery('#anbu-zoom'),
hide: jQuery('#anbu-hide'),
show: jQuery('#anbu-show'),
tab_pane: jQuery('.anbu-tab-pane'),
hidden_tab_pane: jQuery('.anbu-tab-pane:visible'),
tab: jQuery('.anbu-tab'),
tabs: jQuery('.anbu-tabs'),
tab_links: jQuery('.anbu-tabs a'),
window: jQuery('.anbu-window'),
closed_tabs: jQuery('#anbu-closed-tabs'),
open_tabs: jQuery('#anbu-open-tabs'),
content_area: jQuery('.anbu-content-area')
},
// CLASS ATTRIBUTES
......@@ -30,7 +30,7 @@ var anbu = {
is_zoomed: false,
// initial height of content area
small_height: $('.anbu-content-area').height(),
small_height: jQuery('.anbu-content-area').height(),
// the name of the active tab css
active_tab: 'anbu-active-tab',
......@@ -76,7 +76,7 @@ var anbu = {
event.preventDefault();
});
anbu.el.tab.click(function(event) {
anbu.clicked_tab($(this));
anbu.clicked_tab(jQuery(this));
event.preventDefault();
});
......@@ -104,8 +104,8 @@ var anbu = {
open_window: function(tab) {
// can't directly assign this line, but it works
$('.anbu-tab-pane:visible').fadeOut(200);
$('.' + tab.attr(anbu.tab_data)).delay(220).fadeIn(300);
jQuery('.anbu-tab-pane:visible').fadeOut(200);
jQuery('.' + tab.attr(anbu.tab_data)).delay(220).fadeIn(300);
anbu.el.tab_links.removeClass(anbu.active_tab);
tab.addClass(anbu.active_tab);
anbu.el.window.slideDown(300);
......@@ -178,7 +178,7 @@ var anbu = {
anbu.is_zoomed = false;
} else {
// the 6px is padding on the top of the window
height = ($(window).height() - anbu.el.tabs.height() - 6) + 'px';
height = (jQuery(window).height() - anbu.el.tabs.height() - 6) + 'px';
anbu.is_zoomed = true;
}
......
......@@ -14,7 +14,7 @@ class Profiler {
*
* @var array
*/
protected static $data = array('queries' => array(), 'logs' => array());
protected static $data = array('queries' => array(), 'logs' => array(), 'timers' => array());
/**
* Get the rendered contents of the Profiler.
......@@ -32,13 +32,100 @@ class Profiler {
static::$data['memory'] = get_file_size(memory_get_usage(true));
static::$data['memory_peak'] = get_file_size(memory_get_peak_usage(true));
static::$data['time'] = number_format((microtime(true) - LARAVEL_START) * 1000, 2);
foreach ( static::$data['timers'] as &$timer)
{
$timer['running_time'] = number_format((microtime(true) - $timer['start'] ) * 1000, 2);
}
return render('path: '.__DIR__.'/template'.BLADE_EXT, static::$data);
}
}
/**
* Allow a callback to be timed.
*
* @param closure $func
* @param string $name
* @return void
*/
public static function time( $func, $name = 'default_func_timer' )
{
// First measure the runtime of the func
$start = microtime(true);
$func();
$end = microtime(true);
// Check to see if a timer by that name exists
if (isset(static::$data['timers'][$name]))
{
$name = $name.uniqid();
}
// Push the time into the timers array for display
static::$data['timers'][$name]['start'] = $start;
static::$data['timers'][$name]['end'] = $end;
static::$data['timers'][$name]['time'] = number_format(($end - $start) * 1000, 2);
}
/**
* Start, or add a tick to a timer.
*
* @param string $name
* @return void
*/
public static function tick($name = 'default_timer', $callback = null)
{
$name = trim($name);
if (empty($name)) $name = 'default_timer';
// Is this a brand new tick?
if (isset(static::$data['timers'][$name]))
{
$current_timer = static::$data['timers'][$name];
$ticks = count($current_timer['ticks']);
// Initialize the new time for the tick
$new_tick = array();
$mt = microtime(true);
$new_tick['raw_time'] = $mt - $current_timer['start'];
$new_tick['time'] = number_format(($mt - $current_timer['start']) * 1000, 2);
// Use either the start time or the last tick for the diff
if ($ticks > 0)
{
$last_tick = $current_timer['ticks'][$ticks- 1]['raw_time'];
$new_tick['diff'] = number_format(($new_tick['raw_time'] - $last_tick) * 1000, 2);
}
else
{
$new_tick['diff'] = $new_tick['time'];
}
// Add the new tick to the stack of them
static::$data['timers'][$name]['ticks'][] = $new_tick;
}
else
{
// Initialize a start time on the first tick
static::$data['timers'][$name]['start'] = microtime(true);
static::$data['timers'][$name]['ticks'] = array();
}
// Run the callback for this tick if it's specified
if ( ! is_null($callback) and is_callable($callback))
{
// After we've ticked, call the callback function
call_user_func_array($callback, array(
static::$data['timers'][$name]
));
}
}
/**
* Add a log entry to the log entries array.
*
* @param string $type
* @param string $message
* @return void
*/
public static function log($type, $message)
......
......@@ -48,6 +48,52 @@
<span class="anbu-empty">There have been no SQL queries executed.</span>
@endif
</div>
<div class="anbu-tab-pane anbu-table anbu-checkpoints">
@if (count($timers) > 0)
<table>
<tr>
<th>Name</th>
<th>Running Time (ms)</th>
<th>Difference</th>
</tr>
@foreach ($timers as $name => $timer)
<tr>
<td class="anbu-table-first">
{{ $name }}
</td>
<td><pre>{{ $timer['running_time'] }}ms (time from start to render)</pre></td>
<td>&nbsp;</td>
</tr>
@if (isset($timer['ticks']))
@foreach( $timer['ticks'] as $tick)
<tr>
<td>
<pre>Tick</pre>
</td>
<td>
<pre>{{ $tick['time'] }}ms</pre>
</td>
<td>
<pre>+ {{ $tick['diff'] }}ms</pre>
</td>
</tr>
@endforeach
@else
<tr>
<td><pre>Running Time</pre></td>
<td><pre>{{ $timer['time'] }}ms</pre></td>
<td>&nbsp;</td>
</tr>
@endif
@endforeach
</table>
@else
<span class="anbu-empty">There have been no checkpoints set.</span>
@endif
</div>
</div>
</div>
......@@ -61,7 +107,7 @@
@endif
</a>
</li>
<li><a class="anbu-tab">Time <span class="anbu-count">{{ $time }}ms</span></a></li>
<li><a class="anbu-tab" data-anbu-tab="anbu-checkpoints">Time <span class="anbu-count">{{ $time }}ms</span></a></li>
<li><a class="anbu-tab">Memory <span class="anbu-count">{{ $memory }} ({{ $memory_peak }})</span></a></li>
<li class="anbu-tab-right"><a id="anbu-hide" href="#">&#8614;</a></li>
<li class="anbu-tab-right"><a id="anbu-close" href="#">&times;</a></li>
......@@ -75,4 +121,4 @@
<script>window.jQuery || document.write("<script src='//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'>\x3C/script>")</script>
<script>{{ file_get_contents(path('sys').'profiling/profiler.js') }}</script>
<!-- /ANBU - LARAVEL PROFILER -->
\ No newline at end of file
<!-- /ANBU - LARAVEL PROFILER -->
......@@ -6,7 +6,7 @@ class Redirect extends Response {
* Create a redirect response to application root.
*
* @param int $status
* @param bool $secure
* @param bool $https
* @return Redirect
*/
public static function home($status = 302, $https = null)
......@@ -165,4 +165,23 @@ class Redirect extends Response {
return $this->with('errors', $errors);
}
/**
* Send the headers and content of the response to the browser.
*
* @return void
*/
public function send()
{
// Dump all output buffering, this ensures
// that symphony will send our redirect headers
// properly if we've outputted any content from
// within Laravel.
while (ob_get_level() > 0)
{
ob_end_clean();
}
return parent::send();
}
}
\ No newline at end of file
......@@ -119,6 +119,7 @@ class Request {
/**
* Determine if the request accepts a given content type.
*
* @param string $type
* @return bool
*/
public static function accepts($type)
......
<?php namespace Laravel;
use Symfony\Component\HttpFoundation\ResponseHeaderBag;
use Symfony\Component\HttpFoundation\Response as FoundationResponse;
use Symfony\Component\HttpFoundation\LaravelResponse as FoundationResponse;
class Response {
......
......@@ -179,6 +179,8 @@ abstract class Controller {
// controllers with much less code than would be usual.
foreach ($parameters as $key => $value)
{
if ( ! is_string($value)) continue;
$search = '(:'.($key + 1).')';
$destination = str_replace($search, $value, $destination, $count);
......
......@@ -206,7 +206,12 @@ class Router {
continue;
}
$uri = str_replace('(:bundle)', static::$bundle, $uri);
$uri = ltrim(str_replace('(:bundle)', static::$bundle, $uri), '/');
if($uri == '')
{
$uri = '/';
}
// If the URI begins with a wildcard, we want to add this route to the
// array of "fallback" routes. Fallback routes are always processed
......@@ -292,7 +297,7 @@ class Router {
/**
* Register a controller with the router.
*
* @param string|array $controller
* @param string|array $controllers
* @param string|array $defaults
* @param bool $https
* @return void
......
......@@ -298,13 +298,29 @@ class Payload {
$this->cookie($config);
// Some session drivers implement the Sweeper interface meaning that
// they must clean up expired sessions manually. If the driver is a
// sweeper, we'll calculate if we need to run garbage collection.
// they must clean up expired sessions manually. Here we'll calculate
// if we need to run garbage collection.
$sweepage = $config['sweepage'];
if ($this->driver instanceof Sweeper and (mt_rand(1, $sweepage[1]) <= $sweepage[0]))
if (mt_rand(1, $sweepage[1]) <= $sweepage[0])
{
$this->driver->sweep(time() - ($config['lifetime'] * 60));
$this->sweep();
}
}
/**
* Clean up expired sessions.
*
* If the session driver is a sweeper, it must clean up expired sessions
* from time to time. This method triggers garbage collection.
*
* @return void
*/
public function sweep()
{
if ($this->driver instanceof Sweeper)
{
$this->driver->sweep(time() - (Config::get('session.lifetime') * 60));
}
}
......
......@@ -130,6 +130,31 @@ class Str {
return substr($value, 0, $limit).$end;
}
/**
* Limit the number of chracters in a string including custom ending
*
* <code>
* // Returns "Taylor..."
* echo Str::limit_exact('Taylor Otwell', 9);
*
* // Limit the number of characters and append a custom ending
* echo Str::limit_exact('Taylor Otwell', 9, '---');
* </code>
*
* @param string $value
* @param int $limit
* @param string $end
* @return string
*/
public static function limit_exact($value, $limit = 100, $end = '...')
{
if (static::length($value) <= $limit) return $value;
$limit -= static::length($end);
return static::limit($value, $limit, $end);
}
/**
* Limit the number of words in a string.
*
......
<?php
/*
|--------------------------------------------------------------------------
| Bundle Configuration
|--------------------------------------------------------------------------
|
| Bundles allow you to conveniently extend and organize your application.
| Think of bundles as self-contained applications. They can have routes,
| controllers, models, views, configuration, etc. You can even create
| your own bundles to share with the Laravel community.
|
| This is a list of the bundles installed for your application and tells
| Laravel the location of the bundle's root directory, as well as the
| root URI the bundle responds to.
|
| For example, if you have an "admin" bundle located in "bundles/admin"
| that you want to handle requests with URIs that begin with "admin",
| simply add it to the array like this:
|
| 'admin' => array(
| 'location' => 'admin',
| 'handles' => 'admin',
| ),
|
| Note that the "location" is relative to the "bundles" directory.
| Now the bundle will be recognized by Laravel and will be able
| to respond to requests beginning with "admin"!
|
| Have a bundle that lives in the root of the bundle directory
| and doesn't respond to any requests? Just add the bundle
| name to the array and we'll take care of the rest.
|
*/
return array('dashboard' => array('handles' => 'dashboard'), 'dummy');
\ No newline at end of file
<?php
return array(
/*
|--------------------------------------------------------------------------
| Application URL
|--------------------------------------------------------------------------
|
| The URL used to access your application without a trailing slash. The URL
| does nto have to be set. If it isn't we'll try our best to guess the URL
| of your application.
|
*/
'url' => '',
/*
|--------------------------------------------------------------------------
| Application Index
|--------------------------------------------------------------------------
|
| If you are including the "index.php" in your URLs, you can ignore this.
|
| However, if you are using mod_rewrite to get cleaner URLs, just set
| this option to an empty string and we'll take care of the rest.
|
*/
'index' => 'index.php',
/*
|--------------------------------------------------------------------------
| Application Key
|--------------------------------------------------------------------------
|
| 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
| characters of random gibberish.
|
*/
'key' => '',
/*
|--------------------------------------------------------------------------
| Application Character Encoding
|--------------------------------------------------------------------------
|
| The default character encoding used by your application. This encoding
| will be used by the Str, Text, Form, and any other classes that need
| to know what type of encoding to use for your awesome application.
|
*/
'encoding' => 'UTF-8',
/*
|--------------------------------------------------------------------------
| Application Language
|--------------------------------------------------------------------------
|
| The default language of your application. This language will be used by
| Lang library as the default language when doing string localization.
|
*/
'language' => 'en',
/*
|--------------------------------------------------------------------------
| SSL Link Generation
|--------------------------------------------------------------------------
|
| Many sites use SSL to protect their users data. However, you may not
| always be able to use SSL on your development machine, meaning all HTTPS
| will be broken during development.
|
| For this reason, you may wish to disable the generation of HTTPS links
| throughout your application. This option does just that. All attempts to
| generate HTTPS links will generate regular HTTP links instead.
|
*/
'ssl' => true,
/*
|--------------------------------------------------------------------------
| Application Timezone
|--------------------------------------------------------------------------
|
| The default timezone of your application. This timezone will be used when
| Laravel needs a date, such as when writing to a log file or travelling
| to a distant star at warp speed.
|
*/
'timezone' => 'UTC',
/*
|--------------------------------------------------------------------------
| Class Aliases
|--------------------------------------------------------------------------
|
| Here, you can specify any class aliases that you would like registered
| when Laravel loads. Aliases are lazy-loaded, so add as many as you want.
|
| Aliases make it more convenient to use namespaced classes. Instead of
| referring to the class using its full namespace, you may simply use
| the alias defined here.
|
| We have already aliased common Laravel classes to make your life easier.
|
*/
'aliases' => array(
'Auth' => 'Laravel\\Auth',
'Asset' => 'Laravel\\Asset',
'Autoloader' => 'Laravel\\Autoloader',
'Blade' => 'Laravel\\Blade',
'Bundle' => 'Laravel\\Bundle',
'Cache' => 'Laravel\\Cache',
'Config' => 'Laravel\\Config',
'Controller' => 'Laravel\\Routing\\Controller',
'Cookie' => 'Laravel\\Cookie',
'Crypter' => 'Laravel\\Crypter',
'DB' => 'Laravel\\Database',
'Event' => 'Laravel\\Event',
'File' => 'Laravel\\File',
'Filter' => 'Laravel\\Routing\\Filter',
'Form' => 'Laravel\\Form',
'Hash' => 'Laravel\\Hash',
'HTML' => 'Laravel\\HTML',
'Input' => 'Laravel\\Input',
'IoC' => 'Laravel\\IoC',
'Lang' => 'Laravel\\Lang',
'Log' => 'Laravel\\Log',
'Memcached' => 'Laravel\\Memcached',
'Paginator' => 'Laravel\\Paginator',
'URL' => 'Laravel\\URL',
'Redirect' => 'Laravel\\Redirect',
'Redis' => 'Laravel\\Redis',
'Request' => 'Laravel\\Request',
'Response' => 'Laravel\\Response',
'Route' => 'Laravel\\Routing\\Route',
'Router' => 'Laravel\\Routing\\Router',
'Schema' => 'Laravel\\Database\\Schema',
'Section' => 'Laravel\\Section',
'Session' => 'Laravel\\Session',
'Str' => 'Laravel\\Str',
'Task' => 'Laravel\\CLI\\Tasks\\Task',
'URI' => 'Laravel\\URI',
'Validator' => 'Laravel\\Validator',
'View' => 'Laravel\\View',
),
);
<?php
return array(
/*
|--------------------------------------------------------------------------
| Default Authentication Driver
|--------------------------------------------------------------------------
|
| Laravel uses a flexible driver-based system to handle authentication.
| You are free to register your own drivers using the Auth::extend
| method. Of course, a few great drivers are provided out of
| box to handle basic authentication simply and easily.
|
| Drivers: 'fluent', 'eloquent'.
|
*/
'driver' => 'fluent',
/*
|--------------------------------------------------------------------------
| Authentication Username
|--------------------------------------------------------------------------
|
| Here you may specify the database column that should be considered the
| "username" for your users. Typically, this will either be "username"
| or "email". Of course, you're free to change the value to anything.
|
*/
'username' => 'username',
/*
|--------------------------------------------------------------------------
| Authentication Password
|--------------------------------------------------------------------------
|
| Here you may specify the database column that should be considered the
| "password" for your users. Typically, this will be "password" but,
| again, you're free to change the value to anything you see fit.
|
*/
'password' => 'password',
/*
|--------------------------------------------------------------------------
| Authentication Model
|--------------------------------------------------------------------------
|
| When using the "eloquent" authentication driver, you may specify the
| model that should be considered the "User" model. This model will
| be used to authenticate and load the users of your application.
|
*/
'model' => 'User',
/*
|--------------------------------------------------------------------------
| Authentication Table
|--------------------------------------------------------------------------
|
| When using the "fluent" authentication driver, the database table used
| to load users may be specified here. This table will be used in by
| the fluent query builder to authenticate and load your users.
|
*/
'table' => 'users',
);
<?php
return array(
/*
|--------------------------------------------------------------------------
| Cache Driver
|--------------------------------------------------------------------------
|
| The name of the default cache driver for your application. Caching can
| be used to increase the performance of your application by storing any
| commonly accessed data in memory, a file, or some other storage.
|
| A variety of awesome drivers are available for you to use with Laravel.
| Some, like APC, are extremely fast. However, if that isn't an option
| in your environment, try file or database caching.
|
| Drivers: 'file', 'memcached', 'apc', 'redis', 'database'.
|
*/
'driver' => 'file',
/*
|--------------------------------------------------------------------------
| Cache Key
|--------------------------------------------------------------------------
|
| 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.
|
*/
'key' => 'laravel',
/*
|--------------------------------------------------------------------------
| Cache Database
|--------------------------------------------------------------------------
|
| When using the database cache driver, this database table will be used
| to store the cached item. You may also add a "connection" option to
| the array to specify which database connection should be used.
|
*/
'database' => array('table' => 'laravel_cache'),
/*
|--------------------------------------------------------------------------
| Memcached Servers
|--------------------------------------------------------------------------
|
| The Memcached servers used by your application. Memcached is a free and
| open source, high-performance, distributed memory caching system. It is
| generic in nature but intended for use in speeding up web applications
| by alleviating database load.
|
| For more information, check out: http://memcached.org
|
*/
'memcached' => array(
array('host' => '127.0.0.1', 'port' => 11211, 'weight' => 100),
),
);
\ No newline at end of file
<?php
return array(
/*
|--------------------------------------------------------------------------
| Default Database Connection
|--------------------------------------------------------------------------
|
| The name of your default database connection. This connection will 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.
|
*/
'default' => 'sqlite',
/*
|--------------------------------------------------------------------------
| PDO Fetch Style
|--------------------------------------------------------------------------
|
| By default, database results will be returned as instances of the PHP
| stdClass object; however, you may wish to retrieve records as arrays
| instead of objects. Here you can control the PDO fetch style of the
| database queries run by your application.
|
*/
'fetch' => PDO::FETCH_CLASS,
/*
|--------------------------------------------------------------------------
| Database Connections
|--------------------------------------------------------------------------
|
| All of the database connections used by your application. Many of your
| applications will no doubt only use one connection; however, you have
| 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
| choice installed on your machine.
|
| Drivers: 'mysql', 'pgsql', 'sqlsrv', 'sqlite'.
|
*/
'connections' => array(
'sqlite' => array(
'driver' => 'sqlite',
'database' => 'application',
'prefix' => '',
),
'mysql' => array(
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'database',
'username' => 'root',
'password' => 'password',
'charset' => 'utf8',
'prefix' => '',
),
'pgsql' => array(
'driver' => 'pgsql',
'host' => 'localhost',
'database' => 'database',
'username' => 'root',
'password' => 'password',
'charset' => 'utf8',
'prefix' => '',
),
'sqlsrv' => array(
'driver' => 'sqlsrv',
'host' => 'localhost',
'database' => 'database',
'username' => 'root',
'password' => 'password',
'prefix' => '',
),
),
/*
|--------------------------------------------------------------------------
| Redis Databases
|--------------------------------------------------------------------------
|
| Redis is an open source, fast, and advanced key-value store. However, it
| provides a richer set of commands than a typical key-value store such as
| APC or memcached. All the cool kids are using it.
|
| To get the scoop on Redis, check out: http://redis.io
|
*/
'redis' => array(
'default' => array('host' => '127.0.0.1', 'port' => 6379),
),
);
\ No newline at end of file
<?php
return array(
/*
|--------------------------------------------------------------------------
| Ignored Error Levels
|--------------------------------------------------------------------------
|
| 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.
|
*/
'ignore' => array(E_NOTICE, E_USER_NOTICE, E_DEPRECATED, E_USER_DEPRECATED),
/*
|--------------------------------------------------------------------------
| Error Detail
|--------------------------------------------------------------------------
|
| Detailed error messages contain information about the file in which an
| error occurs, as well as a PHP stack trace containing the call stack.
| You'll want them when you're trying to debug your application.
|
| If your application is in production, you'll want to turn off the error
| details for enhanced security and user experience since the exception
| stack trace could contain sensitive information.
|
*/
'detail' => true,
/*
|--------------------------------------------------------------------------
| Error Logging
|--------------------------------------------------------------------------
|
| When error logging is enabled, the "logger" Closure defined below will
| be called for every error in your application. You are free to log the
| errors however you want. Enjoy the flexibility.
|
*/
'log' => false,
/*
|--------------------------------------------------------------------------
| Error Logger
|--------------------------------------------------------------------------
|
| Because of the various ways of managing error logging, you get complete
| flexibility to manage error logging as you see fit. This function will
| be called anytime an error occurs within your application and error
| 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
| text files within the application storage directory.
|
*/
'logger' => function($exception)
{
Log::exception($exception);
},
);
\ No newline at end of file
<?php
return array(
'default' => 'sqlite',
);
\ No newline at end of file
<?php
return array(
'hqx' => 'application/mac-binhex40',
'cpt' => 'application/mac-compactpro',
'csv' => array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream'),
'bin' => 'application/macbinary',
'dms' => 'application/octet-stream',
'lha' => 'application/octet-stream',
'lzh' => 'application/octet-stream',
'exe' => array('application/octet-stream', 'application/x-msdownload'),
'class' => 'application/octet-stream',
'psd' => 'application/x-photoshop',
'so' => 'application/octet-stream',
'sea' => 'application/octet-stream',
'dll' => 'application/octet-stream',
'oda' => 'application/oda',
'pdf' => array('application/pdf', 'application/x-download'),
'ai' => 'application/postscript',
'eps' => 'application/postscript',
'ps' => 'application/postscript',
'smi' => 'application/smil',
'smil' => 'application/smil',
'mif' => 'application/vnd.mif',
'xls' => array('application/excel', 'application/vnd.ms-excel', 'application/msexcel'),
'ppt' => array('application/powerpoint', 'application/vnd.ms-powerpoint'),
'wbxml' => 'application/wbxml',
'wmlc' => 'application/wmlc',
'dcr' => 'application/x-director',
'dir' => 'application/x-director',
'dxr' => 'application/x-director',
'dvi' => 'application/x-dvi',
'gtar' => 'application/x-gtar',
'gz' => 'application/x-gzip',
'php' => array('application/x-httpd-php', 'text/x-php'),
'php4' => 'application/x-httpd-php',
'php3' => 'application/x-httpd-php',
'phtml' => 'application/x-httpd-php',
'phps' => 'application/x-httpd-php-source',
'js' => 'application/x-javascript',
'swf' => 'application/x-shockwave-flash',
'sit' => 'application/x-stuffit',
'tar' => 'application/x-tar',
'tgz' => array('application/x-tar', 'application/x-gzip-compressed'),
'xhtml' => 'application/xhtml+xml',
'xht' => 'application/xhtml+xml',
'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed'),
'mid' => 'audio/midi',
'midi' => 'audio/midi',
'mpga' => 'audio/mpeg',
'mp2' => 'audio/mpeg',
'mp3' => array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'),
'aif' => 'audio/x-aiff',
'aiff' => 'audio/x-aiff',
'aifc' => 'audio/x-aiff',
'ram' => 'audio/x-pn-realaudio',
'rm' => 'audio/x-pn-realaudio',
'rpm' => 'audio/x-pn-realaudio-plugin',
'ra' => 'audio/x-realaudio',
'rv' => 'video/vnd.rn-realvideo',
'wav' => 'audio/x-wav',
'bmp' => 'image/bmp',
'gif' => 'image/gif',
'jpeg' => array('image/jpeg', 'image/pjpeg'),
'jpg' => array('image/jpeg', 'image/pjpeg'),
'jpe' => array('image/jpeg', 'image/pjpeg'),
'png' => 'image/png',
'tiff' => 'image/tiff',
'tif' => 'image/tiff',
'css' => 'text/css',
'html' => 'text/html',
'htm' => 'text/html',
'shtml' => 'text/html',
'txt' => 'text/plain',
'text' => 'text/plain',
'log' => array('text/plain', 'text/x-log'),
'rtx' => 'text/richtext',
'rtf' => 'text/rtf',
'xml' => 'text/xml',
'xsl' => 'text/xml',
'mpeg' => 'video/mpeg',
'mpg' => 'video/mpeg',
'mpe' => 'video/mpeg',
'qt' => 'video/quicktime',
'mov' => 'video/quicktime',
'avi' => 'video/x-msvideo',
'movie' => 'video/x-sgi-movie',
'doc' => 'application/msword',
'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
'word' => array('application/msword', 'application/octet-stream'),
'xl' => 'application/excel',
'eml' => 'message/rfc822',
'json' => array('application/json', 'text/json'),
);
\ No newline at end of file
<?php
return array(
/*
|--------------------------------------------------------------------------
| Session Driver
|--------------------------------------------------------------------------
|
| The name of the session driver used by your application. Since HTTP is
| stateless, sessions are used to simulate "state" across requests made
| by the same user of your application. In other words, it's how an
| application knows who the heck you are.
|
| Drivers: 'cookie', 'file', 'database', 'memcached', 'apc', 'redis'.
|
*/
'driver' => '',
/*
|--------------------------------------------------------------------------
| Session Database
|--------------------------------------------------------------------------
|
| The database table on 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.
|
*/
'table' => 'sessions',
/*
|--------------------------------------------------------------------------
| Session Garbage Collection Probability
|--------------------------------------------------------------------------
|
| Some session drivers require the manual clean-up of expired sessions.
| This option specifies the probability of session garbage collection
| occuring for any given request.
|
| For example, the default value states that garbage collection has a
| 2% chance of occuring for any given request to the application.
| Feel free to tune this to your application's size and speed.
|
*/
'sweepage' => array(2, 100),
/*
|--------------------------------------------------------------------------
| Session Lifetime
|--------------------------------------------------------------------------
|
| The number of minutes a session can be idle before expiring.
|
*/
'lifetime' => 60,
/*
|--------------------------------------------------------------------------
| Session Expiration On Close
|--------------------------------------------------------------------------
|
| Determines if the session should expire when the user's web browser closes.
|
*/
'expire_on_close' => false,
/*
|--------------------------------------------------------------------------
| Session Cookie Name
|--------------------------------------------------------------------------
|
| The name that should be given to the session cookie.
|
*/
'cookie' => 'laravel_session',
/*
|--------------------------------------------------------------------------
| Session Cookie Path
|--------------------------------------------------------------------------
|
| The path for which the session cookie is available.
|
*/
'path' => '/',
/*
|--------------------------------------------------------------------------
| Session Cookie Domain
|--------------------------------------------------------------------------
|
| The domain for which the session cookie is available.
|
*/
'domain' => null,
/*
|--------------------------------------------------------------------------
| HTTPS Only Session Cookie
|--------------------------------------------------------------------------
|
| Determines if the cookie should only be sent over HTTPS.
|
*/
'secure' => false,
);
\ No newline at end of file
<?php
return array(
/*
|--------------------------------------------------------------------------
| String Inflection
|--------------------------------------------------------------------------
|
| 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
| word from singular to plural and vice versa.
|
| Note that the regular expressions are only for inflecting English words.
| To inflect a non-English string, simply add its singular and plural
| form to the array of "irregular" word forms.
|
*/
'plural' => array(
'/(quiz)$/i' => "$1zes",
'/^(ox)$/i' => "$1en",
'/([m|l])ouse$/i' => "$1ice",
'/(matr|vert|ind)ix|ex$/i' => "$1ices",
'/(x|ch|ss|sh)$/i' => "$1es",
'/([^aeiouy]|qu)y$/i' => "$1ies",
'/(hive)$/i' => "$1s",
'/(?:([^f])fe|([lr])f)$/i' => "$1$2ves",
'/(shea|lea|loa|thie)f$/i' => "$1ves",
'/sis$/i' => "ses",
'/([ti])um$/i' => "$1a",
'/(tomat|potat|ech|her|vet)o$/i' => "$1oes",
'/(bu)s$/i' => "$1ses",
'/(alias)$/i' => "$1es",
'/(octop)us$/i' => "$1i",
'/(ax|test)is$/i' => "$1es",
'/(us)$/i' => "$1es",
'/s$/i' => "s",
'/$/' => "s"
),
'singular' => array(
'/(quiz)zes$/i' => "$1",
'/(matr)ices$/i' => "$1ix",
'/(vert|ind)ices$/i' => "$1ex",
'/^(ox)en$/i' => "$1",
'/(alias)es$/i' => "$1",
'/(octop|vir)i$/i' => "$1us",
'/(cris|ax|test)es$/i' => "$1is",
'/(shoe)s$/i' => "$1",
'/(o)es$/i' => "$1",
'/(bus)es$/i' => "$1",
'/([m|l])ice$/i' => "$1ouse",
'/(x|ch|ss|sh)es$/i' => "$1",
'/(m)ovies$/i' => "$1ovie",
'/(s)eries$/i' => "$1eries",
'/([^aeiouy]|qu)ies$/i' => "$1y",
'/([lr])ves$/i' => "$1f",
'/(tive)s$/i' => "$1",
'/(hive)s$/i' => "$1",
'/(li|wi|kni)ves$/i' => "$1fe",
'/(shea|loa|lea|thie)ves$/i' => "$1f",
'/(^analy)ses$/i' => "$1sis",
'/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i' => "$1$2sis",
'/([ti])a$/i' => "$1um",
'/(n)ews$/i' => "$1ews",
'/(h|bl)ouses$/i' => "$1ouse",
'/(corpse)s$/i' => "$1",
'/(us)es$/i' => "$1",
'/(us|ss)$/i' => "$1",
'/s$/i' => "",
),
'irregular' => array(
'child' => 'children',
'foot' => 'feet',
'goose' => 'geese',
'man' => 'men',
'move' => 'moves',
'person' => 'people',
'sex' => 'sexes',
'tooth' => 'teeth',
),
'uncountable' => array(
'audio',
'equipment',
'deer',
'fish',
'gold',
'information',
'money',
'rice',
'police',
'series',
'sheep',
'species',
),
/*
|--------------------------------------------------------------------------
| ASCII Characters
|--------------------------------------------------------------------------
|
| This array contains foreign characters and their 7-bit ASCII equivalents.
| The array is used by the "ascii" method on the Str class to get strings
| ready for inclusion in a URL slug.
|
| Of course, the "ascii" method may also be used by you for whatever your
| application requires. Feel free to add any characters we missed, and be
| sure to let us know about them!
|
*/
'ascii' => array(
'/æ|ǽ/' => 'ae',
'/œ/' => 'oe',
'/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ|А/' => 'A',
'/à|á|â|ã|ä|å|ǻ|ā|ă|ą|ǎ|ª|а/' => 'a',
'/Б/' => 'B',
'/б/' => 'b',
'/Ç|Ć|Ĉ|Ċ|Č|Ц/' => 'C',
'/ç|ć|ĉ|ċ|č|ц/' => 'c',
'/Ð|Ď|Đ|Д/' => 'Dj',
'/ð|ď|đ|д/' => 'dj',
'/È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě|Е|Ё|Э/' => 'E',
'/è|é|ê|ë|ē|ĕ|ė|ę|ě|е|ё|э/' => 'e',
'/Ф/' => 'F',
'/ƒ|ф/' => 'f',
'/Ĝ|Ğ|Ġ|Ģ|Г/' => 'G',
'/ĝ|ğ|ġ|ģ|г/' => 'g',
'/Ĥ|Ħ|Х/' => 'H',
'/ĥ|ħ|х/' => 'h',
'/Ì|Í|Î|Ï|Ĩ|Ī|Ĭ|Ǐ|Į|İ|И/' => 'I',
'/ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı|и/' => 'i',
'/Ĵ|Й/' => 'J',
'/ĵ|й/' => 'j',
'/Ķ|К/' => 'K',
'/ķ|к/' => 'k',
'/Ĺ|Ļ|Ľ|Ŀ|Ł|Л/' => 'L',
'/ĺ|ļ|ľ|ŀ|ł|л/' => 'l',
'/М/' => 'M',
'/м/' => 'm',
'/Ñ|Ń|Ņ|Ň|Н/' => 'N',
'/ñ|ń|ņ|ň|ʼn|н/' => 'n',
'/Ö|Ò|Ó|Ô|Õ|Ō|Ŏ|Ǒ|Ő|Ơ|Ø|Ǿ|О/' => 'O',
'/ö|ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º|о/' => 'o',
'/П/' => 'P',
'/п/' => 'p',
'/Ŕ|Ŗ|Ř|Р/' => 'R',
'/ŕ|ŗ|ř|р/' => 'r',
'/Ś|Ŝ|Ş|Ș|Š|С/' => 'S',
'/ś|ŝ|ş|ș|š|ſ|с/' => 's',
'/Ţ|Ț|Ť|Ŧ|Т/' => 'T',
'/ţ|ț|ť|ŧ|т/' => 't',
'/Ù|Ú|Û|Ũ|Ū|Ŭ|Ů|Ü|Ű|Ų|Ư|Ǔ|Ǖ|Ǘ|Ǚ|Ǜ|У/' => 'U',
'/ù|ú|û|ũ|ū|ŭ|ů|ü|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ|у/' => 'u',
'/В/' => 'V',
'/в/' => 'v',
'/Ý|Ÿ|Ŷ|Ы/' => 'Y',
'/ý|ÿ|ŷ|ы/' => 'y',
'/Ŵ/' => 'W',
'/ŵ/' => 'w',
'/Ź|Ż|Ž|З/' => 'Z',
'/ź|ż|ž|з/' => 'z',
'/Æ|Ǽ/' => 'AE',
'/ß/'=> 'ss',
'/IJ/' => 'IJ',
'/ij/' => 'ij',
'/Œ/' => 'OE',
'/Ч/' => 'Ch',
'/ч/' => 'ch',
'/Ю/' => 'Ju',
'/ю/' => 'ju',
'/Я/' => 'Ja',
'/я/' => 'ja',
'/Ш/' => 'Sh',
'/ш/' => 'sh',
'/Щ/' => 'Shch',
'/щ/' => 'shch',
'/Ж/' => 'Zh',
'/ж/' => 'zh',
),
);
\ No newline at end of file
<?php
class Admin_Panel_Controller extends Controller {
public function action_index()
{
return 'Admin_Panel_Index';
}
}
\ No newline at end of file
<?php
class Auth_Controller extends Controller {
public function action_index()
{
return __FUNCTION__;
}
public function action_login()
{
return __FUNCTION__;
}
public function action_profile($name)
{
return $name;
}
}
\ No newline at end of file
<?php
class Filter_Controller extends Controller {
public function __construct()
{
Filter::register('test-all-before', function() { $_SERVER['test-all-before'] = true; });
Filter::register('test-all-after', function() { $_SERVER['test-all-after'] = true; });
Filter::register('test-profile-before', function() { $_SERVER['test-profile-before'] = true; });
Filter::register('test-except', function() { $_SERVER['test-except'] = true; });
Filter::register('test-on-post', function() { $_SERVER['test-on-post'] = true; });
Filter::register('test-on-get-put', function() { $_SERVER['test-on-get-put'] = true; });
Filter::register('test-before-filter', function() { return 'Filtered!'; });
Filter::register('test-param', function($var1, $var2) { return $var1.$var2; });
Filter::register('test-multi-1', function() { $_SERVER['test-multi-1'] = true; });
Filter::register('test-multi-2', function() { $_SERVER['test-multi-2'] = true; });
$this->filter('before', 'test-all-before');
$this->filter('after', 'test-all-after');
$this->filter('before', 'test-profile-before')->only(array('profile'));
$this->filter('before', 'test-except')->except(array('index', 'profile'));
$this->filter('before', 'test-on-post')->on(array('post'));
$this->filter('before', 'test-on-get-put')->on(array('get', 'put'));
$this->filter('before', 'test-before-filter')->only('login');
$this->filter('after', 'test-before-filter')->only('logout');
$this->filter('before', 'test-param:1,2')->only('edit');
$this->filter('before', 'test-multi-1|test-multi-2')->only('save');
}
public function action_index()
{
return __FUNCTION__;
}
public function action_profile()
{
return __FUNCTION__;
}
public function action_show()
{
return __FUNCTION__;
}
public function action_edit()
{
return __FUNCTION__;
}
public function action_save()
{
return __FUNCTION__;
}
public function action_login()
{
return __FUNCTION__;
}
public function action_logout()
{
return __FUNCTION__;
}
}
\ No newline at end of file
<?php
class Home_Controller extends Controller {
/*
|--------------------------------------------------------------------------
| The Default Controller
|--------------------------------------------------------------------------
|
| Instead of using RESTful routes and anonymous functions, you might wish
| to use controllers to organize your application API. You'll love them.
|
| To start using this controller simply remove the default route from the
| application "routes.php" file. Laravel is smart enough to locate this
| controller and call the default method, which is "action_index".
|
| This controller responds to URIs beginning with "home", and it also
| serves as the default controller for the application, meaning it
| handles requests to the root of the application.
|
| You can respond to GET requests to "/home/profile" like so:
|
| public function action_profile()
| {
| return "This is your profile!";
| }
|
| Any extra segments are passed to the method as parameters:
|
| public function action_profile($id)
| {
| return "This is the profile for user {$id}.";
| }
|
*/
public function action_index()
{
return View::make('home.index');
}
}
\ No newline at end of file
<?php
class Restful_Controller extends Controller {
public $restful = true;
public function get_index()
{
return __FUNCTION__;
}
public function post_index()
{
return __FUNCTION__;
}
}
\ No newline at end of file
<?php
class Template_Basic_Controller extends Controller {
public $layout = 'home.index';
public function action_index()
{
//
}
}
\ No newline at end of file
<?php
class Template_Named_Controller extends Controller {
public $layout = 'name: home';
public function action_index()
{
//
}
}
\ No newline at end of file
<?php
class TemplateStub {
public function __toString()
{
return 'TemplateStub';
}
}
class Template_Override_Controller extends Controller {
public $layout = 'home.index';
public function action_index()
{
//
}
public function layout()
{
return 'Layout';
}
}
\ No newline at end of file
<?php namespace Dashboard;
/**
* This class is used for testing the auto-loading of classes
* that are mapped by namesapce.
*/
class Repository {}
\ 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; Previous',
'next' => '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" => "The :attribute must be accepted.",
"active_url" => "The :attribute is not a valid URL.",
"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.",
"between" => array(
"numeric" => "The :attribute must be between :min - :max.",
"file" => "The :attribute must be between :min - :max kilobytes.",
"string" => "The :attribute must be between :min - :max characters.",
),
"confirmed" => "The :attribute confirmation does not match.",
"different" => "The :attribute and :other must be different.",
"email" => "The :attribute format is invalid.",
"exists" => "The selected :attribute is invalid.",
"image" => "The :attribute must be an image.",
"in" => "The selected :attribute is invalid.",
"integer" => "The :attribute must be an integer.",
"ip" => "The :attribute must be a valid IP address.",
"max" => array(
"numeric" => "The :attribute must be less than :max.",
"file" => "The :attribute must be less than :max kilobytes.",
"string" => "The :attribute must be less than :max characters.",
),
"mimes" => "The :attribute must be a file of type: :values.",
"min" => array(
"numeric" => "The :attribute must be at least :min.",
"file" => "The :attribute must be at least :min kilobytes.",
"string" => "The :attribute must be at least :min characters.",
),
"not_in" => "The selected :attribute is invalid.",
"numeric" => "The :attribute must be a number.",
"required" => "The :attribute field is required.",
"same" => "The :attribute and :other must match.",
"size" => array(
"numeric" => "The :attribute must be :size.",
"file" => "The :attribute must be :size kilobyte.",
"string" => "The :attribute must be :size characters.",
),
"unique" => "The :attribute has already been taken.",
"url" => "The :attribute format is invalid.",
/*
|--------------------------------------------------------------------------
| Custom Validation Language Lines
|--------------------------------------------------------------------------
|
| Here you may specify custom validation messages for attributes using the
| convention "attribute_rule" to name the lines. This 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('custom_required' => 'This field is required!'),
/*
|--------------------------------------------------------------------------
| 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('test_attribute' => 'attribute'),
);
\ No newline at end of file
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