├── bundles ├── .gitignore └── docs │ └── views │ ├── page.blade.php │ └── template.blade.php ├── public ├── favicon.ico ├── css │ ├── .gitignore │ ├── blank.gif │ ├── fancybox_loading.gif │ ├── fancybox_overlay.png │ └── fancybox_sprite.png ├── img │ ├── .gitignore │ ├── cmu.jpg │ ├── next.png │ ├── prev.png │ ├── loader.gif │ ├── required.png │ ├── sortable.png │ ├── sorted-asc.png │ ├── sorted-desc.png │ ├── glyphicons-halflings.png │ └── glyphicons-halflings-white.png ├── js │ ├── .gitignore │ ├── scrabbleclub.min.js │ ├── string_score.min.js │ └── application.js ├── bundles │ └── .gitignore ├── less │ ├── .gitignore │ ├── charting.less │ ├── grid.less │ ├── utilities.less │ ├── component-animations.less │ ├── close.less │ ├── wells.less │ ├── hero-unit.less │ ├── layouts.less │ ├── labels.less │ ├── breadcrumbs.less │ ├── pager.less │ ├── accordion.less │ ├── scaffolding.less │ ├── thumbnails.less │ ├── quickselect.less │ ├── tooltip.less │ ├── tinybadges.less │ ├── code.less │ ├── tablesorter.less │ ├── pagination.less │ ├── popovers.less │ ├── alerts.less │ └── modals.less ├── laravel │ └── img │ │ └── logoback.png ├── .htaccess └── index.php ├── vendor └── .gitignore ├── .gitattributes ├── application ├── tasks │ ├── .gitignore │ └── alphagram.php ├── libraries │ ├── .gitignore │ └── validator.php ├── migrations │ ├── .gitignore │ ├── 2014_04_02_185738_alphagram.php │ ├── 2013_02_09_203003_page.php │ ├── 2014_01_28_224130_private_resources.php │ ├── 2013_01_07_201532_news.php │ └── 2012_11_08_195142_resources.php ├── models │ ├── .gitignore │ ├── validword.php │ ├── resourcegroup.php │ ├── page.php │ ├── bingo.php │ └── basemodel.php ├── config │ ├── .gitignore │ ├── scrabble.php │ └── facebook.php ├── views │ ├── partials │ │ ├── form_help.php │ │ ├── header │ │ │ ├── auth_form.php │ │ │ └── auth_info.php │ │ ├── form_errors.php │ │ ├── flashes.php │ │ ├── facebook.php │ │ ├── footer.php │ │ ├── year_picker.php │ │ └── bingo_listing.php │ ├── admin │ │ ├── players │ │ │ ├── show.php │ │ │ ├── delete.php │ │ │ └── index.php │ │ ├── news │ │ │ ├── delete.php │ │ │ └── index.php │ │ ├── resources │ │ │ ├── delete.php │ │ │ ├── group_form.php │ │ │ └── group_delete.php │ │ ├── bingos │ │ │ ├── delete.php │ │ │ ├── form.php │ │ │ └── index.php │ │ ├── housekeeping │ │ │ ├── index.php │ │ │ └── homepage.php │ │ └── games │ │ │ ├── update_ratings.php │ │ │ ├── delete.php │ │ │ ├── edit.php │ │ │ └── ratings.php │ ├── club │ │ └── summary_nogame.php │ ├── wordlists │ │ ├── index.php │ │ └── stem.php │ ├── news │ │ ├── item.php │ │ └── index.php │ ├── base.php │ ├── about │ │ └── resources.php │ ├── players │ │ ├── games.php │ │ └── bingos.php │ └── home │ │ └── login.php ├── tests │ └── example.test.php ├── controllers │ ├── base.php │ ├── about.php │ ├── wordlists.php │ └── news.php ├── language │ ├── ar │ │ └── pagination.php │ ├── ru │ │ └── pagination.php │ ├── bg │ │ └── pagination.php │ ├── he │ │ └── pagination.php │ ├── en │ │ └── pagination.php │ ├── hu │ │ └── pagination.php │ ├── pt │ │ └── pagination.php │ ├── da │ │ └── pagination.php │ ├── de │ │ └── pagination.php │ ├── el │ │ └── pagination.php │ ├── gr │ │ └── pagination.php │ ├── id │ │ └── pagination.php │ ├── nl │ │ └── pagination.php │ ├── fr │ │ └── pagination.php │ ├── pl │ │ └── pagination.php │ ├── tr │ │ └── pagination.php │ └── ja │ │ └── pagination.php ├── routes │ └── ajax.php └── bundles.php ├── laravel ├── tests │ ├── bundles │ │ ├── .gitignore │ │ ├── dummy │ │ │ ├── start.php │ │ │ └── routes.php │ │ └── dashboard │ │ │ ├── config │ │ │ └── meta.php │ │ │ ├── routes.php │ │ │ ├── models │ │ │ └── repository.php │ │ │ └── controllers │ │ │ └── panel.php │ ├── storage │ │ ├── cache │ │ │ └── .gitignore │ │ ├── logs │ │ │ └── .gitignore │ │ ├── views │ │ │ └── .gitignore │ │ ├── sessions │ │ │ └── .gitignore │ │ ├── files │ │ │ └── desert.jpg │ │ └── database │ │ │ └── application.sqlite │ ├── application │ │ ├── models │ │ │ ├── .gitignore │ │ │ ├── user.php │ │ │ ├── autoloader.php │ │ │ ├── repositories │ │ │ │ └── user.php │ │ │ └── model.php │ │ ├── tasks │ │ │ └── .gitignore │ │ ├── libraries │ │ │ └── .gitignore │ │ ├── migrations │ │ │ └── .gitignore │ │ ├── views │ │ │ └── tests │ │ │ │ ├── nested.php │ │ │ │ └── basic.php │ │ ├── config │ │ │ └── local │ │ │ │ └── database.php │ │ ├── language │ │ │ ├── sp │ │ │ │ └── validation.php │ │ │ └── en │ │ │ │ └── pagination.php │ │ ├── controllers │ │ │ ├── admin │ │ │ │ └── panel.php │ │ │ ├── template │ │ │ │ ├── basic.php │ │ │ │ ├── named.php │ │ │ │ └── override.php │ │ │ ├── restful.php │ │ │ ├── auth.php │ │ │ └── home.php │ │ ├── dashboard │ │ │ └── repository.php │ │ └── bundles.php │ ├── cases │ │ ├── hash.test.php │ │ ├── query.test.php │ │ ├── event.test.php │ │ ├── fluent.test.php │ │ ├── ioc.test.php │ │ ├── uri.test.php │ │ └── database.test.php │ └── phpunit.php ├── cli │ ├── tasks │ │ ├── task.php │ │ ├── test │ │ │ ├── stub.xml │ │ │ └── phpunit.php │ │ ├── migrate │ │ │ └── stub.php │ │ ├── bundle │ │ │ ├── providers │ │ │ │ └── github.php │ │ │ ├── repository.php │ │ │ └── publisher.php │ │ ├── help.php │ │ ├── session │ │ │ └── migration.php │ │ ├── key.php │ │ └── route.php │ └── artisan.php ├── database │ ├── query │ │ ├── grammars │ │ │ ├── mysql.php │ │ │ ├── postgres.php │ │ │ └── sqlite.php │ │ └── join.php │ ├── expression.php │ ├── connectors │ │ ├── sqlite.php │ │ ├── connector.php │ │ ├── sqlserver.php │ │ ├── mysql.php │ │ └── postgres.php │ ├── eloquent │ │ ├── pivot.php │ │ └── relationships │ │ │ ├── has_one.php │ │ │ └── has_one_or_many.php │ └── exception.php ├── session │ └── drivers │ │ ├── sweeper.php │ │ ├── memory.php │ │ ├── apc.php │ │ ├── cookie.php │ │ ├── redis.php │ │ └── memcached.php ├── vendor │ └── Symfony │ │ └── Component │ │ ├── HttpFoundation │ │ ├── File │ │ │ ├── Exception │ │ │ │ ├── UploadException.php │ │ │ │ ├── FileException.php │ │ │ │ ├── UnexpectedTypeException.php │ │ │ │ ├── FileNotFoundException.php │ │ │ │ └── AccessDeniedException.php │ │ │ └── MimeType │ │ │ │ ├── ExtensionGuesserInterface.php │ │ │ │ ├── MimeTypeGuesserInterface.php │ │ │ │ └── FileinfoMimeTypeGuesser.php │ │ ├── Session │ │ │ ├── Storage │ │ │ │ ├── Handler │ │ │ │ │ ├── NativeSessionHandler.php │ │ │ │ │ ├── NativeFileSessionHandler.php │ │ │ │ │ ├── NullSessionHandler.php │ │ │ │ │ └── NativeSqliteSessionHandler.php │ │ │ │ └── Proxy │ │ │ │ │ └── NativeProxy.php │ │ │ ├── SessionBagInterface.php │ │ │ └── Attribute │ │ │ │ └── AttributeBagInterface.php │ │ ├── LaravelResponse.php │ │ ├── RequestMatcherInterface.php │ │ ├── composer.json │ │ ├── LICENSE │ │ ├── LaravelRequest.php │ │ ├── ApacheRequest.php │ │ ├── JsonResponse.php │ │ ├── README.md │ │ └── ServerBag.php │ │ └── Console │ │ ├── composer.json │ │ ├── Output │ │ ├── NullOutput.php │ │ └── ConsoleOutputInterface.php │ │ ├── Helper │ │ ├── Helper.php │ │ └── HelperInterface.php │ │ ├── LICENSE │ │ ├── README.md │ │ └── Formatter │ │ └── OutputFormatterStyleInterface.php ├── documentation │ ├── config.md │ ├── encryption.md │ ├── database │ │ └── raw.md │ ├── requests.md │ └── auth │ │ └── config.md ├── hash.php ├── memcached.php ├── cache │ └── drivers │ │ └── apc.php └── auth │ └── drivers │ └── fluent.php ├── storage ├── database │ └── .gitignore ├── cache │ └── .gitignore ├── logs │ └── .gitignore ├── uploads │ └── .gitignore ├── views │ └── .gitignore ├── work │ └── .gitignore └── sessions │ └── .gitignore ├── .travis.yml ├── composer.json ├── .gitmodules ├── TODO.md ├── readme.md ├── .gitignore ├── artisan └── CONTRIBUTING.md /bundles/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/css/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/img/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/js/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto -------------------------------------------------------------------------------- /application/tasks/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/bundles/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /application/libraries/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /application/migrations/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /application/models/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /laravel/tests/bundles/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/less/.gitignore: -------------------------------------------------------------------------------- 1 | *.css 2 | -------------------------------------------------------------------------------- /laravel/tests/storage/cache/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /laravel/tests/storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /laravel/tests/storage/views/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /storage/database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite -------------------------------------------------------------------------------- /application/config/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /laravel/tests/application/models/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /laravel/tests/application/tasks/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /laravel/tests/storage/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /storage/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /storage/uploads/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /storage/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /storage/work/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /laravel/tests/application/libraries/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /laravel/tests/application/migrations/.gitignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /storage/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore -------------------------------------------------------------------------------- /laravel/tests/application/views/tests/nested.php: -------------------------------------------------------------------------------- 1 | Taylor -------------------------------------------------------------------------------- /laravel/tests/application/models/user.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": { 3 | "facebook/php-sdk": "dev-master" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /laravel/cli/tasks/task.php: -------------------------------------------------------------------------------- 1 | is -------------------------------------------------------------------------------- /public/img/cmu.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cviebrock/ScrabbleClub/master/public/img/cmu.jpg -------------------------------------------------------------------------------- /public/img/next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cviebrock/ScrabbleClub/master/public/img/next.png -------------------------------------------------------------------------------- /public/img/prev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cviebrock/ScrabbleClub/master/public/img/prev.png -------------------------------------------------------------------------------- /public/css/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cviebrock/ScrabbleClub/master/public/css/blank.gif -------------------------------------------------------------------------------- /public/img/loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cviebrock/ScrabbleClub/master/public/img/loader.gif -------------------------------------------------------------------------------- /laravel/tests/application/models/repositories/user.php: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /bundles/docs/views/page.blade.php: -------------------------------------------------------------------------------- 1 | @layout('docs::template') 2 | 3 | @section('content') 4 | {{ $content }} 5 | @endsection -------------------------------------------------------------------------------- /laravel/tests/bundles/dashboard/config/meta.php: -------------------------------------------------------------------------------- 1 | 'dashboard', 6 | 7 | ); -------------------------------------------------------------------------------- /public/css/fancybox_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cviebrock/ScrabbleClub/master/public/css/fancybox_loading.gif -------------------------------------------------------------------------------- /public/css/fancybox_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cviebrock/ScrabbleClub/master/public/css/fancybox_overlay.png -------------------------------------------------------------------------------- /public/css/fancybox_sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cviebrock/ScrabbleClub/master/public/css/fancybox_sprite.png -------------------------------------------------------------------------------- /public/laravel/img/logoback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cviebrock/ScrabbleClub/master/public/laravel/img/logoback.png -------------------------------------------------------------------------------- /laravel/tests/application/config/local/database.php: -------------------------------------------------------------------------------- 1 | 'sqlite', 6 | 7 | ); -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "components/fancybox"] 2 | path = components/fancybox 3 | url = https://github.com/fancyapps/fancyBox 4 | -------------------------------------------------------------------------------- /public/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cviebrock/ScrabbleClub/master/public/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /laravel/tests/storage/files/desert.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cviebrock/ScrabbleClub/master/laravel/tests/storage/files/desert.jpg -------------------------------------------------------------------------------- /public/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cviebrock/ScrabbleClub/master/public/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /laravel/tests/bundles/dummy/routes.php: -------------------------------------------------------------------------------- 1 | 'El campo de atributo es necesario.', 6 | 7 | ); -------------------------------------------------------------------------------- /laravel/tests/storage/database/application.sqlite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cviebrock/ScrabbleClub/master/laravel/tests/storage/database/application.sqlite -------------------------------------------------------------------------------- /public/less/charting.less: -------------------------------------------------------------------------------- 1 | .sparkline { 2 | display: inline-block; 3 | } 4 | 5 | .table tbody td.spark { 6 | padding: 0px 8px; 7 | vertical-align: middle; 8 | } -------------------------------------------------------------------------------- /application/views/admin/players/show.php: -------------------------------------------------------------------------------- 1 |
6 | There were no games on 7 |
8 | 9 | -------------------------------------------------------------------------------- /laravel/tests/application/controllers/restful.php: -------------------------------------------------------------------------------- 1 | set_attribute('setter', 'setter: '.$setter); 8 | } 9 | 10 | public function get_getter() 11 | { 12 | return 'getter: '.$this->get_attribute('getter'); 13 | } 14 | 15 | } -------------------------------------------------------------------------------- /application/views/wordlists/index.php: -------------------------------------------------------------------------------- 1 |There are no news items to display.
31 | 32 | 33 | -------------------------------------------------------------------------------- /application/views/about/resources.php: -------------------------------------------------------------------------------- 1 || ? | 9 |Alphagram | 10 |Words | 11 |
|---|---|---|
| 17 | | 18 | | 19 | '; 23 | } 24 | } else { 25 | echo '-'; 26 | } 27 | ?> 28 | | 29 |
6 | Are you sure you want to update the player club ratings for this date? 7 | This will erase any rating calculations made after this date (although there shouldn't be any). 8 |
9 | 10 | Form::TYPE_HORIZONTAL)); 13 | echo Form::token(); 14 | 15 | echo Form::field('labelled_checkbox', 'confirm', 'Are you sure?', 16 | array('Yes, update ratings', 1, false) 17 | ); 18 | 19 | echo Form::actions(array( 20 | Form::submit('Update Ratings', array('class' => 'btn-primary')), 21 | action_link_to_route('admin.games@index', 'Back to Games List', array(), 'arrow-left') 22 | )); 23 | 24 | 25 | echo Form::close(); 26 | 27 | ?> -------------------------------------------------------------------------------- /application/language/tr/pagination.php: -------------------------------------------------------------------------------- 1 | 9 | * @link http://sinaneldem.com.tr 10 | */ 11 | 12 | return array( 13 | 14 | /* 15 | |-------------------------------------------------------------------------- 16 | | Pagination Language Lines 17 | |-------------------------------------------------------------------------- 18 | | 19 | | The following language lines are used by the paginator library to build 20 | | the pagination links. You're free to change them to anything you want. 21 | | If you come up with something more exciting, let us know. 22 | | 23 | */ 24 | 25 | 'previous' => '« Önceki', 26 | 'next' => 'Sonraki »', 27 | 28 | ); -------------------------------------------------------------------------------- /application/controllers/wordlists.php: -------------------------------------------------------------------------------- 1 | layout->with('title', 'Word Lists') 14 | ->nest('content', 'wordlists.index', compact('stem67')); 15 | } 16 | 17 | public function get_stem($stem) 18 | { 19 | $stem = Str::upper($stem); 20 | $words = array(); 21 | 22 | foreach(range('A','Z') as $letter) 23 | { 24 | $alphagram = alphabetize_word($stem.$letter); 25 | $words[$letter] = ValidWord::where('alphagram','=',$alphagram)->order_by('word','asc')->get(); 26 | } 27 | 28 | $this->layout->with('title', 'Stem List - '.$stem.'+?') 29 | ->nest('content', 'wordlists.stem', compact('stem','words')); 30 | } 31 | 32 | 33 | } 34 | -------------------------------------------------------------------------------- /laravel/vendor/Symfony/Component/HttpFoundation/File/MimeType/ExtensionGuesserInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpFoundation\File\MimeType; 13 | 14 | /** 15 | * Guesses the file extension corresponding to a given mime type 16 | */ 17 | interface ExtensionGuesserInterface 18 | { 19 | /** 20 | * Makes a best guess for a file extension, given a mime type 21 | * 22 | * @param string $mimeType The mime type 23 | * @return string The guessed extension or NULL, if none could be guessed 24 | */ 25 | function guess($mimeType); 26 | } 27 | -------------------------------------------------------------------------------- /laravel/vendor/Symfony/Component/Console/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "symfony/console", 3 | "type": "library", 4 | "description": "Symfony Console Component", 5 | "keywords": [], 6 | "homepage": "http://symfony.com", 7 | "license": "MIT", 8 | "authors": [ 9 | { 10 | "name": "Fabien Potencier", 11 | "email": "fabien@symfony.com" 12 | }, 13 | { 14 | "name": "Symfony Community", 15 | "homepage": "http://symfony.com/contributors" 16 | } 17 | ], 18 | "require": { 19 | "php": ">=5.3.2" 20 | }, 21 | "autoload": { 22 | "psr-0": { "Symfony\\Component\\Console": "" } 23 | }, 24 | "target-dir": "Symfony/Component/Console", 25 | "extra": { 26 | "branch-alias": { 27 | "dev-master": "2.1-dev" 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /laravel/database/connectors/sqlite.php: -------------------------------------------------------------------------------- 1 | options($config); 14 | 15 | // SQLite provides supported for "in-memory" databases, which exist only for 16 | // lifetime of the request. Any given in-memory database may only have one 17 | // PDO connection open to it at a time. These are mainly for tests. 18 | if ($config['database'] == ':memory:') 19 | { 20 | return new PDO('sqlite::memory:', null, null, $options); 21 | } 22 | 23 | $path = path('storage').'database'.DS.$config['database'].'.sqlite'; 24 | 25 | return new PDO('sqlite:'.$path, null, null, $options); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /application/views/players/games.php: -------------------------------------------------------------------------------- 1 | with('year', $year)->render(); ?> 2 | 3 |-1)?l:Math.max(a,b);if(n===-1){if(s){e+=1-s;continue}else{return 0}}else{r=0.1}if(g[n]===h){r+=0.1}if(n===0){r+=0.6;if(d===0){o=1}}else{if(g.charAt(n-1)===" "){r+=0.8}}g=g.substring(n+1,p);f+=r}k=f/q;j=((k*(q/p))+k)/2;j=j/e;if(o&&(j+0.15<1)){j+=0.15}return j}; -------------------------------------------------------------------------------- /public/less/tooltip.less: -------------------------------------------------------------------------------- 1 | // TOOLTIP 2 | // ------= 3 | 4 | .tooltip { 5 | position: absolute; 6 | z-index: @zindexTooltip; 7 | display: block; 8 | visibility: visible; 9 | padding: 5px; 10 | font-size: 11px; 11 | .opacity(0); 12 | &.in { .opacity(80); } 13 | &.top { margin-top: -2px; } 14 | &.right { margin-left: 2px; } 15 | &.bottom { margin-top: 2px; } 16 | &.left { margin-left: -2px; } 17 | &.top .tooltip-arrow { #popoverArrow > .top(); } 18 | &.left .tooltip-arrow { #popoverArrow > .left(); } 19 | &.bottom .tooltip-arrow { #popoverArrow > .bottom(); } 20 | &.right .tooltip-arrow { #popoverArrow > .right(); } 21 | } 22 | .tooltip-inner { 23 | max-width: 200px; 24 | padding: 3px 8px; 25 | color: @white; 26 | text-align: center; 27 | text-decoration: none; 28 | background-color: @black; 29 | .border-radius(4px); 30 | } 31 | .tooltip-arrow { 32 | position: absolute; 33 | width: 0; 34 | height: 0; 35 | } 36 | -------------------------------------------------------------------------------- /application/views/admin/resources/group_form.php: -------------------------------------------------------------------------------- 1 |2 | 3 |4 | 5 | has_errors()): ?> 6 |7 | Oops! Please correct the errors below. 8 |9 | 10 | 11 | Form::TYPE_HORIZONTAL)); 14 | echo Form::token(); 15 | 16 | echo Form::field('text', 'title', 'Group Title', 17 | array($group->title, array('class'=>'span3 required')), 18 | array('error' => $group->error('title')) 19 | ); 20 | 21 | echo Form::field('labelled_checkbox', 'private', 'Private?', 22 | array('Yes, make this group private', 1, $group->private) 23 | ); 24 | 25 | echo Form::actions(array( 26 | Form::submit($submit_text, array('class' => 'btn-primary')), 27 | action_link_to_route('admin.resources', 'Back to Resource Groups List', array(), 'arrow-left') 28 | )); 29 | 30 | echo Form::close(); 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /laravel/database/exception.php: -------------------------------------------------------------------------------- 1 | inner = $inner; 23 | 24 | $this->setMessage($sql, $bindings); 25 | } 26 | 27 | /** 28 | * Set the exception message to include the SQL and bindings. 29 | * 30 | * @param string $sql 31 | * @param array $bindings 32 | * @return void 33 | */ 34 | protected function setMessage($sql, $bindings) 35 | { 36 | $this->message = $this->inner->getMessage(); 37 | 38 | $this->message .= "\n\nSQL: ".$sql."\n\nBindings: ".var_export($bindings, true); 39 | } 40 | 41 | } -------------------------------------------------------------------------------- /laravel/vendor/Symfony/Component/HttpFoundation/RequestMatcherInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpFoundation; 13 | 14 | /** 15 | * RequestMatcherInterface is an interface for strategies to match a Request. 16 | * 17 | * @author Fabien Potencier18 | * 19 | * @api 20 | */ 21 | interface RequestMatcherInterface 22 | { 23 | /** 24 | * Decides whether the rule(s) implemented by the strategy matches the supplied request. 25 | * 26 | * @param Request $request The request to check for a match 27 | * 28 | * @return Boolean true if the request matches, false otherwise 29 | * 30 | * @api 31 | */ 32 | function matches(Request $request); 33 | } 34 | -------------------------------------------------------------------------------- /public/less/tinybadges.less: -------------------------------------------------------------------------------- 1 | @badgeColor: darken(@orange, 10%); 2 | @badgeBorderColor: darken(@orange, 15%); 3 | 4 | .tinybadges { 5 | position: absolute; 6 | font-size: 10px; 7 | font-weight: bold; 8 | text-align: center; 9 | top: -1px; 10 | left: -14px; 11 | line-height: 10px; 12 | color: @white; 13 | padding: 1px 0; 14 | width: 40px; 15 | height: 10px; 16 | border-top: 1px solid @black; 17 | border-bottom: 1px solid @black; 18 | .rotate(-45deg); 19 | .box-shadow(); 20 | 21 | &.p1 { background-color: @badgeColor; border-color: @badgeBorderColor; } 22 | &.p2 { background-color: lighten(@badgeColor, 10%); border-color: lighten(@badgeBorderColor, 10%); } 23 | &.p3 { background-color: lighten(@badgeColor, 20%); border-color: lighten(@badgeBorderColor, 20%); } 24 | &.p4 { background-color: lighten(@badgeColor, 30%); border-color: lighten(@badgeBorderColor, 30%); } 25 | &.p5 { background-color: lighten(@badgeColor, 40%); border-color: lighten(@badgeBorderColor, 40%); } 26 | 27 | 28 | } -------------------------------------------------------------------------------- /laravel/documentation/config.md: -------------------------------------------------------------------------------- 1 | # Runtime Configuration 2 | 3 | ## Contents 4 | 5 | - [The Basics](#the-basics) 6 | - [Retrieving Options](#retrieving-options) 7 | - [Setting Options](#setting-options) 8 | 9 | 10 | ## The Basics 11 | 12 | Sometimes you may need to get and set configuration options at runtime. For this you'll use the **Config** class, which utilizes Laravel's "dot" syntax for accessing configuration files and items. 13 | 14 | 15 | ## Retrieving Options 16 | 17 | #### Retrieve a configuration option: 18 | 19 | $value = Config::get('application.url'); 20 | 21 | #### Return a default value if the option doesn't exist: 22 | 23 | $value = Config::get('application.timezone', 'UTC'); 24 | 25 | #### Retrieve an entire configuration array: 26 | 27 | $options = Config::get('database'); 28 | 29 | 30 | ## Setting Options 31 | 32 | #### Set a configuration option: 33 | 34 | Config::set('cache.driver', 'apc'); -------------------------------------------------------------------------------- /laravel/documentation/encryption.md: -------------------------------------------------------------------------------- 1 | # Encryption 2 | 3 | ## Contents 4 | 5 | - [The Basics](#the-basics) 6 | - [Encrypting A String](#encrypt) 7 | - [Decrypting A String](#decrypt) 8 | 9 | 10 | ## The Basics 11 | 12 | Laravel's **Crypter** class provides a simple interface for handling secure, two-way encryption. By default, the Crypter class provides strong AES-256 encryption and decryption out of the box via the Mcrypt PHP extension. 13 | 14 | > **Note:** Don't forget to install the Mcrypt PHP extension on your server. 15 | 16 | 17 | ## Encrypting A String 18 | 19 | #### Encrypting a given string: 20 | 21 | $encrypted = Crypter::encrypt($value); 22 | 23 | 24 | ## Decrypting A String 25 | 26 | #### Decrypting a string: 27 | 28 | $decrypted = Crypter::decrypt($encrypted); 29 | 30 | > **Note:** It's incredibly important to point out that the decrypt method will only decrypt strings that were encrypted using **your** application key. -------------------------------------------------------------------------------- /laravel/session/drivers/memory.php: -------------------------------------------------------------------------------- 1 | session; 23 | } 24 | 25 | /** 26 | * Save a given session to storage. 27 | * 28 | * @param array $session 29 | * @param array $config 30 | * @param bool $exists 31 | * @return void 32 | */ 33 | public function save($session, $config, $exists) 34 | { 35 | // 36 | } 37 | 38 | /** 39 | * Delete a session from storage by a given ID. 40 | * 41 | * @param string $id 42 | * @return void 43 | */ 44 | public function delete($id) 45 | { 46 | // 47 | } 48 | 49 | } -------------------------------------------------------------------------------- /laravel/tests/cases/query.test.php: -------------------------------------------------------------------------------- 1 | assertEquals('taylor@example.com', $this->query()->find(1)->email); 13 | } 14 | 15 | /** 16 | * Test the select method. 17 | * 18 | * @group laravel 19 | */ 20 | public function testSelectMethodLimitsColumns() 21 | { 22 | $result = $this->query()->select(array('email'))->first(); 23 | 24 | $this->assertTrue(isset($result->email)); 25 | $this->assertFalse(isset($result->name)); 26 | } 27 | 28 | /** 29 | * Test the raw_where method. 30 | * 31 | * @group laravel 32 | */ 33 | public function testRawWhereCanBeUsed() 34 | { 35 | 36 | } 37 | 38 | /** 39 | * Get the query instance for the test case. 40 | * 41 | * @return Query 42 | */ 43 | protected function query() 44 | { 45 | return DB::table('query_test'); 46 | } 47 | 48 | } -------------------------------------------------------------------------------- /application/migrations/2012_11_08_195142_resources.php: -------------------------------------------------------------------------------- 1 | increments('id')->unsigned(); 14 | $table->string('title'); 15 | $table->integer('sort_order'); 16 | $table->timestamps(); 17 | }); 18 | 19 | Schema::create('resources', function($table) { 20 | $table->increments('id')->unsigned(); 21 | $table->integer('resourcegroup_id')->unsigned(); 22 | $table->string('title'); 23 | $table->text('description'); 24 | $table->string('url'); 25 | $table->boolean('active')->index(); 26 | $table->integer('sort_order'); 27 | $table->timestamps(); 28 | }); 29 | } 30 | 31 | /** 32 | * Revert the changes to the database. 33 | * 34 | * @return void 35 | */ 36 | public function down() 37 | { 38 | Schema::drop('resources'); 39 | Schema::drop('resourcegroups'); 40 | } 41 | 42 | } -------------------------------------------------------------------------------- /application/views/admin/resources/group_delete.php: -------------------------------------------------------------------------------- 1 | 2 |4 | 5 | resources) ): ?> 6 |Delete Resource Group
3 |7 | Note: Deleting this group will also delete all the resources in the group: 8 |14 | 15 | 16 | 17 | Form::TYPE_HORIZONTAL)); 20 | echo Form::token(); 21 | 22 | echo Form::field('labelled_checkbox', 'confirm', 'Are you sure?', 23 | array('Yes, delete '. $group->title, 1, false) 24 | ); 25 | 26 | echo Form::actions(array( 27 | Form::submit('Delete Resource Group', array('class' => 'btn-primary btn-warning')), 28 | action_link_to_route('admin.resources@index', 'Back to Resources List', array($group->id), 'arrow-left') 29 | )); 30 | 31 | echo Form::close(); 32 | 33 | ?> 34 | -------------------------------------------------------------------------------- /laravel/vendor/Symfony/Component/HttpFoundation/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "symfony/http-foundation", 3 | "type": "library", 4 | "description": "Symfony HttpFoundation Component", 5 | "keywords": [], 6 | "homepage": "http://symfony.com", 7 | "license": "MIT", 8 | "authors": [ 9 | { 10 | "name": "Fabien Potencier", 11 | "email": "fabien@symfony.com" 12 | }, 13 | { 14 | "name": "Symfony Community", 15 | "homepage": "http://symfony.com/contributors" 16 | } 17 | ], 18 | "require": { 19 | "php": ">=5.3.2" 20 | }, 21 | "autoload": { 22 | "psr-0": { 23 | "Symfony\\Component\\HttpFoundation": "", 24 | "SessionHandlerInterface": "Symfony/Component/HttpFoundation/Resources/stubs" 25 | } 26 | }, 27 | "target-dir": "Symfony/Component/HttpFoundation", 28 | "extra": { 29 | "branch-alias": { 30 | "dev-master": "2.1-dev" 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /laravel/vendor/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeGuesserInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpFoundation\File\MimeType; 13 | 14 | /** 15 | * Guesses the mime type of a file 16 | * 17 | * @author Bernhard Schussek9 | resources as $resource): ?> 10 |
13 |- title; ?>
11 | 12 |18 | */ 19 | interface MimeTypeGuesserInterface 20 | { 21 | /** 22 | * Guesses the mime type of the file with the given path. 23 | * 24 | * @param string $path The path to the file 25 | * 26 | * @return string The mime type or NULL, if none could be guessed 27 | * 28 | * @throws FileNotFoundException If the file does not exist 29 | * @throws AccessDeniedException If the file could not be read 30 | */ 31 | function guess($path); 32 | } 33 | -------------------------------------------------------------------------------- /laravel/tests/cases/event.test.php: -------------------------------------------------------------------------------- 1 | assertEquals(1, $responses[0]); 26 | $this->assertEquals(2, $responses[1]); 27 | } 28 | 29 | /** 30 | * Test parameters can be passed to event listeners. 31 | * 32 | * @group laravel 33 | */ 34 | public function testParametersCanBePassedToEvents() 35 | { 36 | Event::listen('test.event', function($var) { return $var; }); 37 | 38 | $responses = Event::fire('test.event', array('Taylor')); 39 | 40 | $this->assertEquals('Taylor', $responses[0]); 41 | } 42 | 43 | } -------------------------------------------------------------------------------- /bundles/docs/views/template.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Laravel: A Framework For Web Artisans 7 | 8 | 9 | {{ HTML::style(URL::$base.'/laravel/css/style.css') }} 10 | {{ HTML::script(URL::$base.'/laravel/js/modernizr-2.5.3.min.js') }} 11 | 12 | 13 |14 |30 | {{ HTML::script('http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js') }} 31 | {{ HTML::script(URL::$base.'/laravel/js/prettify.js') }} 32 | {{ HTML::script(URL::$base.'/laravel/js/scroll.js') }} 33 | 34 | 35 | -------------------------------------------------------------------------------- /laravel/database/connectors/connector.php: -------------------------------------------------------------------------------- 1 | PDO::CASE_LOWER, 12 | PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, 13 | PDO::ATTR_ORACLE_NULLS => PDO::NULL_NATURAL, 14 | PDO::ATTR_STRINGIFY_FETCHES => false, 15 | PDO::ATTR_EMULATE_PREPARES => false, 16 | ); 17 | 18 | /** 19 | * Establish a PDO database connection. 20 | * 21 | * @param array $config 22 | * @return PDO 23 | */ 24 | abstract public function connect($config); 25 | 26 | /** 27 | * Get the PDO connection options for the configuration. 28 | * 29 | * Developer specified options will override the default connection options. 30 | * 31 | * @param array $config 32 | * @return array 33 | */ 34 | protected function options($config) 35 | { 36 | $options = (isset($config['options'])) ? $config['options'] : array(); 37 | 38 | return $this->options + $options; 39 | } 40 | 41 | } -------------------------------------------------------------------------------- /laravel/vendor/Symfony/Component/HttpFoundation/Session/SessionBagInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpFoundation\Session; 13 | 14 | /** 15 | * Session Bag store. 16 | * 17 | * @author Drak15 | 21 |Laravel
16 |A Framework For Web Artisans
17 | 18 |19 |
20 |22 | 25 |29 |26 | @yield('content') 27 |28 |18 | */ 19 | interface SessionBagInterface 20 | { 21 | /** 22 | * Gets this bag's name 23 | * 24 | * @return string 25 | */ 26 | function getName(); 27 | 28 | /** 29 | * Initializes the Bag 30 | * 31 | * @param array $array 32 | */ 33 | function initialize(array &$array); 34 | 35 | /** 36 | * Gets the storage key for this bag. 37 | * 38 | * @return string 39 | */ 40 | function getStorageKey(); 41 | 42 | /** 43 | * Clears out data from bag. 44 | * 45 | * @return mixed Whatever data was contained. 46 | */ 47 | function clear(); 48 | } 49 | -------------------------------------------------------------------------------- /laravel/vendor/Symfony/Component/Console/Helper/Helper.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Helper; 13 | 14 | /** 15 | * Helper is the base class for all helper classes. 16 | * 17 | * @author Fabien Potencier 18 | */ 19 | abstract class Helper implements HelperInterface 20 | { 21 | protected $helperSet = null; 22 | 23 | /** 24 | * Sets the helper set associated with this helper. 25 | * 26 | * @param HelperSet $helperSet A HelperSet instance 27 | */ 28 | public function setHelperSet(HelperSet $helperSet = null) 29 | { 30 | $this->helperSet = $helperSet; 31 | } 32 | 33 | /** 34 | * Gets the helper set associated with this helper. 35 | * 36 | * @return HelperSet A HelperSet instance 37 | */ 38 | public function getHelperSet() 39 | { 40 | return $this->helperSet; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /laravel/vendor/Symfony/Component/Console/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2004-2012 Fabien Potencier 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /laravel/vendor/Symfony/Component/HttpFoundation/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2004-2012 Fabien Potencier 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /laravel/vendor/Symfony/Component/HttpFoundation/Session/Storage/Proxy/NativeProxy.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpFoundation\Session\Storage\Proxy; 13 | 14 | /** 15 | * NativeProxy. 16 | * 17 | * This proxy is built-in session handlers in PHP 5.3.x 18 | * 19 | * @author Drak 20 | */ 21 | class NativeProxy extends AbstractProxy 22 | { 23 | /** 24 | * Constructor. 25 | */ 26 | public function __construct() 27 | { 28 | // this makes an educated guess as to what the handler is since it should already be set. 29 | $this->saveHandlerName = ini_get('session.save_handler'); 30 | } 31 | 32 | /** 33 | * Returns true if this handler wraps an internal PHP session save handler using \SessionHandler. 34 | * 35 | * @return bool False. 36 | */ 37 | public function isWrapper() 38 | { 39 | return false; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /public/less/code.less: -------------------------------------------------------------------------------- 1 | // Code.less 2 | // Code typography styles for the and15 | * 16 | * @param string $value 17 | * @param int $rounds 18 | * @return string 19 | */ 20 | public static function make($value, $rounds = 8) 21 | { 22 | $work = str_pad($rounds, 2, '0', STR_PAD_LEFT); 23 | 24 | // Bcrypt expects the salt to be 22 base64 encoded characters including 25 | // dots and slashes. We will get rid of the plus signs included in the 26 | // base64 data and replace them with dots. 27 | if (function_exists('openssl_random_pseudo_bytes')) 28 | { 29 | $salt = openssl_random_pseudo_bytes(16); 30 | } 31 | else 32 | { 33 | $salt = Str::random(40); 34 | } 35 | 36 | $salt = substr(strtr(base64_encode($salt), '+', '.'), 0 , 22); 37 | 38 | return crypt($value, '$2a$'.$work.'$'.$salt); 39 | } 40 | 41 | /** 42 | * Determine if an unhashed value matches a Bcrypt hash. 43 | * 44 | * @param string $value 45 | * @param string $hash 46 | * @return bool 47 | */ 48 | public static function check($value, $hash) 49 | { 50 | return crypt($value, $hash) === $hash; 51 | } 52 | 53 | } -------------------------------------------------------------------------------- /laravel/session/drivers/memcached.php: -------------------------------------------------------------------------------- 1 | memcached = $memcached; 21 | } 22 | 23 | /** 24 | * Load a session from storage by a given ID. 25 | * 26 | * If no session is found for the ID, null will be returned. 27 | * 28 | * @param string $id 29 | * @return array 30 | */ 31 | public function load($id) 32 | { 33 | return $this->memcached->get($id); 34 | } 35 | 36 | /** 37 | * Save a given session to storage. 38 | * 39 | * @param array $session 40 | * @param array $config 41 | * @param bool $exists 42 | * @return void 43 | */ 44 | public function save($session, $config, $exists) 45 | { 46 | $this->memcached->put($session['id'], $session, $config['lifetime']); 47 | } 48 | 49 | /** 50 | * Delete a session from storage by a given ID. 51 | * 52 | * @param string $id 53 | * @return void 54 | */ 55 | public function delete($id) 56 | { 57 | $this->memcached->forget($id); 58 | } 59 | 60 | } -------------------------------------------------------------------------------- /laravel/cli/tasks/route.php: -------------------------------------------------------------------------------- 1 | route(); 30 | 31 | echo PHP_EOL; 32 | } 33 | 34 | /** 35 | * Dump the results of the currently established route. 36 | * 37 | * @return void 38 | */ 39 | protected function route() 40 | { 41 | // We'll call the router using the method and URI specified by 42 | // the developer on the CLI. If a route is found, we will not 43 | // run the filters, but simply dump the result. 44 | $route = Router::route(Request::method(), $_SERVER['REQUEST_URI']); 45 | 46 | if ( ! is_null($route)) 47 | { 48 | var_dump($route->response()); 49 | } 50 | else 51 | { 52 | echo '404: Not Found'; 53 | } 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /application/bundles.php: -------------------------------------------------------------------------------- 1 | array( 22 | | 'location' => 'admin', 23 | | 'handles' => 'admin', 24 | | ), 25 | | 26 | | Note that the "location" is relative to the "bundles" directory. 27 | | Now the bundle will be recognized by Laravel and will be able 28 | | to respond to requests beginning with "admin"! 29 | | 30 | | Have a bundle that lives in the root of the bundle directory 31 | | and doesn't respond to any requests? Just add the bundle 32 | | name to the array and we'll take care of the rest. 33 | | 34 | */ 35 | 36 | return array( 37 | 'docs' => array('handles' => 'docs'), 38 | ); 39 | -------------------------------------------------------------------------------- /laravel/database/query/join.php: -------------------------------------------------------------------------------- 1 | type = $type; 36 | $this->table = $table; 37 | } 38 | 39 | /** 40 | * Add an ON clause to the join. 41 | * 42 | * @param string $column1 43 | * @param string $operator 44 | * @param string $column2 45 | * @param string $connector 46 | * @return Join 47 | */ 48 | public function on($column1, $operator, $column2, $connector = 'AND') 49 | { 50 | $this->clauses[] = compact('column1', 'operator', 'column2', 'connector'); 51 | 52 | return $this; 53 | } 54 | 55 | /** 56 | * Add an OR ON clause to the join. 57 | * 58 | * @param string $column1 59 | * @param string $operator 60 | * @param string $column2 61 | * @return Join 62 | */ 63 | public function or_on($column1, $operator, $column2) 64 | { 65 | return $this->on($column1, $operator, $column2, 'OR'); 66 | } 67 | 68 | } -------------------------------------------------------------------------------- /laravel/cli/tasks/bundle/publisher.php: -------------------------------------------------------------------------------- 1 | move($path.'public', path('public').'bundles'.DS.$bundle); 27 | 28 | echo "Assets published for bundle [$bundle].".PHP_EOL; 29 | } 30 | 31 | /** 32 | * Copy the contents of a bundle's assets to the public folder. 33 | * 34 | * @param string $source 35 | * @param string $destination 36 | * @return void 37 | */ 38 | protected function move($source, $destination) 39 | { 40 | File::cpdir($source, $destination); 41 | } 42 | 43 | /** 44 | * Get the "to" location of the bundle's assets. 45 | * 46 | * @param string $bundle 47 | * @return string 48 | */ 49 | protected function to($bundle) 50 | { 51 | return path('public').'bundles'.DS.$bundle.DS; 52 | } 53 | 54 | /** 55 | * Get the "from" location of the bundle's assets. 56 | * 57 | * @param string $bundle 58 | * @return string 59 | */ 60 | protected function from($bundle) 61 | { 62 | return Bundle::path($bundle).'public'; 63 | } 64 | 65 | } -------------------------------------------------------------------------------- /laravel/tests/application/bundles.php: -------------------------------------------------------------------------------- 1 | array( 22 | | 'location' => 'admin', 23 | | 'handles' => 'admin', 24 | | ), 25 | | 26 | | Note that the "location" is relative to the "bundles" directory. 27 | | Now the bundle will be recognized by Laravel and will be able 28 | | to respond to requests beginning with "admin"! 29 | | 30 | | Have a bundle that lives in the root of the bundle directory 31 | | and doesn't respond to any requests? Just add the bundle 32 | | name to the array and we'll take care of the rest. 33 | | 34 | */ 35 | 36 | return array('dashboard' => array('handles' => 'dashboard'), 'dummy'); -------------------------------------------------------------------------------- /laravel/vendor/Symfony/Component/HttpFoundation/JsonResponse.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpFoundation; 13 | 14 | /** 15 | * Response represents an HTTP response in JSON format. 16 | * 17 | * @author Igor Wiedlerelements 3 | // -------------------------------------------------------- 4 | 5 | // Inline and block code styles 6 | code, 7 | pre { 8 | padding: 0 3px 2px; 9 | #font > #family > .monospace; 10 | font-size: @baseFontSize - 1; 11 | color: @grayDark; 12 | .border-radius(3px); 13 | } 14 | code { 15 | padding: 3px 4px; 16 | color: #d14; 17 | background-color: #f7f7f9; 18 | border: 1px solid #e1e1e8; 19 | } 20 | pre { 21 | display: block; 22 | padding: (@baseLineHeight - 1) / 2; 23 | margin: 0 0 @baseLineHeight / 2; 24 | font-size: 12px; 25 | line-height: @baseLineHeight; 26 | background-color: #f5f5f5; 27 | border: 1px solid #ccc; // fallback for IE7-8 28 | border: 1px solid rgba(0,0,0,.15); 29 | .border-radius(4px); 30 | white-space: pre; 31 | white-space: pre-wrap; 32 | word-break: break-all; 33 | 34 | // Make prettyprint styles more spaced out for readability 35 | &.prettyprint { 36 | margin-bottom: @baseLineHeight; 37 | } 38 | 39 | // Account for some code outputs that place code tags in pre tags 40 | code { 41 | padding: 0; 42 | background-color: transparent; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /public/less/tablesorter.less: -------------------------------------------------------------------------------- 1 | 2 | // TABLES 3 | // -------------------------------------------------- 4 | 5 | @tableSortableHeader: @grayLighter; 6 | @tableSortableActiveColumn: darken(@tableSortableHeader, 15%); 7 | @tableSortableHoverRow: @infoBackground; 8 | 9 | 10 | 11 | table.sortable { 12 | 13 | thead { 14 | th { 15 | background-color: @tableSortableHeader; 16 | padding-right: 20px; 17 | margin-right: -20px; 18 | } 19 | .header { 20 | background-image: url(/img/sortable.png); 21 | background-repeat: no-repeat; 22 | background-position: 100% 6px; 23 | cursor: pointer; 24 | &:hover { 25 | text-decoration: underline; 26 | } 27 | } 28 | 29 | .headerSortUp { 30 | background-image: url(/img/sorted-asc.png); 31 | background-color: @tableSortableActiveColumn; 32 | } 33 | .headerSortDown { 34 | background-image: url(/img/sorted-desc.png); 35 | background-color: @tableSortableActiveColumn; 36 | } 37 | 38 | } 39 | 40 | tbody { 41 | td { 42 | position: relative; 43 | overflow: hidden; 44 | } 45 | tr:hover td { 46 | background-color: @tableSortableHoverRow; 47 | } 48 | } 49 | 50 | tbody.nosort { 51 | color: @grayLight; 52 | } 53 | 54 | } -------------------------------------------------------------------------------- /application/views/admin/news/index.php: -------------------------------------------------------------------------------- 1 |2 | 'btn btn-primary pull-right')); ?> 3 |5 | 6 |News
4 |7 | 8 |
30 | 31 | 'btn btn-primary')); ?> 32 | -------------------------------------------------------------------------------- /laravel/vendor/Symfony/Component/HttpFoundation/LaravelRequest.php: -------------------------------------------------------------------------------- 1 | server->get('CONTENT_TYPE'), 'application/x-www-form-urlencoded') 17 | && in_array(strtoupper($request->server->get('REQUEST_METHOD', 'GET')), array('PUT', 'DELETE', 'PATCH')) 18 | ) { 19 | parse_str($request->getContent(), $data); 20 | if (magic_quotes()) $data = array_strip_slashes($data); 21 | $request->request = new ParameterBag($data); 22 | } 23 | 24 | return $request; 25 | } 26 | 27 | /** 28 | * Get the root URL of the application. 29 | * 30 | * @return string 31 | */ 32 | public function getRootUrl() 33 | { 34 | return $this->getScheme().'://'.$this->getHttpHost().$this->getBasePath(); 35 | } 36 | 37 | } -------------------------------------------------------------------------------- /laravel/vendor/Symfony/Component/Console/Helper/HelperInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Helper; 13 | 14 | /** 15 | * HelperInterface is the interface all helpers must implement. 16 | * 17 | * @author Fabien Potencier9 | 13 | 14 | 15 | 16 |Date 10 |Title 11 |Actions 12 |active ?: 'class="inactive"'; ?>> 17 | 27 | 28 | 29 |date); ?> 18 |19 | title; ?> 20 | fb_album ? '' : ''; ?> 21 | 22 |26 | 23 |
- id), 'small|pencil' ); ?>
24 |- id), 'small|remove' ); ?>
25 |18 | * 19 | * @api 20 | */ 21 | interface HelperInterface 22 | { 23 | /** 24 | * Sets the helper set associated with this helper. 25 | * 26 | * @param HelperSet $helperSet A HelperSet instance 27 | * 28 | * @api 29 | */ 30 | function setHelperSet(HelperSet $helperSet = null); 31 | 32 | /** 33 | * Gets the helper set associated with this helper. 34 | * 35 | * @return HelperSet A HelperSet instance 36 | * 37 | * @api 38 | */ 39 | function getHelperSet(); 40 | 41 | /** 42 | * Returns the canonical name of this helper. 43 | * 44 | * @return string The canonical name 45 | * 46 | * @api 47 | */ 48 | function getName(); 49 | } 50 | -------------------------------------------------------------------------------- /application/routes/ajax.php: -------------------------------------------------------------------------------- 1 | 'ajax_players', 'before' => 'ajax', function() 4 | { 5 | 6 | $players = Player::all(); 7 | $data = array(); 8 | 9 | foreach($players as $player) { 10 | $data[ $player->id ] = $player->fullname; 11 | } 12 | 13 | header('application/json'); 14 | return json_encode($data); 15 | 16 | })); 17 | 18 | Route::get('ajax/games/(:num)/vs/(:num?)', array( 'as'=>'ajax_one_on_one', 'before' => 'ajax', function($player_id,$opponent_id=null) 19 | { 20 | 21 | // the second arg isn't really optional, but if it isn't specified this way, 22 | // then you can't use URL::to_route() without giving both args ... and 23 | // we use jQuery to generate that second arg. 24 | 25 | usleep(500000); 26 | 27 | $games = Game::where('player_id','=',$player_id) 28 | ->where('opponent_id','=',$opponent_id) 29 | ->order_by('date','desc') 30 | ->get(); 31 | 32 | if (count($games)) { 33 | 34 | echo View::make('partials.game_listing') 35 | ->with('games', $games) 36 | ->with('id', 'ooo_games') 37 | ->with('mark_winners', true) 38 | ->with('small_head', true) 39 | ->render(); 40 | 41 | } else { 42 | 43 | echo ' No matching games.
'; 44 | 45 | } 46 | 47 | })); 48 | -------------------------------------------------------------------------------- /public/less/pagination.less: -------------------------------------------------------------------------------- 1 | // PAGINATION 2 | // ---------- 3 | 4 | .pagination { 5 | height: @baseLineHeight * 2; 6 | margin: @baseLineHeight 0; 7 | } 8 | .pagination ul { 9 | display: inline-block; 10 | .ie7-inline-block(); 11 | margin-left: 0; 12 | margin-bottom: 0; 13 | .border-radius(3px); 14 | .box-shadow(0 1px 2px rgba(0,0,0,.05)); 15 | } 16 | .pagination li { 17 | display: inline; 18 | } 19 | .pagination a { 20 | float: left; 21 | padding: 0 14px; 22 | line-height: (@baseLineHeight * 2) - 2; 23 | text-decoration: none; 24 | border: 1px solid #ddd; 25 | border-left-width: 0; 26 | } 27 | .pagination a:hover, 28 | .pagination .active a { 29 | background-color: #f5f5f5; 30 | } 31 | .pagination .active a { 32 | color: @grayLight; 33 | cursor: default; 34 | } 35 | .pagination .disabled a, 36 | .pagination .disabled a:hover { 37 | color: @grayLight; 38 | background-color: transparent; 39 | cursor: default; 40 | } 41 | .pagination li:first-child a { 42 | border-left-width: 1px; 43 | .border-radius(3px 0 0 3px); 44 | } 45 | .pagination li:last-child a { 46 | .border-radius(0 3px 3px 0); 47 | } 48 | 49 | // Centered 50 | .pagination-centered { 51 | text-align: center; 52 | } 53 | .pagination-right { 54 | text-align: right; 55 | } 56 | -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | 8 | * @link http://laravel.com 9 | */ 10 | 11 | // -------------------------------------------------------------- 12 | // Tick... Tock... Tick... Tock... 13 | // -------------------------------------------------------------- 14 | define('LARAVEL_START', microtime(true)); 15 | 16 | // -------------------------------------------------------------- 17 | // Indicate that the request is from the web. 18 | // -------------------------------------------------------------- 19 | $web = true; 20 | 21 | // -------------------------------------------------------------- 22 | // Set the core Laravel path constants. 23 | // -------------------------------------------------------------- 24 | require '../paths.php'; 25 | 26 | // -------------------------------------------------------------- 27 | // Unset the temporary web variable. 28 | // -------------------------------------------------------------- 29 | unset($web); 30 | 31 | // -------------------------------------------------------------- 32 | // Launch Laravel. 33 | // -------------------------------------------------------------- 34 | require path('sys').'laravel.php'; -------------------------------------------------------------------------------- /laravel/vendor/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; 13 | 14 | /** 15 | * NativeFileSessionHandler. 16 | * 17 | * Native session handler using PHP's built in file storage. 18 | * 19 | * @author Drak20 | */ 21 | class NativeFileSessionHandler extends NativeSessionHandler 22 | { 23 | /** 24 | * Constructor. 25 | * 26 | * @param string $savePath Path of directory to save session files. Default null will leave setting as defined by PHP. 27 | */ 28 | public function __construct($savePath = null) 29 | { 30 | if (null === $savePath) { 31 | $savePath = ini_get('session.save_path'); 32 | } 33 | 34 | if ($savePath && !is_dir($savePath)) { 35 | mkdir($savePath, 0777, true); 36 | } 37 | 38 | ini_set('session.save_handler', 'files'); 39 | ini_set('session.save_path', $savePath); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /application/models/bingo.php: -------------------------------------------------------------------------------- 1 | 'exists:players,id', 23 | 'date' => 'required|date', 24 | 'word' => 'required|alpha|min:7|max:15', 25 | 'score' => 'integer|min:55', 26 | ); 27 | 28 | public function player() 29 | { 30 | return $this->belongs_to('Player'); 31 | } 32 | 33 | public function save() { 34 | $this->word = strtolower($this->word); 35 | $this->valid = ValidWord::where('word','=',$this->word)->count(); 36 | return parent::save(); 37 | } 38 | 39 | public function get_word() 40 | { 41 | return strtoupper($this->attributes['word']); 42 | } 43 | 44 | public function word_and_score() { 45 | $r = $this->word; 46 | if ($this->score) { 47 | $r .= ' (' . $this->score . ')'; 48 | } 49 | return $r; 50 | } 51 | 52 | } -------------------------------------------------------------------------------- /laravel/tests/phpunit.php: -------------------------------------------------------------------------------- 1 | relationships[$relationship] = null; 27 | } 28 | } 29 | 30 | /** 31 | * Match eagerly loaded child models to their parent models. 32 | * 33 | * @param array $parents 34 | * @param array $children 35 | * @return void 36 | */ 37 | public function match($relationship, &$parents, $children) 38 | { 39 | $foreign = $this->foreign_key(); 40 | 41 | foreach ($parents as &$parent) 42 | { 43 | $matching = array_first($children, function($k, $v) use (&$parent, $foreign) 44 | { 45 | return $v->$foreign == $parent->get_key(); 46 | }); 47 | 48 | $parent->relationships[$relationship] = $matching; 49 | } 50 | } 51 | 52 | } -------------------------------------------------------------------------------- /public/js/application.js: -------------------------------------------------------------------------------- 1 | 2 | // array.has() prototype 3 | 4 | Array.prototype.has=function(v) { 5 | for (i=0;i 'Taylor', 'age' => 25); 15 | 16 | $fluent = new Fluent($array); 17 | 18 | $this->assertEquals($array, $fluent->attributes); 19 | } 20 | 21 | /** 22 | * Test the Fluent::get method. 23 | * 24 | * @group laravel 25 | */ 26 | public function testGetMethodReturnsAttribute() 27 | { 28 | $fluent = new Fluent(array('name' => 'Taylor')); 29 | 30 | $this->assertEquals('Taylor', $fluent->get('name')); 31 | $this->assertEquals('Default', $fluent->get('foo', 'Default')); 32 | $this->assertEquals('Taylor', $fluent->name); 33 | $this->assertNull($fluent->foo); 34 | } 35 | 36 | public function testMagicMethodsCanBeUsedToSetAttributes() 37 | { 38 | $fluent = new Fluent; 39 | 40 | $fluent->name = 'Taylor'; 41 | $fluent->developer(); 42 | $fluent->age(25); 43 | 44 | $this->assertEquals('Taylor', $fluent->name); 45 | $this->assertTrue($fluent->developer); 46 | $this->assertEquals(25, $fluent->age); 47 | $this->assertInstanceOf('Laravel\\Fluent', $fluent->programmer()); 48 | } 49 | 50 | } -------------------------------------------------------------------------------- /public/less/popovers.less: -------------------------------------------------------------------------------- 1 | // POPOVERS 2 | // -------- 3 | 4 | .popover { 5 | position: absolute; 6 | top: 0; 7 | left: 0; 8 | z-index: @zindexPopover; 9 | display: none; 10 | padding: 5px; 11 | &.top { margin-top: -5px; } 12 | &.right { margin-left: 5px; } 13 | &.bottom { margin-top: 5px; } 14 | &.left { margin-left: -5px; } 15 | &.top .arrow { #popoverArrow > .top(); } 16 | &.right .arrow { #popoverArrow > .right(); } 17 | &.bottom .arrow { #popoverArrow > .bottom(); } 18 | &.left .arrow { #popoverArrow > .left(); } 19 | .arrow { 20 | position: absolute; 21 | width: 0; 22 | height: 0; 23 | } 24 | } 25 | .popover-inner { 26 | padding: 3px; 27 | width: 280px; 28 | overflow: hidden; 29 | background: @black; // has to be full background declaration for IE fallback 30 | background: rgba(0,0,0,.8); 31 | .border-radius(6px); 32 | .box-shadow(0 3px 7px rgba(0,0,0,0.3)); 33 | } 34 | .popover-title { 35 | padding: 9px 15px; 36 | line-height: 1; 37 | background-color: #f5f5f5; 38 | border-bottom:1px solid #eee; 39 | .border-radius(3px 3px 0 0); 40 | } 41 | .popover-content { 42 | padding: 14px; 43 | background-color: @white; 44 | .border-radius(0 0 3px 3px); 45 | .background-clip(padding-box); 46 | p, ul, ol { 47 | margin-bottom: 0; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /laravel/session/drivers/apc.php: -------------------------------------------------------------------------------- 1 | apc = $apc; 21 | } 22 | 23 | /** 24 | * Load a session from storage by a given ID. 25 | * 26 | * If no session is found for the ID, null will be returned. 27 | * 28 | * @param string $id 29 | * @return array 30 | */ 31 | public function load($id) 32 | { 33 | return $this->apc->get($id); 34 | } 35 | 36 | /** 37 | * Save a given session to storage. 38 | * 39 | * @param array $session 40 | * @param array $config 41 | * @param bool $exists 42 | * @return void 43 | */ 44 | public function save($session, $config, $exists) 45 | { 46 | $this->apc->put($session['id'], $session, $config['lifetime']); 47 | } 48 | 49 | /** 50 | * Delete a session from storage by a given ID. 51 | * 52 | * @param string $id 53 | * @return void 54 | */ 55 | public function delete($id) 56 | { 57 | $this->apc->forget($id); 58 | } 59 | 60 | } -------------------------------------------------------------------------------- /laravel/session/drivers/cookie.php: -------------------------------------------------------------------------------- 1 | PDO::CASE_LOWER, 12 | PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, 13 | PDO::ATTR_ORACLE_NULLS => PDO::NULL_NATURAL, 14 | PDO::ATTR_STRINGIFY_FETCHES => false, 15 | ); 16 | 17 | /** 18 | * Establish a PDO database connection. 19 | * 20 | * @param array $config 21 | * @return PDO 22 | */ 23 | public function connect($config) 24 | { 25 | extract($config); 26 | 27 | // Format the SQL Server connection string. This connection string format can 28 | // also be used to connect to Azure SQL Server databases. The port is defined 29 | // directly after the server name, so we'll create that first. 30 | $port = (isset($port)) ? ','.$port : ''; 31 | 32 | //check for dblib for mac users connecting to mssql (utilizes freetds) 33 | if (!empty($dsn_type) and $dsn_type == 'dblib') 34 | { 35 | $dsn = "dblib:host={$host}{$port};dbname={$database}"; 36 | } 37 | else 38 | { 39 | $dsn = "sqlsrv:Server={$host}{$port};Database={$database}"; 40 | } 41 | 42 | return new PDO($dsn, $username, $password, $this->options($config)); 43 | } 44 | 45 | } -------------------------------------------------------------------------------- /laravel/session/drivers/redis.php: -------------------------------------------------------------------------------- 1 | redis = $redis; 21 | } 22 | 23 | /** 24 | * Load a session from storage by a given ID. 25 | * 26 | * If no session is found for the ID, null will be returned. 27 | * 28 | * @param string $id 29 | * @return array 30 | */ 31 | public function load($id) 32 | { 33 | return $this->redis->get($id); 34 | } 35 | 36 | /** 37 | * Save a given session to storage. 38 | * 39 | * @param array $session 40 | * @param array $config 41 | * @param bool $exists 42 | * @return void 43 | */ 44 | public function save($session, $config, $exists) 45 | { 46 | $this->redis->put($session['id'], $session, $config['lifetime']); 47 | } 48 | 49 | /** 50 | * Delete a session from storage by a given ID. 51 | * 52 | * @param string $id 53 | * @return void 54 | */ 55 | public function delete($id) 56 | { 57 | $this->redis->forget($id); 58 | } 59 | 60 | } -------------------------------------------------------------------------------- /laravel/cli/tasks/key.php: -------------------------------------------------------------------------------- 1 | path = path('app').'config/application'.EXT; 23 | } 24 | 25 | /** 26 | * Generate a random key for the application. 27 | * 28 | * @param array $arguments 29 | * @return void 30 | */ 31 | public function generate($arguments = array()) 32 | { 33 | // By default the Crypter class uses AES-256 encryption which uses 34 | // a 32 byte input vector, so that is the length of string we will 35 | // generate for the application token unless another length is 36 | // specified through the CLI. 37 | $key = Str::random(array_get($arguments, 0, 32)); 38 | 39 | $config = File::get($this->path); 40 | 41 | $config = str_replace("'key' => '',", "'key' => '{$key}',", $config, $count); 42 | 43 | File::put($this->path, $config); 44 | 45 | if ($count > 0) 46 | { 47 | echo "Configuration updated with secure key!"; 48 | } 49 | else 50 | { 51 | echo "An application key already exists!"; 52 | } 53 | 54 | echo PHP_EOL; 55 | } 56 | 57 | } -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Pull request guidelines 2 | 3 | [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. 4 | 5 | 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: 6 | 7 | - **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.) 8 | - **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. 9 | - **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. -------------------------------------------------------------------------------- /laravel/tests/application/controllers/home.php: -------------------------------------------------------------------------------- 1 | 2 | Delete Game
3 | 4 | 5 | 6 |7 | 8 |
30 | 31 | Form::TYPE_HORIZONTAL)); 34 | echo Form::token(); 35 | 36 | echo Form::field('labelled_checkbox', 'confirm', 'Are you sure?', 37 | array('Yes, delete this game', 1, false) 38 | ); 39 | 40 | echo Form::actions(array( 41 | Form::submit('Delete Game', array('class' => 'btn-primary btn-warning')), 42 | action_link_to_route('admin.games@index', 'Back to Games List', array(), 'arrow-left') 43 | )); 44 | 45 | 46 | echo Form::close(); 47 | 48 | ?> -------------------------------------------------------------------------------- /laravel/vendor/Symfony/Component/HttpFoundation/ApacheRequest.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpFoundation; 13 | 14 | /** 15 | * Request represents an HTTP request from an Apache server. 16 | * 17 | * @author Fabien Potencier9 | 16 | 17 | 18 | '; 20 | echo 'Date 10 |Player 11 |Player Score 12 |Opponent 13 |Opp. Score 14 |Spread 15 |' . format_date($game->date) . ' '; 21 | echo '' . $game->player->fullname . ' '; 22 | echo '' . $game->player_score . ' '; 23 | echo '' . $game->opponent->fullname . ' '; 24 | echo '' . $game->opponent_score . ' '; 25 | echo '' . $game->spread . ' '; 26 | echo "\n"; 27 | ?> 28 | 29 |18 | */ 19 | class ApacheRequest extends Request 20 | { 21 | /** 22 | * {@inheritdoc} 23 | */ 24 | protected function prepareRequestUri() 25 | { 26 | return $this->server->get('REQUEST_URI'); 27 | } 28 | 29 | /** 30 | * {@inheritdoc} 31 | */ 32 | protected function prepareBaseUrl() 33 | { 34 | $baseUrl = $this->server->get('SCRIPT_NAME'); 35 | 36 | if (false === strpos($this->server->get('REQUEST_URI'), $baseUrl)) { 37 | // assume mod_rewrite 38 | return rtrim(dirname($baseUrl), '/\\'); 39 | } 40 | 41 | return $baseUrl; 42 | } 43 | 44 | /** 45 | * {@inheritdoc} 46 | */ 47 | protected function preparePathInfo() 48 | { 49 | return $this->server->get('PATH_INFO') ?: substr($this->prepareRequestUri(), strlen($this->prepareBaseUrl())) ?: '/'; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /laravel/hash.php: -------------------------------------------------------------------------------- 1 | 9 | * // Create a Bcrypt hash of a value 10 | * $hash = Hash::make('secret'); 11 | * 12 | * // Use a specified number of iterations when creating the hash 13 | * $hash = Hash::make('secret', 12); 14 | * 18 | */ 19 | class JsonResponse extends Response 20 | { 21 | /** 22 | * Constructor. 23 | * 24 | * @param mixed $data The response data 25 | * @param integer $status The response status code 26 | * @param array $headers An array of response headers 27 | */ 28 | public function __construct($data = array(), $status = 200, $headers = array()) 29 | { 30 | // root should be JSON object, not array 31 | if (is_array($data) && 0 === count($data)) { 32 | $data = new \ArrayObject(); 33 | } 34 | 35 | parent::__construct( 36 | json_encode($data), 37 | $status, 38 | array_merge(array('Content-Type' => 'application/json'), $headers) 39 | ); 40 | } 41 | 42 | /** 43 | * {@inheritDoc} 44 | */ 45 | static public function create($data = array(), $status = 200, $headers = array()) 46 | { 47 | return new static($data, $status, $headers); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /laravel/database/connectors/mysql.php: -------------------------------------------------------------------------------- 1 | options($config)); 34 | 35 | // If a character set has been specified, we'll execute a query against 36 | // the database to set the correct character set. By default, this is 37 | // set to UTF-8 which should be fine for most scenarios. 38 | if (isset($config['charset'])) 39 | { 40 | $connection->prepare("SET NAMES '{$config['charset']}'")->execute(); 41 | } 42 | 43 | return $connection; 44 | } 45 | 46 | } -------------------------------------------------------------------------------- /application/models/basemodel.php: -------------------------------------------------------------------------------- 1 | errors)) { 16 | $e = current($this->errors[$field]); 17 | if ($wrap) { 18 | return "<$wrap>" . $e . "$wrap>"; 19 | } 20 | return $e; 21 | } 22 | return ''; 23 | } 24 | 25 | public function has_errors() 26 | { 27 | foreach($this->errors as $error) { 28 | if (is_array($error)) { 29 | return true; 30 | } 31 | } 32 | return false; 33 | } 34 | 35 | 36 | public function is_valid() 37 | { 38 | 39 | $rules = $this->rules; 40 | 41 | 42 | /* fix this to handle rules as array instead of just pipe-delimeted strings */ 43 | 44 | if ($this->id) { 45 | foreach($rules as $k=>$v) { 46 | if (preg_match('/unique:([^\|]+)/', $v, $m)) { 47 | $parts = explode(',',$m[1]); 48 | if (count($parts)==1) { 49 | $parts[] = $k; 50 | } 51 | $parts[] = $this->id; 52 | $rules[$k] = str_replace($m[0], 'unique:'.implode(',',$parts), $v); 53 | } 54 | } 55 | } 56 | 57 | $validator = Validator::make($this->attributes, $rules, $this->messages); 58 | 59 | if ($validator->valid()) { 60 | $this->errors = array(); 61 | return true; 62 | } else { 63 | $this->errors = $validator->errors->messages; 64 | return false; 65 | } 66 | 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /public/less/alerts.less: -------------------------------------------------------------------------------- 1 | // ALERT STYLES 2 | // ------------ 3 | 4 | // Base alert styles 5 | .alert { 6 | padding: 8px 35px 8px 14px; 7 | margin-bottom: @baseLineHeight; 8 | text-shadow: 0 1px 0 rgba(255,255,255,.5); 9 | background-color: @warningBackground; 10 | border: 1px solid @warningBorder; 11 | .border-radius(4px); 12 | } 13 | .alert, 14 | .alert-heading { 15 | color: @warningText; 16 | } 17 | 18 | // Adjust close link position 19 | .alert .close { 20 | position: relative; 21 | top: -2px; 22 | right: -21px; 23 | line-height: 18px; 24 | } 25 | 26 | // Alternate styles 27 | // ---------------- 28 | 29 | .alert-success { 30 | background-color: @successBackground; 31 | border-color: @successBorder; 32 | } 33 | .alert-success, 34 | .alert-success .alert-heading { 35 | color: @successText; 36 | } 37 | .alert-danger, 38 | .alert-error { 39 | background-color: @errorBackground; 40 | border-color: @errorBorder; 41 | } 42 | .alert-danger, 43 | .alert-error, 44 | .alert-danger .alert-heading, 45 | .alert-error .alert-heading { 46 | color: @errorText; 47 | } 48 | .alert-info { 49 | background-color: @infoBackground; 50 | border-color: @infoBorder; 51 | } 52 | .alert-info, 53 | .alert-info .alert-heading { 54 | color: @infoText; 55 | } 56 | 57 | 58 | // Block alerts 59 | // ------------------------ 60 | .alert-block { 61 | padding-top: 14px; 62 | padding-bottom: 14px; 63 | } 64 | .alert-block > p, 65 | .alert-block > ul { 66 | margin-bottom: 0; 67 | } 68 | .alert-block p + p { 69 | margin-top: 5px; 70 | } 71 | -------------------------------------------------------------------------------- /laravel/vendor/Symfony/Component/HttpFoundation/README.md: -------------------------------------------------------------------------------- 1 | HttpFoundation Component 2 | ======================== 3 | 4 | HttpFoundation defines an object-oriented layer for the HTTP specification. 5 | 6 | It provides an abstraction for requests, responses, uploaded files, cookies, 7 | sessions, ... 8 | 9 | In this example, we get a Request object from the current PHP global 10 | variables: 11 | 12 | use Symfony\Component\HttpFoundation\Request; 13 | use Symfony\Component\HttpFoundation\Response; 14 | 15 | $request = Request::createFromGlobals(); 16 | echo $request->getPathInfo(); 17 | 18 | You can also create a Request directly -- that's interesting for unit testing: 19 | 20 | $request = Request::create('/?foo=bar', 'GET'); 21 | echo $request->getPathInfo(); 22 | 23 | And here is how to create and send a Response: 24 | 25 | $response = new Response('Not Found', 404, array('Content-Type' => 'text/plain')); 26 | $response->send(); 27 | 28 | The Request and the Response classes have many other methods that implement 29 | the HTTP specification. 30 | 31 | Loading 32 | ------- 33 | 34 | If you are using PHP 5.3.x you must add the following to your autoloader: 35 | 36 | // SessionHandlerInterface 37 | if (!interface_exists('SessionHandlerInterface')) { 38 | $loader->registerPrefixFallback(__DIR__.'/../vendor/symfony/src/Symfony/Component/HttpFoundation/Resources/stubs'); 39 | } 40 | 41 | 42 | Resources 43 | --------- 44 | 45 | Unit tests: 46 | 47 | https://github.com/symfony/symfony/tree/master/tests/Symfony/Tests/Component/HttpFoundation 48 | -------------------------------------------------------------------------------- /laravel/cli/artisan.php: -------------------------------------------------------------------------------- 1 | getMessage(); 47 | } 48 | 49 | echo PHP_EOL; -------------------------------------------------------------------------------- /application/views/admin/players/index.php: -------------------------------------------------------------------------------- 1 | 2 | 'btn btn-primary pull-right')); ?> 3 |5 | 6 | 7 |Players
4 |8 | 9 |
34 | 35 | 'btn btn-primary')); ?> 36 | 37 | 45 | -------------------------------------------------------------------------------- /laravel/vendor/Symfony/Component/HttpFoundation/Session/Storage/Handler/NullSessionHandler.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; 13 | 14 | /** 15 | * NullSessionHandler. 16 | * 17 | * Can be used in unit testing or in a sitation where persisted sessions are not desired. 18 | * 19 | * @author Drak10 | 16 | 17 | 18 | '; 21 | echo 'First Name 11 |Last Name 12 |NASPA # 13 |NASPA Rating 14 |Actions 15 |' . $player->firstname . ' '; 22 | echo '' . $player->lastname . ' '; 23 | echo '' . ($player->naspa_id ? $player->naspa_id : '—') . ' '; 24 | echo '' . ($player->naspa_rating ? $player->naspa_rating : '—') . ' '; 25 | echo ''; 29 | echo " ' . 26 | '
- ' . action_link_to_route('admin.players@edit', 'Edit', array($player->id), 'small|pencil' ) . '
' . 27 | '- ' . action_link_to_route('admin.players@delete', 'Delete', array($player->id), 'small|remove' ) . '
' . 28 | '\n"; 30 | } 31 | ?> 32 | 33 |20 | * 21 | * @api 22 | */ 23 | class NullSessionHandler implements \SessionHandlerInterface 24 | { 25 | /** 26 | * {@inheritdoc} 27 | */ 28 | public function open($savePath, $sessionName) 29 | { 30 | return true; 31 | } 32 | 33 | /** 34 | * {@inheritdoc} 35 | */ 36 | public function close() 37 | { 38 | return true; 39 | } 40 | 41 | /** 42 | * {@inheritdoc} 43 | */ 44 | public function read($sessionId) 45 | { 46 | return ''; 47 | } 48 | 49 | /** 50 | * {@inheritdoc} 51 | */ 52 | public function write($sessionId, $data) 53 | { 54 | return true; 55 | } 56 | 57 | /** 58 | * {@inheritdoc} 59 | */ 60 | public function destroy($sessionId) 61 | { 62 | return true; 63 | } 64 | 65 | /** 66 | * {@inheritdoc} 67 | */ 68 | public function gc($lifetime) 69 | { 70 | return true; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /application/views/partials/bingo_listing.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
42 | -------------------------------------------------------------------------------- /laravel/vendor/Symfony/Component/HttpFoundation/ServerBag.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpFoundation; 13 | 14 | /** 15 | * ServerBag is a container for HTTP headers from the $_SERVER variable. 16 | * 17 | * @author Fabien Potencier5 | 15 | 16 | 17 | 18 | 19 |Date 6 |Player 7 |Bingo 8 |Score 9 | 10 |Actions 11 | 12 |Playability 13 | 14 |valid ? '' : ' class="phoney"'); ?>> 20 | 36 | 37 | 38 |date); ?> 21 |player->fullname; ?> 22 |23 | 24 | word; ?> 25 | 26 |score ? $bingo->score : '—'); ?> 27 | 28 |32 | 33 | 29 |
- id), 'small|pencil' ); ?>
30 |- id), 'small|remove' ); ?>
31 |playability ? $bingo->playability : '—'); ?> 34 | 35 |39 | 40 | 41 | No bingos 18 | * @author Bulat Shakirzyanov 19 | */ 20 | class ServerBag extends ParameterBag 21 | { 22 | /** 23 | * Gets the HTTP headers. 24 | * 25 | * @return string 26 | */ 27 | public function getHeaders() 28 | { 29 | $headers = array(); 30 | foreach ($this->parameters as $key => $value) { 31 | if (0 === strpos($key, 'HTTP_')) { 32 | $headers[substr($key, 5)] = $value; 33 | } 34 | // CONTENT_* are not prefixed with HTTP_ 35 | elseif (in_array($key, array('CONTENT_LENGTH', 'CONTENT_MD5', 'CONTENT_TYPE'))) { 36 | $headers[$key] = $this->parameters[$key]; 37 | } 38 | } 39 | 40 | // PHP_AUTH_USER/PHP_AUTH_PW 41 | if (isset($this->parameters['PHP_AUTH_USER'])) { 42 | $pass = isset($this->parameters['PHP_AUTH_PW']) ? $this->parameters['PHP_AUTH_PW'] : ''; 43 | $headers['AUTHORIZATION'] = 'Basic '.base64_encode($this->parameters['PHP_AUTH_USER'].':'.$pass); 44 | } 45 | 46 | return $headers; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /application/views/players/bingos.php: -------------------------------------------------------------------------------- 1 | with('year', $year)->render(); ?> 2 | 3 | 4 |9 | 10 |5 | Bingos for fullname; ?> 6 | 7 |
8 |11 | 12 |
32 | 33 | id), 'arrow-left', array('class'=>'btn')); ?> 34 | 35 | 36 | 49 | -------------------------------------------------------------------------------- /application/views/admin/bingos/form.php: -------------------------------------------------------------------------------- 1 |13 | 19 | 20 | 21 | 22 |Date 14 |Bingo 15 |Score 16 |Playability 17 |Valid 18 |valid ? '' : ' class="phoney"'); ?>> 23 | 29 | 30 | 31 |date); ?> 24 |word; ?> 25 |score ? $bingo->score : '—'); ?> 26 |playability ? $bingo->playability : '—'); ?> 27 |valid ? '1' : '0'); ?> 28 |2 | 3 |4 | 5 | has_errors()): ?> 6 |7 | Oops! Please correct the errors below. 8 |9 | 10 | 11 | Form::TYPE_HORIZONTAL)); 14 | echo Form::token(); 15 | 16 | echo Form::field('date', 'date', 'Date', 17 | array($bingo->date, array('class'=>'span2 required')), 18 | array('error' => $bingo->error('date')) 19 | ); 20 | 21 | echo Form::field('select', 'player_id', 'Player', 22 | array($all_players, $bingo->player_id, array('class'=>'span4 required qselect')), 23 | array('error' => $bingo->error('player_id')) 24 | ); 25 | 26 | echo Form::field('text', 'word', 'Word', 27 | array($bingo->word, array('class'=>'span3 required')), 28 | array('error' => $bingo->error('word')) 29 | ); 30 | 31 | echo Form::field('number', 'score', 'Score', 32 | array($bingo->score, array('class'=>'span1')), 33 | array('error' => $bingo->error('score')) 34 | ); 35 | 36 | 37 | echo Form::actions(array( 38 | Form::submit($submit_text, array('class' => 'btn-primary')), 39 | action_link_to_route('admin.bingos', 'Back to Bingos List', array(), 'arrow-left') 40 | )); 41 | 42 | echo Form::close(); 43 | 44 | 45 | ?> 46 | 47 | 48 | 66 | -------------------------------------------------------------------------------- /laravel/tests/cases/ioc.test.php: -------------------------------------------------------------------------------- 1 | assertEquals('Taylor', IoC::resolve('foo')); 18 | } 19 | 20 | /** 21 | * Test that singletons are created once. 22 | * 23 | * @group laravel 24 | */ 25 | public function testSingletonsAreCreatedOnce() 26 | { 27 | IoC::singleton('foo', function() 28 | { 29 | return new StdClass; 30 | }); 31 | 32 | $object = IoC::resolve('foo'); 33 | 34 | $this->assertTrue($object === IoC::resolve('foo')); 35 | } 36 | 37 | /** 38 | * Test the IoC::instance method. 39 | * 40 | * @group laravel 41 | */ 42 | public function testInstancesAreReturnedBySingleton() 43 | { 44 | $object = new StdClass; 45 | 46 | IoC::instance('bar', $object); 47 | 48 | $this->assertTrue($object === IoC::resolve('bar')); 49 | } 50 | 51 | /** 52 | * Test the IoC::registered method. 53 | */ 54 | public function testRegisteredMethodIndicatesIfRegistered() 55 | { 56 | IoC::register('foo', function() {}); 57 | 58 | $this->assertTrue(IoC::registered('foo')); 59 | $this->assertFalse(IoC::registered('baz')); 60 | } 61 | 62 | /** 63 | * Test the IoC::controller method. 64 | * 65 | * @group laravel 66 | */ 67 | public function testControllerMethodRegistersAController() 68 | { 69 | IoC::register('controller: ioc.test', function() {}); 70 | 71 | $this->assertTrue(IoC::registered('controller: ioc.test')); 72 | } 73 | 74 | } -------------------------------------------------------------------------------- /application/views/admin/bingos/index.php: -------------------------------------------------------------------------------- 1 |2 |4 | 5 |Bingos
3 |6 | This is for editing single bingos that may have been entered incorrectly. 7 |
8 | 9 | Form::TYPE_HORIZONTAL)); 12 | echo Form::token(); 13 | 14 | ?> 15 | 16 |17 | 18 |24 | 25 | 26 | 27 | 28 | 29 | 78 | 79 | -------------------------------------------------------------------------------- /laravel/database/connectors/postgres.php: -------------------------------------------------------------------------------- 1 | PDO::CASE_LOWER, 12 | PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, 13 | PDO::ATTR_ORACLE_NULLS => PDO::NULL_NATURAL, 14 | PDO::ATTR_STRINGIFY_FETCHES => false, 15 | ); 16 | 17 | /** 18 | * Establish a PDO database connection. 19 | * 20 | * @param array $config 21 | * @return PDO 22 | */ 23 | public function connect($config) 24 | { 25 | extract($config); 26 | 27 | $dsn = "pgsql:host={$host};dbname={$database}"; 28 | 29 | // The developer has the freedom of specifying a port for the PostgresSQL 30 | // database or the default port (5432) will be used by PDO to create the 31 | // connection to the database for the developer. 32 | if (isset($config['port'])) 33 | { 34 | $dsn .= ";port={$config['port']}"; 35 | } 36 | 37 | $connection = new PDO($dsn, $username, $password, $this->options($config)); 38 | 39 | // If a character set has been specified, we'll execute a query against 40 | // the database to set the correct character set. By default, this is 41 | // set to UTF-8 which should be fine for most scenarios. 42 | if (isset($config['charset'])) 43 | { 44 | $connection->prepare("SET NAMES '{$config['charset']}'")->execute(); 45 | } 46 | 47 | // If a schema has been specified, we'll execute a query against 48 | // the database to set the search path. 49 | if (isset($config['schema'])) 50 | { 51 | $connection->prepare("SET search_path TO '{$config['schema']}'")->execute(); 52 | } 53 | 54 | return $connection; 55 | } 56 | 57 | } -------------------------------------------------------------------------------- /laravel/database/eloquent/relationships/has_one_or_many.php: -------------------------------------------------------------------------------- 1 | set_attribute($this->foreign_key(), $this->base->get_key()); 20 | 21 | return $attributes->save() ? $attributes : false; 22 | } 23 | else 24 | { 25 | $attributes[$this->foreign_key()] = $this->base->get_key(); 26 | 27 | return $this->model->create($attributes); 28 | } 29 | } 30 | 31 | /** 32 | * Update a record for the association. 33 | * 34 | * @param array $attributes 35 | * @return bool 36 | */ 37 | public function update(array $attributes) 38 | { 39 | if ($this->model->timestamps()) 40 | { 41 | $attributes['updated_at'] = new \DateTime; 42 | } 43 | 44 | return $this->table->update($attributes); 45 | } 46 | 47 | /** 48 | * Set the proper constraints on the relationship table. 49 | * 50 | * @return void 51 | */ 52 | protected function constrain() 53 | { 54 | $this->table->where($this->foreign_key(), '=', $this->base->get_key()); 55 | } 56 | 57 | /** 58 | * Set the proper constraints on the relationship table for an eager load. 59 | * 60 | * @param array $results 61 | * @return void 62 | */ 63 | public function eagerly_constrain($results) 64 | { 65 | $this->table->where_in($this->foreign_key(), $this->keys($results)); 66 | } 67 | 68 | } -------------------------------------------------------------------------------- /laravel/vendor/Symfony/Component/Console/README.md: -------------------------------------------------------------------------------- 1 | Console Component 2 | ================= 3 | 4 | Console eases the creation of beautiful and testable command line interfaces. 5 | 6 | The Application object manages the CLI application: 7 | 8 | use Symfony\Component\Console\Application; 9 | 10 | $console = new Application(); 11 | $console->run(); 12 | 13 | The ``run()`` method parses the arguments and options passed on the command 14 | line and executes the right command. 15 | 16 | Registering a new command can easily be done via the ``register()`` method, 17 | which returns a ``Command`` instance: 18 | 19 | use Symfony\Component\Console\Input\InputInterface; 20 | use Symfony\Component\Console\Input\InputArgument; 21 | use Symfony\Component\Console\Input\InputOption; 22 | use Symfony\Component\Console\Output\OutputInterface; 23 | 24 | $console 25 | ->register('ls') 26 | ->setDefinition(array( 27 | new InputArgument('dir', InputArgument::REQUIRED, 'Directory name'), 28 | )) 29 | ->setDescription('Displays the files in the given directory') 30 | ->setCode(function (InputInterface $input, OutputInterface $output) { 31 | $dir = $input->getArgument('dir'); 32 | 33 | $output->writeln(sprintf('Dir listing for19 | 20 | 21 |23 |Maximum of 25 results will be displayed
22 |%s ', $dir)); 34 | }) 35 | ; 36 | 37 | You can also register new commands via classes. 38 | 39 | The component provides a lot of features like output coloring, input and 40 | output abstractions (so that you can easily unit-test your commands), 41 | validation, automatic help messages, ... 42 | 43 | Resources 44 | --------- 45 | 46 | Unit tests: 47 | 48 | https://github.com/symfony/symfony/tree/master/tests/Symfony/Tests/Component/Console 49 | -------------------------------------------------------------------------------- /laravel/vendor/Symfony/Component/HttpFoundation/File/MimeType/FileinfoMimeTypeGuesser.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpFoundation\File\MimeType; 13 | 14 | use Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException; 15 | use Symfony\Component\HttpFoundation\File\Exception\AccessDeniedException; 16 | 17 | /** 18 | * Guesses the mime type using the PECL extension FileInfo 19 | * 20 | * @author Bernhard Schussek21 | */ 22 | class FileinfoMimeTypeGuesser implements MimeTypeGuesserInterface 23 | { 24 | /** 25 | * Returns whether this guesser is supported on the current OS/PHP setup 26 | * 27 | * @return Boolean 28 | */ 29 | static public function isSupported() 30 | { 31 | return function_exists('finfo_open'); 32 | } 33 | 34 | /** 35 | * Guesses the mime type of the file with the given path 36 | * 37 | * @see MimeTypeGuesserInterface::guess() 38 | */ 39 | public function guess($path) 40 | { 41 | if (!is_file($path)) { 42 | throw new FileNotFoundException($path); 43 | } 44 | 45 | if (!is_readable($path)) { 46 | throw new AccessDeniedException($path); 47 | } 48 | 49 | if (!self::isSupported()) { 50 | return null; 51 | } 52 | 53 | if (!$finfo = new \finfo(FILEINFO_MIME_TYPE)) { 54 | return null; 55 | } 56 | 57 | return $finfo->file($path); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /application/views/admin/games/edit.php: -------------------------------------------------------------------------------- 1 | 2 |4 | 5 | Form::TYPE_HORIZONTAL)); 8 | echo Form::token(); 9 | 10 | 11 | echo Form::field('date', 'date', 'Date', 12 | array($game->date, array('class'=>'span2 required')), 13 | array('error' => $game->error('date')) 14 | ); 15 | 16 | echo Form::field('select', 'player_id', 'Player', 17 | array($all_players, $game->player_id, array('class'=>'span4 required qselect')), 18 | array('error' => $game->error('player_id')) 19 | ); 20 | 21 | echo Form::field('number', 'player_score', 'Player Score', 22 | array($game->player_score, array('class'=>'span2 required')), 23 | array('error' => $game->error('player_score')) 24 | ); 25 | 26 | echo Form::field('select', 'opponent_id', 'Opponent', 27 | array($all_players, $game->opponent_id, array('class'=>'span4 required qselect')), 28 | array('error' => $game->error('opponent_id')) 29 | ); 30 | 31 | echo Form::field('number', 'opponent_score', 'Opponent Score', 32 | array($game->opponent_score, array('class'=>'span2 required')), 33 | array('error' => $game->error('opponent_score')) 34 | ); 35 | 36 | 37 | 38 | echo Form::actions(array( 39 | Form::submit('Save Changes', array('class' => 'btn-primary')), 40 | action_link_to_route('admin.games@bydate', 'Back to Games List', array($game->date), 'arrow-left') 41 | )); 42 | 43 | echo Form::close(); 44 | 45 | ?> 46 | 47 | 48 | 66 | -------------------------------------------------------------------------------- /laravel/vendor/Symfony/Component/Console/Formatter/OutputFormatterStyleInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\Console\Formatter; 13 | 14 | /** 15 | * Formatter style interface for defining styles. 16 | * 17 | * @author Konstantin KudryashovEdit Game
3 |18 | * 19 | * @api 20 | */ 21 | interface OutputFormatterStyleInterface 22 | { 23 | /** 24 | * Sets style foreground color. 25 | * 26 | * @param string $color color name 27 | * 28 | * @api 29 | */ 30 | function setForeground($color = null); 31 | 32 | /** 33 | * Sets style background color. 34 | * 35 | * @param string $color color name 36 | * 37 | * @api 38 | */ 39 | function setBackground($color = null); 40 | 41 | /** 42 | * Sets some specific style option. 43 | * 44 | * @param string $option option name 45 | * 46 | * @api 47 | */ 48 | function setOption($option); 49 | 50 | /** 51 | * Unsets some specific style option. 52 | * 53 | * @param string $option option name 54 | */ 55 | function unsetOption($option); 56 | 57 | /** 58 | * Sets multiple style options at once. 59 | * 60 | * @param array $options 61 | */ 62 | function setOptions(array $options); 63 | 64 | /** 65 | * Applies the style to a given text. 66 | * 67 | * @param string $text The text to style 68 | * 69 | * @return string 70 | */ 71 | function apply($text); 72 | } 73 | -------------------------------------------------------------------------------- /laravel/vendor/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeSqliteSessionHandler.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; 13 | 14 | /** 15 | * NativeSqliteSessionHandler. 16 | * 17 | * Driver for the sqlite session save hadlers provided by the SQLite PHP extension. 18 | * 19 | * @author Drak 20 | */ 21 | class NativeSqliteSessionHandler extends NativeSessionHandler 22 | { 23 | /** 24 | * Constructor. 25 | * 26 | * @param string $savePath Path to SQLite database file itself. 27 | * @param array $options Session configuration options. 28 | */ 29 | public function __construct($savePath, array $options = array()) 30 | { 31 | if (!extension_loaded('sqlite')) { 32 | throw new \RuntimeException('PHP does not have "sqlite" session module registered'); 33 | } 34 | 35 | if (null === $savePath) { 36 | $savePath = ini_get('session.save_path'); 37 | } 38 | 39 | ini_set('session.save_handler', 'sqlite'); 40 | ini_set('session.save_path', $savePath); 41 | 42 | $this->setOptions($options); 43 | } 44 | 45 | /** 46 | * Set any sqlite ini values. 47 | * 48 | * @see http://php.net/sqlite.configuration 49 | */ 50 | protected function setOptions(array $options) 51 | { 52 | foreach ($options as $key => $value) { 53 | if (in_array($key, array('sqlite.assoc_case'))) { 54 | ini_set($key, $value); 55 | } 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /laravel/tests/cases/uri.test.php: -------------------------------------------------------------------------------- 1 | setRequestUri($uri); 41 | 42 | $this->assertEquals($expectation, URI::current()); 43 | } 44 | 45 | /** 46 | * Test the URI::segment method. 47 | * 48 | * @group laravel 49 | */ 50 | public function testSegmentMethodReturnsAURISegment() 51 | { 52 | $this->setRequestUri('/user/profile'); 53 | 54 | $this->assertEquals('user', URI::segment(1)); 55 | $this->assertEquals('profile', URI::segment(2)); 56 | } 57 | 58 | /** 59 | * Data provider for the URI::current test. 60 | */ 61 | public function requestUriProvider() 62 | { 63 | return array( 64 | array('/user', 'user'), 65 | array('/user/', 'user'), 66 | array('', '/'), 67 | array('/', '/'), 68 | array('//', '/'), 69 | array('/user', 'user'), 70 | array('/user/', 'user'), 71 | array('/user/profile', 'user/profile'), 72 | ); 73 | } 74 | 75 | } -------------------------------------------------------------------------------- /laravel/vendor/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBagInterface.php: -------------------------------------------------------------------------------- 1 | 7 | * 8 | * For the full copyright and license information, please view the LICENSE 9 | * file that was distributed with this source code. 10 | */ 11 | 12 | namespace Symfony\Component\HttpFoundation\Session\Attribute; 13 | 14 | use Symfony\Component\HttpFoundation\Session\SessionBagInterface; 15 | 16 | /** 17 | * Attributes store. 18 | * 19 | * @author Drak 20 | */ 21 | interface AttributeBagInterface extends SessionBagInterface 22 | { 23 | /** 24 | * Checks if an attribute is defined. 25 | * 26 | * @param string $name The attribute name 27 | * 28 | * @return Boolean true if the attribute is defined, false otherwise 29 | */ 30 | function has($name); 31 | 32 | /** 33 | * Returns an attribute. 34 | * 35 | * @param string $name The attribute name 36 | * @param mixed $default The default value if not found. 37 | * 38 | * @return mixed 39 | */ 40 | function get($name, $default = null); 41 | 42 | /** 43 | * Sets an attribute. 44 | * 45 | * @param string $name 46 | * @param mixed $value 47 | */ 48 | function set($name, $value); 49 | 50 | /** 51 | * Returns attributes. 52 | * 53 | * @return array Attributes 54 | */ 55 | function all(); 56 | 57 | /** 58 | * Sets attributes. 59 | * 60 | * @param array $attributes Attributes 61 | */ 62 | function replace(array $attributes); 63 | 64 | /** 65 | * Removes an attribute. 66 | * 67 | * @param string $name 68 | * 69 | * @return mixed The removed value 70 | */ 71 | function remove($name); 72 | } 73 | -------------------------------------------------------------------------------- /laravel/documentation/database/raw.md: -------------------------------------------------------------------------------- 1 | # Raw Queries 2 | 3 | ## Contents 4 | 5 | - [The Basics](#the-basics) 6 | - [Other Query Methods](#other-query-methods) 7 | - [PDO Connections](#pdo-connections) 8 | 9 | 10 | ## The Basics 11 | 12 | The **query** method is used to execute arbitrary, raw SQL against your database connection. 13 | 14 | #### Selecting records from the database: 15 | 16 | $users = DB::query('select * from users'); 17 | 18 | #### Selecting records from the database using bindings: 19 | 20 | $users = DB::query('select * from users where name = ?', array('test')); 21 | 22 | #### Inserting a record into the database 23 | 24 | $success = DB::query('insert into users values (?, ?)', $bindings); 25 | 26 | #### Updating table records and getting the number of affected rows: 27 | 28 | $affected = DB::query('update users set name = ?', $bindings); 29 | 30 | #### Deleting from a table and getting the number of affected rows: 31 | 32 | $affected = DB::query('delete from users where id = ?', array(1)); 33 | 34 | 35 | ## Other Query Methods 36 | 37 | Laravel provides a few other methods to make querying your database simple. Here's an overview: 38 | 39 | #### Running a SELECT query and returning the first result: 40 | 41 | $user = DB::first('select * from users where id = 1'); 42 | 43 | #### Running a SELECT query and getting the value of a single column: 44 | 45 | $email = DB::only('select email from users where id = 1'); 46 | 47 | 48 | ## PDO Connections 49 | 50 | Sometimes you may wish to access the raw PDO connection behind the Laravel Connection object. 51 | 52 | #### Get the raw PDO connection for a database: 53 | 54 | $pdo = DB::connection('sqlite')->pdo; 55 | 56 | > **Note:** If no connection name is specified, the **default** connection will be returned. -------------------------------------------------------------------------------- /laravel/tests/cases/database.test.php: -------------------------------------------------------------------------------- 1 | assertTrue(isset(DB::$connections[Config::get('database.default')])); 30 | 31 | $connection = DatabaseConnectStub::connection('mysql'); 32 | $this->assertTrue(isset(DB::$connections['mysql'])); 33 | $this->assertEquals(DB::$connections['mysql']->pdo->laravel_config, Config::get('database.connections.mysql')); 34 | } 35 | 36 | /** 37 | * Test the DB::profile method. 38 | * 39 | * @group laravel 40 | */ 41 | public function testProfileMethodReturnsQueries() 42 | { 43 | Laravel\Database\Connection::$queries = array('Taylor'); 44 | $this->assertEquals(array('Taylor'), DB::profile()); 45 | Laravel\Database\Connection::$queries = array(); 46 | } 47 | 48 | /** 49 | * Test the __callStatic method. 50 | * 51 | * @group laravel 52 | */ 53 | public function testConnectionMethodsCanBeCalledStaticly() 54 | { 55 | $this->assertEquals('sqlite', DB::driver()); 56 | } 57 | 58 | } 59 | 60 | class DatabaseConnectStub extends Laravel\Database { 61 | 62 | protected static function connect($config) { return new PDOStub($config); } 63 | 64 | } 65 | 66 | class PDOStub extends PDO { 67 | 68 | public $laravel_config; 69 | 70 | public function __construct($config) { $this->laravel_config = $config; } 71 | 72 | public function foo() { return 'foo'; } 73 | 74 | } -------------------------------------------------------------------------------- /public/less/modals.less: -------------------------------------------------------------------------------- 1 | // MODALS 2 | // ------ 3 | 4 | .modal-open { 5 | .dropdown-menu { z-index: @zindexDropdown + @zindexModal; } 6 | .dropdown.open { *z-index: @zindexDropdown + @zindexModal; } 7 | .popover { z-index: @zindexPopover + @zindexModal; } 8 | .tooltip { z-index: @zindexTooltip + @zindexModal; } 9 | } 10 | 11 | .modal-backdrop { 12 | position: fixed; 13 | top: 0; 14 | right: 0; 15 | bottom: 0; 16 | left: 0; 17 | z-index: @zindexModalBackdrop; 18 | background-color: @black; 19 | // Fade for backdrop 20 | &.fade { opacity: 0; } 21 | } 22 | 23 | .modal-backdrop, 24 | .modal-backdrop.fade.in { 25 | .opacity(80); 26 | } 27 | 28 | .modal { 29 | position: fixed; 30 | top: 50%; 31 | left: 50%; 32 | z-index: @zindexModal; 33 | max-height: 500px; 34 | overflow: auto; 35 | width: 560px; 36 | margin: -250px 0 0 -280px; 37 | background-color: @white; 38 | border: 1px solid #999; 39 | border: 1px solid rgba(0,0,0,.3); 40 | *border: 1px solid #999; /* IE6-7 */ 41 | .border-radius(6px); 42 | .box-shadow(0 3px 7px rgba(0,0,0,0.3)); 43 | .background-clip(padding-box); 44 | &.fade { 45 | .transition(e('opacity .3s linear, top .3s ease-out')); 46 | top: -25%; 47 | } 48 | &.fade.in { top: 50%; } 49 | } 50 | .modal-header { 51 | padding: 9px 15px; 52 | border-bottom: 1px solid #eee; 53 | // Close icon 54 | .close { margin-top: 2px; } 55 | } 56 | .modal-body { 57 | padding: 15px; 58 | } 59 | .modal-footer { 60 | padding: 14px 15px 15px; 61 | margin-bottom: 0; 62 | background-color: #f5f5f5; 63 | border-top: 1px solid #ddd; 64 | .border-radius(0 0 6px 6px); 65 | .box-shadow(inset 0 1px 0 @white); 66 | .clearfix(); 67 | .btn { 68 | float: right; 69 | margin-left: 5px; 70 | margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /laravel/memcached.php: -------------------------------------------------------------------------------- 1 | 16 | * // Get the Memcache connection and get an item from the cache 17 | * $name = Memcached::connection()->get('name'); 18 | * 19 | * // Get the Memcache connection and place an item in the cache 20 | * Memcached::connection()->set('name', 'Taylor'); 21 | * 22 | * 23 | * @return Memcached 24 | */ 25 | public static function connection() 26 | { 27 | if (is_null(static::$connection)) 28 | { 29 | static::$connection = static::connect(Config::get('cache.memcached')); 30 | } 31 | 32 | return static::$connection; 33 | } 34 | 35 | /** 36 | * Create a new Memcached connection instance. 37 | * 38 | * @param array $servers 39 | * @return Memcached 40 | */ 41 | protected static function connect($servers) 42 | { 43 | $memcache = new \Memcached; 44 | 45 | foreach ($servers as $server) 46 | { 47 | $memcache->addServer($server['host'], $server['port'], $server['weight']); 48 | } 49 | 50 | if ($memcache->getVersion() === false) 51 | { 52 | throw new \Exception('Could not establish memcached connection.'); 53 | } 54 | 55 | return $memcache; 56 | } 57 | 58 | /** 59 | * Dynamically pass all other method calls to the Memcache instance. 60 | * 61 | * 62 | * // Get an item from the Memcache instance 63 | * $name = Memcached::get('name'); 64 | * 65 | * // Store data on the Memcache server 66 | * Memcached::set('name', 'Taylor'); 67 | *68 | */ 69 | public static function __callStatic($method, $parameters) 70 | { 71 | return call_user_func_array(array(static::connection(), $method), $parameters); 72 | } 73 | 74 | } -------------------------------------------------------------------------------- /laravel/cache/drivers/apc.php: -------------------------------------------------------------------------------- 1 | key = $key; 21 | } 22 | 23 | /** 24 | * Determine if an item exists in the cache. 25 | * 26 | * @param string $key 27 | * @return bool 28 | */ 29 | public function has($key) 30 | { 31 | return ( ! is_null($this->get($key))); 32 | } 33 | 34 | /** 35 | * Retrieve an item from the cache driver. 36 | * 37 | * @param string $key 38 | * @return mixed 39 | */ 40 | protected function retrieve($key) 41 | { 42 | if (($cache = apc_fetch($this->key.$key)) !== false) 43 | { 44 | return $cache; 45 | } 46 | } 47 | 48 | /** 49 | * Write an item to the cache for a given number of minutes. 50 | * 51 | *52 | * // Put an item in the cache for 15 minutes 53 | * Cache::put('name', 'Taylor', 15); 54 | *55 | * 56 | * @param string $key 57 | * @param mixed $value 58 | * @param int $minutes 59 | * @return void 60 | */ 61 | public function put($key, $value, $minutes) 62 | { 63 | apc_store($this->key.$key, $value, $minutes * 60); 64 | } 65 | 66 | /** 67 | * Write an item to the cache that lasts forever. 68 | * 69 | * @param string $key 70 | * @param mixed $value 71 | * @return void 72 | */ 73 | public function forever($key, $value) 74 | { 75 | return $this->put($key, $value, 0); 76 | } 77 | 78 | /** 79 | * Delete an item from the cache. 80 | * 81 | * @param string $key 82 | * @return void 83 | */ 84 | public function forget($key) 85 | { 86 | apc_delete($this->key.$key); 87 | } 88 | 89 | } -------------------------------------------------------------------------------- /laravel/documentation/requests.md: -------------------------------------------------------------------------------- 1 | # Examining Requests 2 | 3 | ## Contents 4 | 5 | - [Working With The URI](#working-with-the-uri) 6 | - [Other Request Helpers](#other-request-helpers) 7 | 8 | 9 | ## Working With The URI 10 | 11 | #### Getting the current URI for the request: 12 | 13 | echo URI::current(); 14 | 15 | #### Getting a specific segment from the URI: 16 | 17 | echo URI::segment(1); 18 | 19 | #### Returning a default value if the segment doesn't exist: 20 | 21 | echo URI::segment(10, 'Foo'); 22 | 23 | #### Getting the full request URI, including query string: 24 | 25 | echo URI::full(); 26 | 27 | Sometimes you may need to determine if the current URI is a given string, or begins with a given string. Here's an example of how you can use the is() method to accomplish this: 28 | 29 | #### Determine if the URI is "home": 30 | 31 | if (URI::is('home')) 32 | { 33 | // The current URI is "home"! 34 | } 35 | 36 | #### Determine if the current URI begins with "docs/": 37 | 38 | if URI::is('docs/*')) 39 | { 40 | // The current URI begins with "docs/"! 41 | } 42 | 43 | 44 | ## Other Request Helpers 45 | 46 | #### Getting the current request method: 47 | 48 | echo Request::method(); 49 | 50 | #### Accessing the $_SERVER global array: 51 | 52 | echo Request::server('http_referer'); 53 | 54 | #### Retrieving the requester's IP address: 55 | 56 | echo Request::ip(); 57 | 58 | #### Determining if the current request is using HTTPS: 59 | 60 | if (Request::secure()) 61 | { 62 | // This request is over HTTPS! 63 | } 64 | 65 | #### Determining if the current request is an AJAX request: 66 | 67 | if (Request::ajax()) 68 | { 69 | // This request is using AJAX! 70 | } 71 | 72 | #### Determining if the current requst is via the Artisan CLI: 73 | 74 | if (Request::cli()) 75 | { 76 | // This request came from the CLI! 77 | } -------------------------------------------------------------------------------- /application/views/admin/games/ratings.php: -------------------------------------------------------------------------------- 1 |2 |5 | 6 |Club Ratings
3 | Changes on 4 |7 | 8 |
43 | 44 | 45 | 46 | 47 | 48 | 57 | 58 | -------------------------------------------------------------------------------- /application/views/admin/housekeeping/homepage.php: -------------------------------------------------------------------------------- 1 |9 | 20 | 21 | 22 | ending_rating - $rating->starting_rating; 26 | 27 | echo 'Player 10 |Initial Rating 11 |Games Played 12 |Avg. Opp. Rating 13 |Expected Wins 14 |Wins 15 |K 16 |Perf. Rating 17 |Change 18 |Final Rating 19 |'; 28 | echo ' ' . $rating->player->fullname . ' '; 29 | echo '' . $rating->starting_rating . ' '; 30 | echo '' . $rating->games_played . ' '; 31 | echo '' . round($rating->total_opp_ratings / $rating->games_played) . ' '; 32 | echo '' . $rating->expected_wins . ' '; 33 | echo '' . $rating->games_won . ' '; 34 | echo '' . $rating->kfactor . ' '; 35 | echo '' . $rating->performance_rating . ' '; 36 | echo '' . sprintf('%+d', $delta) . ' '; 37 | echo '' . $rating->ending_rating . ' '; 38 | echo "\n"; 39 | } 40 | ?> 41 | 42 |2 |4 | 5 | 6 | has_errors()): ?> 7 |Home Page
3 |8 | Oops! Please correct the errors below. 9 |10 | 11 | 12 | Form::TYPE_HORIZONTAL)); 15 | echo Form::token(); 16 | 17 | echo Form::field('text', 'title', 'Title', 18 | array($homepage->title, array('class'=>'span8 required')), 19 | array('error' => $homepage->error('title')) 20 | ); 21 | 22 | echo Form::field('textarea', 'body', 'Body', 23 | array($homepage->body, array('class'=>'span8 required', 'style'=>'height: 10em')), 24 | array( 25 | 'error' => $homepage->error('body'), 26 | 'help' => 'Preview or get help with ' . 27 | 'Markdown' 28 | ) 29 | ); 30 | 31 | ?> 32 | 33 |34 | 35 |39 | 40 | 'btn-primary')), 45 | action_link_to_route('admin.housekeeping', 'Back to Housekeeping', array(), 'arrow-left') 46 | )); 47 | 48 | echo Form::close(); 49 | 50 | ?> 51 | 52 | 76 | -------------------------------------------------------------------------------- /laravel/auth/drivers/fluent.php: -------------------------------------------------------------------------------- 1 | find($id); 22 | } 23 | } 24 | 25 | /** 26 | * Attempt to log a user into the application. 27 | * 28 | * @param array $arguments 29 | * @return void 30 | */ 31 | public function attempt($arguments = array()) 32 | { 33 | $user = $this->get_user($arguments); 34 | 35 | // If the credentials match what is in the database we will just 36 | // log the user into the application and remember them if asked. 37 | $password = $arguments['password']; 38 | 39 | $password_field = Config::get('auth.password', 'password'); 40 | 41 | if ( ! is_null($user) and Hash::check($password, $user->{$password_field})) 42 | { 43 | return $this->login($user->id, array_get($arguments, 'remember')); 44 | } 45 | 46 | return false; 47 | } 48 | 49 | /** 50 | * Get the user from the database table. 51 | * 52 | * @param array $arguments 53 | * @return mixed 54 | */ 55 | protected function get_user($arguments) 56 | { 57 | $table = Config::get('auth.table'); 58 | 59 | return DB::table($table)->where(function($query) use($arguments) 60 | { 61 | $username = Config::get('auth.username'); 62 | 63 | $query->where($username, '=', $arguments['username']); 64 | 65 | foreach(array_except($arguments, array('username', 'password', 'remember')) as $column => $val) 66 | { 67 | $query->where($column, '=', $val); 68 | } 69 | })->first(); 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /laravel/documentation/auth/config.md: -------------------------------------------------------------------------------- 1 | # Auth Configuration 2 | 3 | ## Contents 4 | 5 | - [The Basics](#the-basics) 6 | - [The Authentication Driver](#driver) 7 | - [The Default "Username"](#username) 8 | - [Authentication Model](#model) 9 | - [Authentication Table](#table) 10 | 11 | 12 | ## The Basics 13 | 14 | Most interactive applications have the ability for users to login and logout. Laravel provides a simple class to help you validate user credentials and retrieve information about the current user of your application. 15 | 16 | To get started, let's look over the **application/config/auth.php** file. The authentication configuration contains some basic options to help you get started with authentication. 17 | 18 | 19 | ## The Authentication Driver 20 | 21 | Laravel's authentication is driver based, meaning the responsibility for retrieving users during authentication is delegated to various "drivers". Two are included out of the box: Eloquent and Fluent, but you are free to write your own drivers if needed! 22 | 23 | The **Eloquent** driver uses the Eloquent ORM to load the users of your application, and is the default authentication driver. The **Fluent** driver uses the fluent query builder to load your users. 24 | 25 | 26 | ## The Default "Username" 27 | 28 | The second option in the configuration file determines the default "username" of your users. This will typically correspond to a database column in your "users" table, and will usually be "email" or "username". 29 | 30 | 31 | ## Authentication Model 32 | 33 | When using the **Eloquent** authentication driver, this option determines the Eloquent model that should be used when loading users. 34 | 35 | 36 | ## Authentication Table 37 | 38 | When using the **Fluent** authentication drivers, this option determines the database table containing the users of your application. --------------------------------------------------------------------------------36 | 37 |38 |