-
-
Notifications
You must be signed in to change notification settings - Fork 519
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* release/4.1.24: updated the readme updated the changelog work updated the config storage_path to be more ambiguous added blank tags to unsplash links added versions and contract support work work require support packege instead of framework refactored the topic assignment to be easier to read
- Loading branch information
Showing
13 changed files
with
85 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
/node_modules | ||
/vendor | ||
/.idea | ||
/.vscode | ||
composer.lock | ||
npm-debug.log | ||
yarn-error.log | ||
.DS_Store | ||
Thumbs.dbg | ||
.phpunit.result.cache | ||
.phpunit.result.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"/js/app.js": "/js/app.js?id=863f00cb958b96b4441a", | ||
"/js/app.js": "/js/app.js?id=16097a544d27945b54aa", | ||
"/css/app.css": "/css/app.css?id=30702a620a23ba741c32", | ||
"/css/app-dark.css": "/css/app-dark.css?id=ceb9852370c32c15e835", | ||
"/js/app.js.map": "/js/app.js.map?id=d6ba47ca936cd965aed9", | ||
"/js/app.js.map": "/js/app.js.map?id=f205df6a4a43140516b1", | ||
"/favicon.ico": "/favicon.ico?id=dbb0c05daa3432643753" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,7 +105,7 @@ public function store() | |
); | ||
|
||
$post->topic()->sync( | ||
$this->assignTopics(request('topic') ? [request('topic')] : []) | ||
$this->assignTopic(request('topic') ?? []) | ||
); | ||
|
||
return redirect(route('canvas.post.edit', $post->id))->with('notify', 'Saved!'); | ||
|
@@ -156,7 +156,7 @@ public function update(string $id) | |
); | ||
|
||
$post->topic()->sync( | ||
$this->assignTopics(request('topic') ? [request('topic')] : []) | ||
$this->assignTopic(request('topic') ?? []) | ||
); | ||
|
||
return redirect(route('canvas.post.edit', $post->id))->with('notify', 'Saved!'); | ||
|
@@ -204,19 +204,15 @@ private function collectTags(array $incomingTags): array | |
} | ||
|
||
/** | ||
* Collect or create given topics. | ||
* Assign a given topic. | ||
* | ||
* @param array $incomingTopics | ||
* @return array | ||
* | ||
* @author Mohamed Said <[email protected]> | ||
* @param $incomingTopic | ||
* @return mixed | ||
*/ | ||
private function assignTopics(array $incomingTopics): array | ||
private function assignTopic(array $incomingTopic) | ||
{ | ||
$topics = Topic::all(); | ||
|
||
return collect($incomingTopics)->map(function ($incomingTopic) use ($topics) { | ||
$topic = $topics->where('slug', $incomingTopic['slug'])->first(); | ||
if ($incomingTopic) { | ||
$topic = Topic::where('slug', $incomingTopic['slug'])->first(); | ||
|
||
if (! $topic) { | ||
$topic = Topic::create([ | ||
|
@@ -226,7 +222,9 @@ private function assignTopics(array $incomingTopics): array | |
]); | ||
} | ||
|
||
return (string) $topic->id; | ||
})->toArray(); | ||
return collect((string) $topic->id)->toArray(); | ||
} else { | ||
return []; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1046,12 +1046,12 @@ atob@^2.1.1: | |
integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== | ||
|
||
autoprefixer@^9.4.2: | ||
version "9.5.0" | ||
resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.5.0.tgz#7e51d0355c11596e6cf9a0afc9a44e86d1596c70" | ||
integrity sha512-hMKcyHsZn5+qL6AUeP3c8OyuteZ4VaUlg+fWbyl8z7PqsKHF/Bf8/px3K6AT8aMzDkBo8Bc11245MM+itDBOxQ== | ||
version "9.5.1" | ||
resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.5.1.tgz#243b1267b67e7e947f28919d786b50d3bb0fb357" | ||
integrity sha512-KJSzkStUl3wP0D5sdMlP82Q52JLy5+atf2MHAre48+ckWkXgixmfHyWmA77wFDy6jTHU6mIgXv6hAQ2mf1PjJQ== | ||
dependencies: | ||
browserslist "^4.4.2" | ||
caniuse-lite "^1.0.30000947" | ||
browserslist "^4.5.4" | ||
caniuse-lite "^1.0.30000957" | ||
normalize-range "^0.1.2" | ||
num2fraction "^1.2.2" | ||
postcss "^7.0.14" | ||
|
@@ -1272,7 +1272,7 @@ browserify-zlib@^0.2.0: | |
dependencies: | ||
pako "~1.0.5" | ||
|
||
browserslist@^4.0.0, browserslist@^4.4.2, browserslist@^4.5.1, browserslist@^4.5.2: | ||
browserslist@^4.0.0, browserslist@^4.5.2, browserslist@^4.5.4: | ||
version "4.5.4" | ||
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.5.4.tgz#166c4ecef3b51737a42436ea8002aeea466ea2c7" | ||
integrity sha512-rAjx494LMjqKnMPhFkuLmLp8JWEX0o8ADTGeAbOqaF+XCvYLreZrG5uVjnPBlAQ8REZK4pzXGvp0bWgrFtKaag== | ||
|
@@ -1407,7 +1407,7 @@ caniuse-api@^3.0.0: | |
lodash.memoize "^4.1.2" | ||
lodash.uniq "^4.5.0" | ||
|
||
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000947, caniuse-lite@^1.0.30000955: | ||
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000955, caniuse-lite@^1.0.30000957: | ||
version "1.0.30000957" | ||
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000957.tgz#fb1026bf184d7d62c685205358c3b24b9e29f7b3" | ||
integrity sha512-8wxNrjAzyiHcLXN/iunskqQnJquQQ6VX8JHfW5kLgAPRSiSuKZiNfmIkP5j7jgyXqAQBSoXyJxfnbCFS0ThSiQ== | ||
|
@@ -1718,24 +1718,24 @@ copy-descriptor@^0.1.0: | |
integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= | ||
|
||
core-js-compat@^3.0.0: | ||
version "3.0.0" | ||
resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.0.0.tgz#cd9810b8000742535a4a43773866185e310bd4f7" | ||
integrity sha512-W/Ppz34uUme3LmXWjMgFlYyGnbo1hd9JvA0LNQ4EmieqVjg2GPYbj3H6tcdP2QGPGWdRKUqZVbVKLNIFVs/HiA== | ||
version "3.0.1" | ||
resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.0.1.tgz#bff73ba31ca8687431b9c88f78d3362646fb76f0" | ||
integrity sha512-2pC3e+Ht/1/gD7Sim/sqzvRplMiRnFQVlPpDVaHtY9l7zZP7knamr3VRD6NyGfHd84MrDC0tAM9ulNxYMW0T3g== | ||
dependencies: | ||
browserslist "^4.5.1" | ||
core-js "3.0.0" | ||
core-js-pure "3.0.0" | ||
semver "^5.6.0" | ||
browserslist "^4.5.4" | ||
core-js "3.0.1" | ||
core-js-pure "3.0.1" | ||
semver "^6.0.0" | ||
|
||
[email protected].0: | ||
version "3.0.0" | ||
resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.0.0.tgz#a5679adb4875427c8c0488afc93e6f5b7125859b" | ||
integrity sha512-yPiS3fQd842RZDgo/TAKGgS0f3p2nxssF1H65DIZvZv0Od5CygP8puHXn3IQiM/39VAvgCbdaMQpresrbGgt9g== | ||
[email protected].1: | ||
version "3.0.1" | ||
resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.0.1.tgz#37358fb0d024e6b86d443d794f4e37e949098cbe" | ||
integrity sha512-mSxeQ6IghKW3MoyF4cz19GJ1cMm7761ON+WObSyLfTu/Jn3x7w4NwNFnrZxgl4MTSvYYepVLNuRtlB4loMwJ5g== | ||
|
||
[email protected].0: | ||
version "3.0.0" | ||
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.0.0.tgz#a8dbfa978d29bfc263bfb66c556d0ca924c28957" | ||
integrity sha512-WBmxlgH2122EzEJ6GH8o9L/FeoUKxxxZ6q6VUxoTlsE4EvbTWKJb447eyVxTEuq0LpXjlq/kCB2qgBvsYRkLvQ== | ||
[email protected].1: | ||
version "3.0.1" | ||
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.0.1.tgz#1343182634298f7f38622f95e73f54e48ddf4738" | ||
integrity sha512-sco40rF+2KlE0ROMvydjkrVMMG1vYilP2ALoRXcYR4obqbYIuV3Bg+51GEDW+HF8n7NRA+iaA4qD0nD9lo9mew== | ||
|
||
core-util-is@~1.0.0: | ||
version "1.0.2" | ||
|
@@ -3562,9 +3562,9 @@ js-tokens@^3.0.2: | |
integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= | ||
|
||
js-yaml@^3.13.0, js-yaml@^3.9.0: | ||
version "3.13.0" | ||
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.0.tgz#38ee7178ac0eea2c97ff6d96fff4b18c7d8cf98e" | ||
integrity sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ== | ||
version "3.13.1" | ||
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" | ||
integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== | ||
dependencies: | ||
argparse "^1.0.7" | ||
esprima "^4.0.0" | ||
|
@@ -4019,9 +4019,9 @@ [email protected]: | |
integrity sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ== | ||
|
||
mime@^2.3.1: | ||
version "2.4.1" | ||
resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.1.tgz#19eb7357bebbda37df585b14038347721558c715" | ||
integrity sha512-VRUfmQO0rCd3hKwBymAn3kxYzBHr3I/wdVMywgG3HhXOwrCQgN84ZagpdTm2tZ4TNtwsSmyJWYO88mb5XvzGqQ== | ||
version "2.4.2" | ||
resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.2.tgz#ce5229a5e99ffc313abac806b482c10e7ba6ac78" | ||
integrity sha512-zJBfZDkwRu+j3Pdd2aHsR5GfH2jIWhmL1ZzBoc+X+3JEti2hbArWcyJ+1laC1D2/U/W1a/+Cegj0/OnEU2ybjg== | ||
|
||
mimic-fn@^2.0.0: | ||
version "2.1.0" | ||
|
@@ -4362,9 +4362,9 @@ object-copy@^0.1.0: | |
kind-of "^3.0.3" | ||
|
||
object-keys@^1.0.12: | ||
version "1.1.0" | ||
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.0.tgz#11bd22348dd2e096a045ab06f6c85bcc340fa032" | ||
integrity sha512-6OO5X1+2tYkNyNEx6TsCxEqFfRWaqx6EtMiSbGrw8Ob8v9Ne+Hl8rBAgLBZn5wjEz3s/s6U1WXFUFOcxxAwUpg== | ||
version "1.1.1" | ||
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" | ||
integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== | ||
|
||
object-path@^0.9.2: | ||
version "0.9.2" | ||
|
@@ -4499,9 +4499,9 @@ p-finally@^1.0.0: | |
integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= | ||
|
||
p-is-promise@^2.0.0: | ||
version "2.0.0" | ||
resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.0.0.tgz#7554e3d572109a87e1f3f53f6a7d85d1b194f4c5" | ||
integrity sha512-pzQPhYMCAgLAKPWD2jC3Se9fEfrD9npNos0y150EeqZll7akhEgGhTW/slB6lHku8AvYGiJ+YJ5hfHKePPgFWg== | ||
version "2.1.0" | ||
resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" | ||
integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== | ||
|
||
p-limit@^2.0.0: | ||
version "2.2.0" | ||
|
@@ -5568,6 +5568,11 @@ semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0: | |
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" | ||
integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== | ||
|
||
semver@^6.0.0: | ||
version "6.0.0" | ||
resolved "https://registry.yarnpkg.com/semver/-/semver-6.0.0.tgz#05e359ee571e5ad7ed641a6eec1e547ba52dea65" | ||
integrity sha512-0UewU+9rFapKFnlbirLi3byoOuhrSsli/z/ihNnvM24vgF+8sNBiI1LZPBSH9wJKUwaUbw+s3hToDLCXkrghrQ== | ||
|
||
[email protected]: | ||
version "0.16.2" | ||
resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" | ||
|