This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Taken from http://chrishayes.ca/blog/code/laravel-4-dry-views-form-html-macros | |
Form::macro('countrySelect', function($name, $selected = 0, $options = []) | |
{ | |
$countries = [0 => 'Select Country'] + Country::remember(60)->get()->lists('name', 'id'); | |
return Form::select($name, $countries, $selected, $options); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App::before(function($request) | |
{ | |
// default browser language | |
$language = substr($request->server->get('HTTP_ACCEPT_LANGUAGE'), 0, 2); | |
// language set from route | |
if (null !== $request->segment(1)) { | |
$routeLanguage = $request->segment(1); | |
if (! in_array($routeLanguage, Config::get('site.languages'))) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"USD": { | |
"symbol": "$", | |
"name": "US Dollar", | |
"symbol_native": "$", | |
"decimal_digits": 2, | |
"rounding": 0, | |
"code": "USD", | |
"name_plural": "US dollars" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* PHP CLI color display | |
* | |
* 3[x]: Foreground | |
* 4[x]: Background | |
* | |
* [3|4]0: Black | |
* [3|4]1: Red |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Country IBAN | |
--------------------------------------------------------------- | |
Albania AL47 2121 1009 0000 0002 3569 8741 | |
Andorra AD12 0001 2030 2003 5910 0100 | |
Austria AT61 1904 3002 3457 3201 | |
Azerbaijan AZ21 NABZ 0000 0000 1370 1000 1944 | |
Bahrain BH67 BMAG 0000 1299 1234 56 | |
Belgium BE62 5100 0754 7061 | |
Bosnia and Herzegovina BA39 1290 0794 0102 8494 | |
Bulgaria BG80 BNBG 9661 1020 3456 78 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bin,banka_kodu,banka_adi,type,sub_type,virtual,prepaid | |
413226,10,T.C. ZİRAAT BANKASI A.Ş.,VISA,PLATINUM | |
444676,10,T.C. ZİRAAT BANKASI A.Ş.,VISA,CLASSIC | |
444677,10,T.C. ZİRAAT BANKASI A.Ş.,VISA,GOLD | |
444678,10,T.C. ZİRAAT BANKASI A.Ş.,VISA,PLATINUM | |
453955,10,T.C. ZİRAAT BANKASI A.Ş.,VISA, CLASSIC | |
453956,10,T.C. ZİRAAT BANKASI A.Ş.,VISA, GOLD | |
454671,10,T.C. ZİRAAT BANKASI A.Ş.,VISA, CLASSIC | |
454672,10,T.C. ZİRAAT BANKASI A.Ş.,VISA, CLASSIC | |
454673,10,T.C. ZİRAAT BANKASI A.Ş.,VISA, BUSINESS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CARD TYPE NUMBER | |
-------------------------------------------------- | |
Master Card (16 Digits) 5105105105105100 | |
Master Card (16 Digits) 5555555555554444 | |
Visa (13 Digits) 4222222222222 | |
Visa (16 Digits) 4111111111111111 | |
Visa (16 Digits) 4012888888881881 | |
American Express (15 Digits) 378282246310005 | |
American Express (15 Digits) 371449635398431 | |
Amex Corporate (15 Digits) 378734493671000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TABLE IF EXISTS `cities`; | |
CREATE TABLE `cities` ( | |
`id` int(2) NOT NULL, | |
`title` varchar(255) NOT NULL, | |
`lat` double(11,8) DEFAULT NULL, | |
`lng` double(11,8) DEFAULT NULL, | |
`northeast_lat` double(11,8) DEFAULT NULL, | |
`northeast_lng` double(11,8) DEFAULT NULL, | |
`southwest_lat` double(11,8) DEFAULT NULL, | |
`southwest_lng` double(11,8) DEFAULT NULL, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ABBR CODE COUNTRY | |
----------------------- | |
US 1 ABD | |
VI 1 ABD Virjin Adaları | |
AF 93 Afganistan | |
AX 358 Åland Adaları | |
DE 49 Almanya | |
AS 1 Amerikan Samoası | |
AD 376 Andorra | |
AO 244 Angola |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://forums.laravel.io/viewtopic.php?id=1943#p12005 | |
Route::get('settings/(account|notifications|profile)', array( | |
'as' => 'settings', | |
'uses' => 'account.settings@(:1)' | |
)); | |
URL::to_route('settings', 'profile'); |