diff --git a/composer.json b/composer.json index 72cb637..20326a4 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ "mlntn/lumen-artisan-serve": "^1.2", "vluzrmos/tinker": "dev-master", "albertcht/lumen-form-request": "^2.3", - "albertcht/lumen-helpers": "dev-master", + "albertcht/lumen-helpers": "^0.2", "illuminate/mail": "^5.5", "illuminate/notifications": "^5.5" }, diff --git a/composer.lock b/composer.lock index 378f5c0..2fadccf 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "ea9a6f90df2621ea9c6d3392b2ec2720", - "content-hash": "06c2b5e303b4db3bbb81577241818492", + "hash": "045a5eba76ab16bc62b58c144646dfe6", + "content-hash": "9bba013a77138e94323e816e99613ea1", "packages": [ { "name": "albertcht/lumen-form-request", @@ -54,16 +54,16 @@ }, { "name": "albertcht/lumen-helpers", - "version": "dev-master", + "version": "v0.2", "source": { "type": "git", "url": "https://github.com/albertcht/lumen-helpers.git", - "reference": "b870096cd968b462ad6bd4f8ccd4a578307e19eb" + "reference": "8d75d91c106ed95299d5b38fd208e0a889a67b49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/albertcht/lumen-helpers/zipball/b870096cd968b462ad6bd4f8ccd4a578307e19eb", - "reference": "b870096cd968b462ad6bd4f8ccd4a578307e19eb", + "url": "https://api.github.com/repos/albertcht/lumen-helpers/zipball/8d75d91c106ed95299d5b38fd208e0a889a67b49", + "reference": "8d75d91c106ed95299d5b38fd208e0a889a67b49", "shasum": "" }, "require": { @@ -99,7 +99,7 @@ "laravel", "lumen" ], - "time": "2017-12-31 06:13:48" + "time": "2018-01-07 09:17:20" }, { "name": "dnoegel/php-xdg-base-dir", @@ -2827,16 +2827,16 @@ }, { "name": "symfony/console", - "version": "v3.4.2", + "version": "v3.4.3", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "9f21adfb92a9315b73ae2ed43138988ee4913d4e" + "reference": "8394c8ef121949e8f858f13bc1e34f05169e4e7d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/9f21adfb92a9315b73ae2ed43138988ee4913d4e", - "reference": "9f21adfb92a9315b73ae2ed43138988ee4913d4e", + "url": "https://api.github.com/repos/symfony/console/zipball/8394c8ef121949e8f858f13bc1e34f05169e4e7d", + "reference": "8394c8ef121949e8f858f13bc1e34f05169e4e7d", "shasum": "" }, "require": { @@ -2892,20 +2892,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2017-12-14 19:40:10" + "time": "2018-01-03 07:37:34" }, { "name": "symfony/css-selector", - "version": "v3.4.2", + "version": "v3.4.3", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "eac760b414cf1f64362c3dd047b989e4db121332" + "reference": "e66394bc7610e69279bfdb3ab11b4fe65403f556" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/eac760b414cf1f64362c3dd047b989e4db121332", - "reference": "eac760b414cf1f64362c3dd047b989e4db121332", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/e66394bc7610e69279bfdb3ab11b4fe65403f556", + "reference": "e66394bc7610e69279bfdb3ab11b4fe65403f556", "shasum": "" }, "require": { @@ -2945,20 +2945,20 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2017-12-14 19:40:10" + "time": "2018-01-03 07:37:34" }, { "name": "symfony/debug", - "version": "v3.4.2", + "version": "v3.4.3", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "543deab3ffff94402440b326fc94153bae2dfa7a" + "reference": "603b95dda8b00020e4e6e60dc906e7b715b1c245" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/543deab3ffff94402440b326fc94153bae2dfa7a", - "reference": "543deab3ffff94402440b326fc94153bae2dfa7a", + "url": "https://api.github.com/repos/symfony/debug/zipball/603b95dda8b00020e4e6e60dc906e7b715b1c245", + "reference": "603b95dda8b00020e4e6e60dc906e7b715b1c245", "shasum": "" }, "require": { @@ -3001,20 +3001,20 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2017-12-12 08:27:14" + "time": "2018-01-03 17:14:19" }, { "name": "symfony/event-dispatcher", - "version": "v4.0.2", + "version": "v4.0.3", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "d4face19ed8002eec8280bc1c5ec18130472bf43" + "reference": "74d33aac36208c4d6757807d9f598f0133a3a4eb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d4face19ed8002eec8280bc1c5ec18130472bf43", - "reference": "d4face19ed8002eec8280bc1c5ec18130472bf43", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/74d33aac36208c4d6757807d9f598f0133a3a4eb", + "reference": "74d33aac36208c4d6757807d9f598f0133a3a4eb", "shasum": "" }, "require": { @@ -3064,20 +3064,20 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2017-12-14 19:48:22" + "time": "2018-01-03 07:38:00" }, { "name": "symfony/finder", - "version": "v3.4.2", + "version": "v3.4.3", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "dac8d7db537bac7ad8143eb11360a8c2231f251a" + "reference": "613e26310776f49a1773b6737c6bd554b8bc8c6f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/dac8d7db537bac7ad8143eb11360a8c2231f251a", - "reference": "dac8d7db537bac7ad8143eb11360a8c2231f251a", + "url": "https://api.github.com/repos/symfony/finder/zipball/613e26310776f49a1773b6737c6bd554b8bc8c6f", + "reference": "613e26310776f49a1773b6737c6bd554b8bc8c6f", "shasum": "" }, "require": { @@ -3113,20 +3113,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2017-11-05 16:10:10" + "time": "2018-01-03 07:37:34" }, { "name": "symfony/http-foundation", - "version": "v3.4.2", + "version": "v3.4.3", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "59bf131b5460227a2f583a7dbe6b179f98f9e0a5" + "reference": "4a213be1cc8598089b8c7451529a2927b49b5d26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/59bf131b5460227a2f583a7dbe6b179f98f9e0a5", - "reference": "59bf131b5460227a2f583a7dbe6b179f98f9e0a5", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/4a213be1cc8598089b8c7451529a2927b49b5d26", + "reference": "4a213be1cc8598089b8c7451529a2927b49b5d26", "shasum": "" }, "require": { @@ -3167,20 +3167,20 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2017-12-14 19:40:10" + "time": "2018-01-03 17:14:19" }, { "name": "symfony/http-kernel", - "version": "v3.4.2", + "version": "v3.4.3", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "48325096bbda77b983e642d21a4dd9bdde3ab73e" + "reference": "1c2a82d6a8ec9b354fe4ef48ad1ad3f1a4f7db0e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/48325096bbda77b983e642d21a4dd9bdde3ab73e", - "reference": "48325096bbda77b983e642d21a4dd9bdde3ab73e", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/1c2a82d6a8ec9b354fe4ef48ad1ad3f1a4f7db0e", + "reference": "1c2a82d6a8ec9b354fe4ef48ad1ad3f1a4f7db0e", "shasum": "" }, "require": { @@ -3255,7 +3255,7 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2017-12-15 02:05:18" + "time": "2018-01-05 08:33:00" }, { "name": "symfony/polyfill-mbstring", @@ -3540,16 +3540,16 @@ }, { "name": "symfony/process", - "version": "v3.4.2", + "version": "v3.4.3", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "bb3ef65d493a6d57297cad6c560ee04e2a8f5098" + "reference": "ff69f110c6b33fd33cd2089ba97d6112f44ef0ba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/bb3ef65d493a6d57297cad6c560ee04e2a8f5098", - "reference": "bb3ef65d493a6d57297cad6c560ee04e2a8f5098", + "url": "https://api.github.com/repos/symfony/process/zipball/ff69f110c6b33fd33cd2089ba97d6112f44ef0ba", + "reference": "ff69f110c6b33fd33cd2089ba97d6112f44ef0ba", "shasum": "" }, "require": { @@ -3585,20 +3585,20 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2017-12-14 19:40:10" + "time": "2018-01-03 07:37:34" }, { "name": "symfony/translation", - "version": "v3.4.2", + "version": "v3.4.3", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "4c5d5582baf2829751a5207659329c1f52eedeb6" + "reference": "17b5962d252b2d6d1d37a2485ebb7ddc5b2bef0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/4c5d5582baf2829751a5207659329c1f52eedeb6", - "reference": "4c5d5582baf2829751a5207659329c1f52eedeb6", + "url": "https://api.github.com/repos/symfony/translation/zipball/17b5962d252b2d6d1d37a2485ebb7ddc5b2bef0a", + "reference": "17b5962d252b2d6d1d37a2485ebb7ddc5b2bef0a", "shasum": "" }, "require": { @@ -3653,20 +3653,20 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2017-12-12 08:27:14" + "time": "2018-01-03 07:37:34" }, { "name": "symfony/var-dumper", - "version": "v4.0.2", + "version": "v4.0.3", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "0991597a40f062bab7203efc2cc6cee9b3d44ed6" + "reference": "883f6109a2069773e088c08626b87a3d3d61c566" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/0991597a40f062bab7203efc2cc6cee9b3d44ed6", - "reference": "0991597a40f062bab7203efc2cc6cee9b3d44ed6", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/883f6109a2069773e088c08626b87a3d3d61c566", + "reference": "883f6109a2069773e088c08626b87a3d3d61c566", "shasum": "" }, "require": { @@ -3722,7 +3722,7 @@ "debug", "dump" ], - "time": "2017-12-12 08:41:51" + "time": "2018-01-03 17:15:19" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -5073,16 +5073,16 @@ }, { "name": "phpunit/phpunit-mock-objects", - "version": "5.0.5", + "version": "5.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "283b9f4f670e3a6fd6c4ff95c51a952eb5c75933" + "reference": "33fd41a76e746b8fa96d00b49a23dadfa8334cdf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/283b9f4f670e3a6fd6c4ff95c51a952eb5c75933", - "reference": "283b9f4f670e3a6fd6c4ff95c51a952eb5c75933", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/33fd41a76e746b8fa96d00b49a23dadfa8334cdf", + "reference": "33fd41a76e746b8fa96d00b49a23dadfa8334cdf", "shasum": "" }, "require": { @@ -5128,7 +5128,7 @@ "mock", "xunit" ], - "time": "2017-12-10 08:01:53" + "time": "2018-01-06 05:45:45" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -5691,16 +5691,16 @@ }, { "name": "symfony/yaml", - "version": "v4.0.2", + "version": "v4.0.3", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "a5ee52d155f06ad23b19eb63c31228ff56ad1116" + "reference": "b84f646b9490d2101e2c25ddeec77ceefbda2eee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/a5ee52d155f06ad23b19eb63c31228ff56ad1116", - "reference": "a5ee52d155f06ad23b19eb63c31228ff56ad1116", + "url": "https://api.github.com/repos/symfony/yaml/zipball/b84f646b9490d2101e2c25ddeec77ceefbda2eee", + "reference": "b84f646b9490d2101e2c25ddeec77ceefbda2eee", "shasum": "" }, "require": { @@ -5745,7 +5745,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2017-12-12 08:41:51" + "time": "2018-01-03 07:38:00" }, { "name": "theseer/tokenizer", @@ -5841,8 +5841,7 @@ "aliases": [], "minimum-stability": "dev", "stability-flags": { - "vluzrmos/tinker": 20, - "albertcht/lumen-helpers": 20 + "vluzrmos/tinker": 20 }, "prefer-stable": true, "prefer-lowest": false, diff --git a/resources/assets/js/plugins/axios.js b/resources/assets/js/plugins/axios.js index 1eb0ee1..3b9652b 100644 --- a/resources/assets/js/plugins/axios.js +++ b/resources/assets/js/plugins/axios.js @@ -22,7 +22,18 @@ axios.interceptors.request.use(request => { }) // Response interceptor -axios.interceptors.response.use(response => response, error => { +axios.interceptors.response.use(response => { + const { authorization } = response.headers + + if (authorization) { + store.dispatch('auth/saveToken', { + token: authorization.split(' ').pop(), + remember: false + }) + } + + return response + }, error => { const { status } = error.response if (status >= 500) {