This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| >>> Carbon\Carbon::parse('2015-01-01') | |
| => Carbon\Carbon {#864 | |
| +"date": "2015-01-01 00:00:00.000000", | |
| +"timezone_type": 3, | |
| +"timezone": "UTC", | |
| } | |
| >>> Carbon\Carbon::parse('2015-01-01')->timezone('Europe/Madrid') | |
| => Carbon\Carbon {#861 | |
| +"date": "2015-01-01 01:00:00.000000", | |
| +"timezone_type": 3, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT * | |
| FROM entries | |
| WHERE (entries.category_id, entries.in_category_id, COALESCE(entries.in_category_sub_id, 'UNIQUE SENTINEL')) IN ( | |
| SELECT | |
| entries.category_id, | |
| entries.in_category_id, | |
| COALESCE(entries.in_category_sub_id, 'UNIQUE SENTINEL') | |
| FROM entries | |
| GROUP BY entries.category_id, entries.in_category_id, COALESCE(entries.in_category_sub_id, 'UNIQUE SENTINEL') | |
| HAVING COUNT(*) > 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Rules; | |
| use App\Entry; | |
| use Illuminate\Contracts\Validation\Rule; | |
| /** | |
| * Class UniqueCategoryId | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| do { | |
| $input = readline("Detected non-human name '$name'. How many names is this?: "); | |
| } while(!(is_numeric($input) && preg_match('/\d+/', $input))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT `resourceId`, `resourceType`, `resourceTitle`, `resourceSubtitle`, `resourceShortTitle`, `resourceTitleSort`, `resourceTransTitle`, `resourceTransSubtitle`, `resourceTransShortTitle`, `resourceField1`, `resourceField2`, `resourceField3`, `resourceField4`, `resourceField5`, `resourceField6`, `resourceField7`, `resourceField8`, `resourceField9`, `resourceNoSort`, `resourceTransNoSort`, `resourceIsbn`, `resourceBibtexKey`, `resourceDoi`, `resourcepageId`, `resourcepagePageStart`, `resourcepagePageEnd`, `resourceyearId`, `resourceyearYear1`, `resourceyearYear2`, `resourceyearYear3`, `resourceyearYear4`, `resourcemiscId`, `resourcemiscCollection`, `resourcemiscPublisher`, `resourcemiscField1`, `resourcemiscField2`, `resourcemiscField3`, `resourcemiscField4`, `resourcemiscField5`, `resourcemiscField6`, `resourcemiscTag`, `resourcemiscAddUserIdResource`, `resourcemiscEditUserIdResource`, `resourcemiscAccesses`, `resourcemiscMaturityIndex`, `resourcemiscPeerReviewed`, `resourcemiscQuarantine`, `resourcemiscAcc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Http\Controllers; | |
| use App\Category; | |
| use App\Collection; | |
| use App\Creator; | |
| use App\Entry; | |
| use App\EntryType; | |
| use App\Keyword; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @if($entry->publisher) | |
| {{ $entry->publisher->name }} | |
| @endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Display the specified resource. | |
| * | |
| * @param \App\Category $category | |
| * @return \Illuminate\Http\Response | |
| */ | |
| public function show(Category $category) | |
| { | |
| return view('categories.show', ['category' => $category]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>App - @yield('title')</title> | |
| <link href="{{ mix('/css/app.css') }}" rel="stylesheet"> | |
| <script src="{{ mix('/js/app.js') }}"></script> | |
| </head> | |
| <body> | |
| @include('layouts.header') | |
| <div class="container"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Licensed under CC0 1.0 Universal. This work is in the Public Domain. | |
| Full license text here: https://creativecommons.org/publicdomain/zero/1.0/legalcode |