diff --git a/flexiapi/app/Configuration.php b/flexiapi/app/Configuration.php new file mode 100644 index 0000000..cd93298 --- /dev/null +++ b/flexiapi/app/Configuration.php @@ -0,0 +1,11 @@ + '@' . config('app.sip_domain') + 'domain' => '@' . config('app.sip_domain'), + 'configuration' => Configuration::first() ]); } diff --git a/flexiapi/app/Http/Controllers/Admin/ConfigurationController.php b/flexiapi/app/Http/Controllers/Admin/ConfigurationController.php new file mode 100644 index 0000000..efb770d --- /dev/null +++ b/flexiapi/app/Http/Controllers/Admin/ConfigurationController.php @@ -0,0 +1,34 @@ + $configuration + ]); + } + + public function update(Request $request) + { + $configuration = Configuration::first(); + if (!$configuration) $configuration = new Configuration; + + $configuration->copyright = $request->get('copyright'); + $configuration->intro_registration = $request->get('intro_registration'); + $configuration->custom_theme = $request->input('custom_theme', false); + $configuration->save(); + + return redirect()->route('admin.configuration.update'); + } +} diff --git a/flexiapi/app/Http/Middleware/AuthenticateAdmin.php b/flexiapi/app/Http/Middleware/AuthenticateAdmin.php index 624f5c4..afe4b01 100644 --- a/flexiapi/app/Http/Middleware/AuthenticateAdmin.php +++ b/flexiapi/app/Http/Middleware/AuthenticateAdmin.php @@ -15,6 +15,10 @@ class AuthenticateAdmin */ public function handle($request, Closure $next) { + if (!$request->user()) { + return redirect()->route('account.login'); + } + if (!$request->user()->isAdmin()) { return abort(403, 'Unauthorized area'); } diff --git a/flexiapi/composer.lock b/flexiapi/composer.lock index 3f2b1d1..b38242e 100644 --- a/flexiapi/composer.lock +++ b/flexiapi/composer.lock @@ -101,33 +101,38 @@ }, { "name": "doctrine/inflector", - "version": "1.3.1", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "ec3a55242203ffa6a4b27c58176da97ff0a7aec1" + "reference": "4111f6853aea6f28b2b1dcfdde83d12dd3d5e6e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/ec3a55242203ffa6a4b27c58176da97ff0a7aec1", - "reference": "ec3a55242203ffa6a4b27c58176da97ff0a7aec1", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/4111f6853aea6f28b2b1dcfdde83d12dd3d5e6e3", + "reference": "4111f6853aea6f28b2b1dcfdde83d12dd3d5e6e3", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.2" }, "require-dev": { - "phpunit/phpunit": "^6.2" + "doctrine/coding-standard": "^7.0", + "phpstan/phpstan": "^0.11", + "phpstan/phpstan-phpunit": "^0.11", + "phpstan/phpstan-strict-rules": "^0.11", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { "psr-4": { - "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" + "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector", + "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" } }, "notification-url": "https://packagist.org/downloads/", @@ -156,15 +161,35 @@ "email": "schmittjoh@gmail.com" } ], - "description": "Common String Manipulations with regard to casing and singular/plural rules.", - "homepage": "http://www.doctrine-project.org", + "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", + "homepage": "https://www.doctrine-project.org/projects/inflector.html", "keywords": [ "inflection", - "pluralize", - "singularize", - "string" + "inflector", + "lowercase", + "manipulation", + "php", + "plural", + "singular", + "strings", + "uppercase", + "words" ], - "time": "2019-10-30T19:59:35+00:00" + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finflector", + "type": "tidelift" + } + ], + "time": "2020-05-09T15:09:09+00:00" }, { "name": "doctrine/lexer", @@ -396,16 +421,16 @@ }, { "name": "giggsey/libphonenumber-for-php", - "version": "8.12.1", + "version": "8.12.3", "source": { "type": "git", "url": "https://github.com/giggsey/libphonenumber-for-php.git", - "reference": "198dffa12831e17320207ce1bd3b121402d2cc8d" + "reference": "efe098354b5dd49a5457d9e35aa92298de736343" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/giggsey/libphonenumber-for-php/zipball/198dffa12831e17320207ce1bd3b121402d2cc8d", - "reference": "198dffa12831e17320207ce1bd3b121402d2cc8d", + "url": "https://api.github.com/repos/giggsey/libphonenumber-for-php/zipball/efe098354b5dd49a5457d9e35aa92298de736343", + "reference": "efe098354b5dd49a5457d9e35aa92298de736343", "shasum": "" }, "require": { @@ -460,7 +485,7 @@ "phonenumber", "validation" ], - "time": "2020-03-30T08:29:12+00:00" + "time": "2020-05-06T11:46:14+00:00" }, { "name": "giggsey/locale", @@ -702,16 +727,16 @@ }, { "name": "laravel/framework", - "version": "v6.18.5", + "version": "v6.18.13", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "5b7f541a3c075b394793f4d7884a24ad6f00288a" + "reference": "39519d03237a81380e2126d667e898e2922db444" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/5b7f541a3c075b394793f4d7884a24ad6f00288a", - "reference": "5b7f541a3c075b394793f4d7884a24ad6f00288a", + "url": "https://api.github.com/repos/laravel/framework/zipball/39519d03237a81380e2126d667e898e2922db444", + "reference": "39519d03237a81380e2126d667e898e2922db444", "shasum": "" }, "require": { @@ -844,7 +869,7 @@ "framework", "laravel" ], - "time": "2020-04-07T18:54:55+00:00" + "time": "2020-05-05T15:53:49+00:00" }, { "name": "laravel/tinker", @@ -980,16 +1005,16 @@ }, { "name": "league/commonmark", - "version": "1.3.3", + "version": "1.4.3", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "5a67afc2572ec6d430526cdc9c637ef124812389" + "reference": "412639f7cfbc0b31ad2455b2fe965095f66ae505" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/5a67afc2572ec6d430526cdc9c637ef124812389", - "reference": "5a67afc2572ec6d430526cdc9c637ef124812389", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/412639f7cfbc0b31ad2455b2fe965095f66ae505", + "reference": "412639f7cfbc0b31ad2455b2fe965095f66ae505", "shasum": "" }, "require": { @@ -1007,7 +1032,7 @@ "github/gfm": "0.29.0", "michelf/php-markdown": "~1.4", "mikehaertl/php-shellcommand": "^1.4", - "phpstan/phpstan-shim": "^0.11.5", + "phpstan/phpstan": "^0.12", "phpunit/phpunit": "^7.5", "scrutinizer/ocular": "^1.5", "symfony/finder": "^4.2" @@ -1051,6 +1076,18 @@ "parser" ], "funding": [ + { + "url": "https://enjoy.gitstore.app/repositories/thephpleague/commonmark", + "type": "custom" + }, + { + "url": "https://www.colinodell.com/sponsor", + "type": "custom" + }, + { + "url": "https://www.paypal.me/colinpodell/10.00", + "type": "custom" + }, { "url": "https://github.com/colinodell", "type": "github" @@ -1060,24 +1097,24 @@ "type": "patreon" }, { - "url": "https://tidelift.com/funding/github/packagist/league%2fcommonmark", + "url": "https://tidelift.com/funding/github/packagist/league/commonmark", "type": "tidelift" } ], - "time": "2020-04-05T16:01:48+00:00" + "time": "2020-05-04T22:15:21+00:00" }, { "name": "league/flysystem", - "version": "1.0.66", + "version": "1.0.67", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "021569195e15f8209b1c4bebb78bd66aa4f08c21" + "reference": "5b1f36c75c4bdde981294c2a0ebdb437ee6f275e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/021569195e15f8209b1c4bebb78bd66aa4f08c21", - "reference": "021569195e15f8209b1c4bebb78bd66aa4f08c21", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/5b1f36c75c4bdde981294c2a0ebdb437ee6f275e", + "reference": "5b1f36c75c4bdde981294c2a0ebdb437ee6f275e", "shasum": "" }, "require": { @@ -1154,7 +1191,7 @@ "type": "other" } ], - "time": "2020-03-17T18:58:12+00:00" + "time": "2020-04-16T13:21:26+00:00" }, { "name": "league/iso3166", @@ -1293,21 +1330,22 @@ }, { "name": "nesbot/carbon", - "version": "2.32.2", + "version": "2.33.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "f10e22cf546704fab1db4ad4b9dedbc5c797a0dc" + "reference": "4d93cb95a80d9ffbff4018fe58ae3b7dd7f4b99b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/f10e22cf546704fab1db4ad4b9dedbc5c797a0dc", - "reference": "f10e22cf546704fab1db4ad4b9dedbc5c797a0dc", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4d93cb95a80d9ffbff4018fe58ae3b7dd7f4b99b", + "reference": "4d93cb95a80d9ffbff4018fe58ae3b7dd7f4b99b", "shasum": "" }, "require": { "ext-json": "*", "php": "^7.1.8 || ^8.0", + "symfony/polyfill-mbstring": "^1.0", "symfony/translation": "^3.4 || ^4.0 || ^5.0" }, "require-dev": { @@ -1370,20 +1408,20 @@ "type": "tidelift" } ], - "time": "2020-03-31T13:43:19+00:00" + "time": "2020-04-20T15:05:43+00:00" }, { "name": "nikic/php-parser", - "version": "v4.3.0", + "version": "v4.4.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "9a9981c347c5c49d6dfe5cf826bb882b824080dc" + "reference": "bd43ec7152eaaab3bd8c6d0aa95ceeb1df8ee120" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/9a9981c347c5c49d6dfe5cf826bb882b824080dc", - "reference": "9a9981c347c5c49d6dfe5cf826bb882b824080dc", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/bd43ec7152eaaab3bd8c6d0aa95ceeb1df8ee120", + "reference": "bd43ec7152eaaab3bd8c6d0aa95ceeb1df8ee120", "shasum": "" }, "require": { @@ -1422,7 +1460,7 @@ "parser", "php" ], - "time": "2019-11-08T13:50:10+00:00" + "time": "2020-04-10T16:34:50+00:00" }, { "name": "opis/closure", @@ -1877,16 +1915,16 @@ }, { "name": "psy/psysh", - "version": "v0.10.3", + "version": "v0.10.4", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "2bde2fa03e05dff0aee834598b951d6fc7c6fe02" + "reference": "a8aec1b2981ab66882a01cce36a49b6317dc3560" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/2bde2fa03e05dff0aee834598b951d6fc7c6fe02", - "reference": "2bde2fa03e05dff0aee834598b951d6fc7c6fe02", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/a8aec1b2981ab66882a01cce36a49b6317dc3560", + "reference": "a8aec1b2981ab66882a01cce36a49b6317dc3560", "shasum": "" }, "require": { @@ -1945,7 +1983,7 @@ "interactive", "shell" ], - "time": "2020-04-07T06:44:48+00:00" + "time": "2020-05-03T19:32:03+00:00" }, { "name": "ralouphie/getallheaders", @@ -2138,7 +2176,7 @@ }, { "name": "symfony/console", - "version": "v4.4.7", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", @@ -2228,7 +2266,7 @@ }, { "name": "symfony/css-selector", - "version": "v5.0.7", + "version": "v5.0.8", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", @@ -2295,7 +2333,7 @@ }, { "name": "symfony/debug", - "version": "v4.4.7", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", @@ -2365,7 +2403,7 @@ }, { "name": "symfony/error-handler", - "version": "v4.4.7", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", @@ -2435,7 +2473,7 @@ }, { "name": "symfony/event-dispatcher", - "version": "v4.4.7", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", @@ -2577,7 +2615,7 @@ }, { "name": "symfony/finder", - "version": "v4.4.7", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", @@ -2640,16 +2678,16 @@ }, { "name": "symfony/http-foundation", - "version": "v4.4.7", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "62f92509c9abfd1f73e17b8cf1b72c0bdac6611b" + "reference": "ec5bd254c223786f5fa2bb49a1e705c1b8e7cee2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/62f92509c9abfd1f73e17b8cf1b72c0bdac6611b", - "reference": "62f92509c9abfd1f73e17b8cf1b72c0bdac6611b", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/ec5bd254c223786f5fa2bb49a1e705c1b8e7cee2", + "reference": "ec5bd254c223786f5fa2bb49a1e705c1b8e7cee2", "shasum": "" }, "require": { @@ -2705,20 +2743,20 @@ "type": "tidelift" } ], - "time": "2020-03-30T14:07:33+00:00" + "time": "2020-04-18T20:40:08+00:00" }, { "name": "symfony/http-kernel", - "version": "v4.4.7", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "f356a489e51856b99908005eb7f2c51a1dfc95dc" + "reference": "1799a6c01f0db5851f399151abdb5d6393fec277" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/f356a489e51856b99908005eb7f2c51a1dfc95dc", - "reference": "f356a489e51856b99908005eb7f2c51a1dfc95dc", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/1799a6c01f0db5851f399151abdb5d6393fec277", + "reference": "1799a6c01f0db5851f399151abdb5d6393fec277", "shasum": "" }, "require": { @@ -2809,20 +2847,20 @@ "type": "tidelift" } ], - "time": "2020-03-30T14:59:15+00:00" + "time": "2020-04-28T18:47:42+00:00" }, { "name": "symfony/mime", - "version": "v5.0.7", + "version": "v5.0.8", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "481b7d6da88922fb1e0d86a943987722b08f3955" + "reference": "5d6c81c39225a750f3f43bee15f03093fb9aaa0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/481b7d6da88922fb1e0d86a943987722b08f3955", - "reference": "481b7d6da88922fb1e0d86a943987722b08f3955", + "url": "https://api.github.com/repos/symfony/mime/zipball/5d6c81c39225a750f3f43bee15f03093fb9aaa0b", + "reference": "5d6c81c39225a750f3f43bee15f03093fb9aaa0b", "shasum": "" }, "require": { @@ -2885,20 +2923,20 @@ "type": "tidelift" } ], - "time": "2020-03-27T16:56:45+00:00" + "time": "2020-04-17T03:29:44+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.15.0", + "version": "v1.16.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14" + "reference": "1aab00e39cebaef4d8652497f46c15c1b7e45294" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/4719fa9c18b0464d399f1a63bf624b42b6fa8d14", - "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1aab00e39cebaef4d8652497f46c15c1b7e45294", + "reference": "1aab00e39cebaef4d8652497f46c15c1b7e45294", "shasum": "" }, "require": { @@ -2910,7 +2948,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.16-dev" } }, "autoload": { @@ -2957,20 +2995,20 @@ "type": "tidelift" } ], - "time": "2020-02-27T09:26:54+00:00" + "time": "2020-05-08T16:50:20+00:00" }, { "name": "symfony/polyfill-iconv", - "version": "v1.15.0", + "version": "v1.16.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "ad6d62792bfbcfc385dd34b424d4fcf9712a32c8" + "reference": "d51debc1391a609c514f6f072dd59a61b461502a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/ad6d62792bfbcfc385dd34b424d4fcf9712a32c8", - "reference": "ad6d62792bfbcfc385dd34b424d4fcf9712a32c8", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/d51debc1391a609c514f6f072dd59a61b461502a", + "reference": "d51debc1391a609c514f6f072dd59a61b461502a", "shasum": "" }, "require": { @@ -2982,7 +3020,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.16-dev" } }, "autoload": { @@ -3030,20 +3068,20 @@ "type": "tidelift" } ], - "time": "2020-03-09T19:04:49+00:00" + "time": "2020-05-08T16:50:20+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.15.0", + "version": "v1.16.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf" + "reference": "ab0af41deab94ec8dceb3d1fb408bdd038eba4dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf", - "reference": "47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/ab0af41deab94ec8dceb3d1fb408bdd038eba4dc", + "reference": "ab0af41deab94ec8dceb3d1fb408bdd038eba4dc", "shasum": "" }, "require": { @@ -3057,7 +3095,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.16-dev" } }, "autoload": { @@ -3106,20 +3144,20 @@ "type": "tidelift" } ], - "time": "2020-03-09T19:04:49+00:00" + "time": "2020-05-08T16:50:20+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.15.0", + "version": "v1.16.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac" + "reference": "a54881ec0ab3b2005c406aed0023c062879031e7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/81ffd3a9c6d707be22e3012b827de1c9775fc5ac", - "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a54881ec0ab3b2005c406aed0023c062879031e7", + "reference": "a54881ec0ab3b2005c406aed0023c062879031e7", "shasum": "" }, "require": { @@ -3131,7 +3169,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.16-dev" } }, "autoload": { @@ -3179,20 +3217,20 @@ "type": "tidelift" } ], - "time": "2020-03-09T19:04:49+00:00" + "time": "2020-05-08T16:50:20+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.15.0", + "version": "v1.16.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "37b0976c78b94856543260ce09b460a7bc852747" + "reference": "42fda6d7380e5c940d7f68341ccae89d5ab9963b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/37b0976c78b94856543260ce09b460a7bc852747", - "reference": "37b0976c78b94856543260ce09b460a7bc852747", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/42fda6d7380e5c940d7f68341ccae89d5ab9963b", + "reference": "42fda6d7380e5c940d7f68341ccae89d5ab9963b", "shasum": "" }, "require": { @@ -3201,7 +3239,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.16-dev" } }, "autoload": { @@ -3248,20 +3286,20 @@ "type": "tidelift" } ], - "time": "2020-02-27T09:26:54+00:00" + "time": "2020-05-08T17:28:34+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.15.0", + "version": "v1.16.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7" + "reference": "7e95fe59d12169fcf4041487e4bf34fca37ee0ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7", - "reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/7e95fe59d12169fcf4041487e4bf34fca37ee0ed", + "reference": "7e95fe59d12169fcf4041487e4bf34fca37ee0ed", "shasum": "" }, "require": { @@ -3270,7 +3308,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.16-dev" } }, "autoload": { @@ -3320,20 +3358,20 @@ "type": "tidelift" } ], - "time": "2020-02-27T09:26:54+00:00" + "time": "2020-05-02T14:56:09+00:00" }, { "name": "symfony/process", - "version": "v4.4.7", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "3e40e87a20eaf83a1db825e1fa5097ae89042db3" + "reference": "4b6a9a4013baa65d409153cbb5a895bf093dc7f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/3e40e87a20eaf83a1db825e1fa5097ae89042db3", - "reference": "3e40e87a20eaf83a1db825e1fa5097ae89042db3", + "url": "https://api.github.com/repos/symfony/process/zipball/4b6a9a4013baa65d409153cbb5a895bf093dc7f4", + "reference": "4b6a9a4013baa65d409153cbb5a895bf093dc7f4", "shasum": "" }, "require": { @@ -3383,20 +3421,20 @@ "type": "tidelift" } ], - "time": "2020-03-27T16:54:36+00:00" + "time": "2020-04-15T15:56:18+00:00" }, { "name": "symfony/routing", - "version": "v4.4.7", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "0f562fa613e288d7dbae6c63abbc9b33ed75a8f8" + "reference": "67b4e1f99c050cbc310b8f3d0dbdc4b0212c052c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/0f562fa613e288d7dbae6c63abbc9b33ed75a8f8", - "reference": "0f562fa613e288d7dbae6c63abbc9b33ed75a8f8", + "url": "https://api.github.com/repos/symfony/routing/zipball/67b4e1f99c050cbc310b8f3d0dbdc4b0212c052c", + "reference": "67b4e1f99c050cbc310b8f3d0dbdc4b0212c052c", "shasum": "" }, "require": { @@ -3473,7 +3511,7 @@ "type": "tidelift" } ], - "time": "2020-03-30T11:41:10+00:00" + "time": "2020-04-21T19:59:53+00:00" }, { "name": "symfony/service-contracts", @@ -3535,16 +3573,16 @@ }, { "name": "symfony/translation", - "version": "v4.4.7", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "4e54d336f2eca5facad449d0b0118bb449375b76" + "reference": "8272bbd2b7e220ef812eba2a2b30068a5c64b191" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/4e54d336f2eca5facad449d0b0118bb449375b76", - "reference": "4e54d336f2eca5facad449d0b0118bb449375b76", + "url": "https://api.github.com/repos/symfony/translation/zipball/8272bbd2b7e220ef812eba2a2b30068a5c64b191", + "reference": "8272bbd2b7e220ef812eba2a2b30068a5c64b191", "shasum": "" }, "require": { @@ -3621,7 +3659,7 @@ "type": "tidelift" } ], - "time": "2020-03-27T16:54:36+00:00" + "time": "2020-04-12T16:45:36+00:00" }, { "name": "symfony/translation-contracts", @@ -3682,16 +3720,16 @@ }, { "name": "symfony/var-dumper", - "version": "v4.4.7", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "5a0c2d93006131a36cf6f767d10e2ca8333b0d4a" + "reference": "c587e04ce5d1aa62d534a038f574d9a709e814cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/5a0c2d93006131a36cf6f767d10e2ca8333b0d4a", - "reference": "5a0c2d93006131a36cf6f767d10e2ca8333b0d4a", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/c587e04ce5d1aa62d534a038f574d9a709e814cf", + "reference": "c587e04ce5d1aa62d534a038f574d9a709e814cf", "shasum": "" }, "require": { @@ -3768,7 +3806,7 @@ "type": "tidelift" } ], - "time": "2020-03-27T16:54:36+00:00" + "time": "2020-04-12T16:14:02+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -3821,20 +3859,20 @@ }, { "name": "vlucas/phpdotenv", - "version": "v3.6.2", + "version": "v3.6.4", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "786a947e57086cf236cefdee80784634224b99fa" + "reference": "10d3f853fdf1f3a6b3c7ea0c4620d2f699713db5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/786a947e57086cf236cefdee80784634224b99fa", - "reference": "786a947e57086cf236cefdee80784634224b99fa", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/10d3f853fdf1f3a6b3c7ea0c4620d2f699713db5", + "reference": "10d3f853fdf1f3a6b3c7ea0c4620d2f699713db5", "shasum": "" }, "require": { - "php": "^5.4 || ^7.0", + "php": "^5.4 || ^7.0 || ^8.0", "phpoption/phpoption": "^1.5", "symfony/polyfill-ctype": "^1.9" }, @@ -3881,12 +3919,16 @@ "environment" ], "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", "type": "tidelift" } ], - "time": "2020-03-27T23:36:02+00:00" + "time": "2020-05-02T13:46:13+00:00" } ], "packages-dev": [ @@ -4123,16 +4165,16 @@ }, { "name": "filp/whoops", - "version": "2.7.1", + "version": "2.7.2", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "fff6f1e4f36be0e0d0b84d66b413d9dcb0c49130" + "reference": "17d0d3f266c8f925ebd035cd36f83cf802b47d4a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/fff6f1e4f36be0e0d0b84d66b413d9dcb0c49130", - "reference": "fff6f1e4f36be0e0d0b84d66b413d9dcb0c49130", + "url": "https://api.github.com/repos/filp/whoops/zipball/17d0d3f266c8f925ebd035cd36f83cf802b47d4a", + "reference": "17d0d3f266c8f925ebd035cd36f83cf802b47d4a", "shasum": "" }, "require": { @@ -4180,7 +4222,7 @@ "throwable", "whoops" ], - "time": "2020-01-15T10:00:00+00:00" + "time": "2020-05-05T12:28:07+00:00" }, { "name": "fzaninotto/faker", @@ -4651,24 +4693,21 @@ }, { "name": "phpdocumentor/reflection-common", - "version": "2.0.0", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a" + "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/6568f4687e5b41b054365f9ae03fcb1ed5f2069b", + "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b", "shasum": "" }, "require": { "php": ">=7.1" }, - "require-dev": { - "phpunit/phpunit": "~6" - }, "type": "library", "extra": { "branch-alias": { @@ -4699,7 +4738,7 @@ "reflection", "static analysis" ], - "time": "2018-08-07T13:53:10+00:00" + "time": "2020-04-27T09:25:28+00:00" }, { "name": "phpdocumentor/reflection-docblock", @@ -5117,16 +5156,16 @@ }, { "name": "phpunit/phpunit", - "version": "8.5.3", + "version": "8.5.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "67750516bc02f300e2742fed2f50177f8f37bedf" + "reference": "8474e22d7d642f665084ba5ec780626cbd1efd23" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/67750516bc02f300e2742fed2f50177f8f37bedf", - "reference": "67750516bc02f300e2742fed2f50177f8f37bedf", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/8474e22d7d642f665084ba5ec780626cbd1efd23", + "reference": "8474e22d7d642f665084ba5ec780626cbd1efd23", "shasum": "" }, "require": { @@ -5206,7 +5245,7 @@ "type": "github" } ], - "time": "2020-03-31T08:52:04+00:00" + "time": "2020-04-23T04:39:42+00:00" }, { "name": "scrivo/highlight.php", @@ -5940,16 +5979,16 @@ }, { "name": "webmozart/assert", - "version": "1.7.0", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "aed98a490f9a8f78468232db345ab9cf606cf598" + "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/aed98a490f9a8f78468232db345ab9cf606cf598", - "reference": "aed98a490f9a8f78468232db345ab9cf606cf598", + "url": "https://api.github.com/repos/webmozart/assert/zipball/ab2cb0b3b559010b75981b1bdce728da3ee90ad6", + "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6", "shasum": "" }, "require": { @@ -5957,7 +5996,7 @@ "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "vimeo/psalm": "<3.6.0" + "vimeo/psalm": "<3.9.1" }, "require-dev": { "phpunit/phpunit": "^4.8.36 || ^7.5.13" @@ -5984,7 +6023,7 @@ "check", "validate" ], - "time": "2020-02-14T12:15:55+00:00" + "time": "2020-04-18T12:12:48+00:00" } ], "aliases": [], diff --git a/flexiapi/database/migrations/2014_10_12_000000_create_users_table.php b/flexiapi/database/migrations/2014_10_12_000000_create_users_table.php index 66c62da..5e8f91d 100644 --- a/flexiapi/database/migrations/2014_10_12_000000_create_users_table.php +++ b/flexiapi/database/migrations/2014_10_12_000000_create_users_table.php @@ -6,11 +6,6 @@ use Illuminate\Support\Facades\Schema; class CreateUsersTable extends Migration { - /** - * Run the migrations. - * - * @return void - */ public function up() { Schema::connection('local')->create('users', function (Blueprint $table) { @@ -24,11 +19,6 @@ class CreateUsersTable extends Migration }); } - /** - * Reverse the migrations. - * - * @return void - */ public function down() { Schema::connection('local')->dropIfExists('users'); diff --git a/flexiapi/database/migrations/2014_10_12_100000_create_password_resets_table.php b/flexiapi/database/migrations/2014_10_12_100000_create_password_resets_table.php index d9fe4be..23d6533 100644 --- a/flexiapi/database/migrations/2014_10_12_100000_create_password_resets_table.php +++ b/flexiapi/database/migrations/2014_10_12_100000_create_password_resets_table.php @@ -6,11 +6,6 @@ use Illuminate\Support\Facades\Schema; class CreatePasswordResetsTable extends Migration { - /** - * Run the migrations. - * - * @return void - */ public function up() { Schema::connection('local')->create('password_resets', function (Blueprint $table) { @@ -20,11 +15,6 @@ class CreatePasswordResetsTable extends Migration }); } - /** - * Reverse the migrations. - * - * @return void - */ public function down() { Schema::connection('local')->dropIfExists('password_resets'); diff --git a/flexiapi/database/migrations/2019_08_19_000000_create_failed_jobs_table.php b/flexiapi/database/migrations/2019_08_19_000000_create_failed_jobs_table.php index abd81c3..6ed8e32 100644 --- a/flexiapi/database/migrations/2019_08_19_000000_create_failed_jobs_table.php +++ b/flexiapi/database/migrations/2019_08_19_000000_create_failed_jobs_table.php @@ -6,11 +6,6 @@ use Illuminate\Support\Facades\Schema; class CreateFailedJobsTable extends Migration { - /** - * Run the migrations. - * - * @return void - */ public function up() { Schema::connection('local')->create('failed_jobs', function (Blueprint $table) { @@ -23,11 +18,6 @@ class CreateFailedJobsTable extends Migration }); } - /** - * Reverse the migrations. - * - * @return void - */ public function down() { Schema::connection('local')->dropIfExists('failed_jobs'); diff --git a/flexiapi/database/migrations/2020_01_23_125119_create_accounts_passwords_tables.php b/flexiapi/database/migrations/2020_01_23_125119_create_accounts_passwords_tables.php index 6a3b97d..087b964 100644 --- a/flexiapi/database/migrations/2020_01_23_125119_create_accounts_passwords_tables.php +++ b/flexiapi/database/migrations/2020_01_23_125119_create_accounts_passwords_tables.php @@ -23,11 +23,6 @@ use Illuminate\Support\Facades\Schema; class CreateAccountsPasswordsTables extends Migration { - /** - * Run the migrations. - * - * @return void - */ public function up() { if (!Schema::connection('external')->hasTable('accounts')) { @@ -61,11 +56,6 @@ class CreateAccountsPasswordsTables extends Migration } } - /** - * Reverse the migrations. - * - * @return void - */ public function down() { //Schema::connection('external')->dropIfExists('passwords'); diff --git a/flexiapi/database/migrations/2020_01_28_100553_create_nonces_digest_table.php b/flexiapi/database/migrations/2020_01_28_100553_create_nonces_digest_table.php index 6f4a8ac..8cc54e9 100644 --- a/flexiapi/database/migrations/2020_01_28_100553_create_nonces_digest_table.php +++ b/flexiapi/database/migrations/2020_01_28_100553_create_nonces_digest_table.php @@ -23,11 +23,6 @@ use Illuminate\Support\Facades\Schema; class CreateNoncesDigestTable extends Migration { - /** - * Run the migrations. - * - * @return void - */ public function up() { Schema::connection('local')->create('nonces', function (Blueprint $table) { @@ -39,11 +34,6 @@ class CreateNoncesDigestTable extends Migration }); } - /** - * Reverse the migrations. - * - * @return void - */ public function down() { Schema::connection('local')->dropIfExists('nonces'); diff --git a/flexiapi/database/migrations/2020_05_05_150015_create_configuration_table.php b/flexiapi/database/migrations/2020_05_05_150015_create_configuration_table.php new file mode 100644 index 0000000..841d792 --- /dev/null +++ b/flexiapi/database/migrations/2020_05_05_150015_create_configuration_table.php @@ -0,0 +1,24 @@ +bigIncrements('id'); + $table->string('copyright')->nullable(); + $table->text('intro_registration')->nullable(); + $table->boolean('custom_theme')->default(false); + $table->timestamps(); + }); + } + + public function down() + { + Schema::dropIfExists('configuration'); + } +} diff --git a/flexiapi/public/css/style.css b/flexiapi/public/css/style.css index aeacf25..84c0d76 100644 --- a/flexiapi/public/css/style.css +++ b/flexiapi/public/css/style.css @@ -32,14 +32,14 @@ body > footer::before { background-position: bottom center; background-repeat: repeat-x; display: block; - height: 20rem; + height: 10rem; width: 100%; + background-size: 40rem; content: ''; } @media screen and (max-width: 991px) { - nav.navbar, - body > header::after { + nav.navbar { display: none; } } @@ -48,13 +48,13 @@ h1, h2, h3, a, label { color: #ff733b; } -nav a { +nav ul li a { color: white; opacity: 0.8; } -nav a:hover, -nav li.active a { +nav ul li a:hover, +nav ul li.active a { color: white; opacity: 1; } @@ -82,11 +82,11 @@ body > footer { } body > header::after { - margin-top: -5rem; - margin-bottom: -6rem; + background-position: top center; + margin-bottom: -4.5rem; } body > footer::before { background-image: url('/img/footer.svg'); - height: 15rem; + height: 9rem; } diff --git a/flexiapi/public/img/footer.svg b/flexiapi/public/img/footer.svg index 7348a26..e67609a 100644 --- a/flexiapi/public/img/footer.svg +++ b/flexiapi/public/img/footer.svg @@ -7,56 +7,56 @@ xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - sodipodi:docname="footer.svg" - inkscape:version="1.0rc1 (09960d6f05, 2020-04-09)" - id="svg8" + width="481.54166mm" + height="54.655354mm" + viewBox="0 0 481.54166 54.655354" version="1.1" - viewBox="0 0 481.34168 54.455357" - height="54.455357mm" - width="481.34167mm"> + id="svg8" + inkscape:version="1.0rc1 (09960d6f05, 2020-04-09)" + sodipodi:docname="footer.svg"> + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="1.98" + inkscape:cx="104.62963" + inkscape:cy="93.881695" + inkscape:document-units="mm" + inkscape:current-layer="g26" + inkscape:document-rotation="0" + showgrid="false" + showguides="true" + inkscape:guide-bbox="true" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" + inkscape:window-width="1920" + inkscape:window-height="1027" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="1"> + id="guide42" /> + id="guide44" /> + id="guide887" /> + id="guide889" /> @@ -71,31 +71,31 @@ + id="layer1" + transform="translate(327.89435,-68.791666)"> + id="g26" + transform="translate(9.2773437e-7,54.308819)"> - + - + + inkscape:connector-curvature="0" + sodipodi:nodetypes="cccccccccccccc" /> diff --git a/flexiapi/public/img/header.svg b/flexiapi/public/img/header.svg index 49c989d..96d0fdd 100644 --- a/flexiapi/public/img/header.svg +++ b/flexiapi/public/img/header.svg @@ -7,52 +7,61 @@ xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - sodipodi:docname="header.svg" - inkscape:version="1.0rc1 (09960d6f05, 2020-04-09)" - id="svg8" + width="412.97525mm" + height="78.5159mm" + viewBox="0 0 412.97525 78.515899" version="1.1" - viewBox="0 0 412.75 132.29167" - height="132.29167mm" - width="412.75mm"> + id="svg8" + inkscape:version="1.0rc1 (09960d6f05, 2020-04-09)" + sodipodi:docname="header.svg"> + borderopacity="1.0" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:zoom="4.88" + inkscape:cx="1531.633" + inkscape:cy="341.22006" + inkscape:document-units="mm" + inkscape:current-layer="layer1" + inkscape:document-rotation="0" + showgrid="false" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" + showguides="true" + inkscape:guide-bbox="true" + inkscape:window-width="1920" + inkscape:window-height="1027" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="1"> + id="guide847" /> + id="guide863" /> + id="guide865" /> + + @@ -67,33 +76,35 @@ + id="layer1" + transform="translate(175.38095,-215.17998)"> + width="412.97525" + height="78.5159" + x="-175.38095" + y="215.17998" /> + inkscape:connector-curvature="0" /> - + + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccccccccccc" /> diff --git a/flexiapi/resources/views/account/create_email_sent.blade.php b/flexiapi/resources/views/account/create_email_sent.blade.php deleted file mode 100644 index e69de29..0000000 diff --git a/flexiapi/resources/views/account/index.blade.php b/flexiapi/resources/views/account/index.blade.php index 83ba531..94d7d48 100644 --- a/flexiapi/resources/views/account/index.blade.php +++ b/flexiapi/resources/views/account/index.blade.php @@ -40,6 +40,12 @@

Manage the FlexiSIP accounts

+ +
+
Configuration
+
+

Configure the layout and other parameters

+
@endif diff --git a/flexiapi/resources/views/account/login.blade.php b/flexiapi/resources/views/account/login.blade.php index 5c029b4..f12508c 100644 --- a/flexiapi/resources/views/account/login.blade.php +++ b/flexiapi/resources/views/account/login.blade.php @@ -4,35 +4,31 @@ @if (Auth::check()) @include('parts.already_auth') @else -
-
- {!! Form::open(['route' => 'account.authenticate']) !!} -
- {!! Form::label('username', 'Username') !!} - {!! Form::text('username', old('username'), ['class' => 'form-control', 'placeholder' => 'username@'.config('app.sip_domain'), 'required']) !!} -
-
- {!! Form::label('password', 'Password') !!} - {!! Form::password('password', ['class' => 'form-control', 'placeholder' => 'myPassword', 'required']) !!} -
- -
-
- {!! Form::submit('Authenticate', ['class' => 'btn btn-primary']) !!} -
- -
-

- No account yet? - Register - -

-
-
- {!! Form::close() !!} - -

You can also authenticate using your Email address or your Phone number

+ {!! Form::open(['route' => 'account.authenticate']) !!} +
+ {!! Form::label('username', 'Username') !!} + {!! Form::text('username', old('username'), ['class' => 'form-control', 'placeholder' => 'username@'.config('app.sip_domain'), 'required']) !!}
-
+
+ {!! Form::label('password', 'Password') !!} + {!! Form::password('password', ['class' => 'form-control', 'placeholder' => 'myPassword', 'required']) !!} +
+ +
+
+ {!! Form::submit('Authenticate', ['class' => 'btn btn-primary']) !!} +
+ +
+

+ No account yet? + Register + +

+
+
+ {!! Form::close() !!} + +

You can also authenticate using your Email address or your Phone number

@endif @endsection \ No newline at end of file diff --git a/flexiapi/resources/views/account/register.blade.php b/flexiapi/resources/views/account/register.blade.php index a3f80f9..396d903 100644 --- a/flexiapi/resources/views/account/register.blade.php +++ b/flexiapi/resources/views/account/register.blade.php @@ -1,6 +1,10 @@ @extends('layouts.main') @section('content') + +@if ($configuration && !empty($configuration->intro_registration)) +

{!! nl2br($configuration->intro_registration) !!}

+@endif

You already have an account? Authenticate @@ -27,7 +31,7 @@


- {!! Form::label('email', 'New email') !!} + {!! Form::label('email', 'Email') !!} {!! Form::email('email', old('email'), ['class' => 'form-control', 'placeholder' => 'username@server.com']) !!}
diff --git a/flexiapi/resources/views/admin/configuration/edit.blade.php b/flexiapi/resources/views/admin/configuration/edit.blade.php new file mode 100644 index 0000000..f8c1682 --- /dev/null +++ b/flexiapi/resources/views/admin/configuration/edit.blade.php @@ -0,0 +1,32 @@ +@extends('layouts.account') + +@section('breadcrumb') + +@endsection + +@section('content') +

Configuration

+ +{!! Form::open(['route' => 'admin.configuration.update']) !!} +
+
+ {!! Form::label('copyright', 'Copyright') !!} + {!! Form::text('copyright', $configuration->copyright, ['class' => 'form-control', 'placeholder' => 'Copyright']) !!} +
+
+
+
+ {!! Form::label('intro_registration', 'Introduction text during Registration') !!} + {!! Form::textarea('intro_registration', $configuration->intro_registration, ['class' => 'form-control', 'placeholder' => 'Introduction text during registration']) !!} +
+
+
+ {!! Form::checkbox('custom_theme', 'checked', $configuration->custom_theme, ['class' => 'form-check-input', 'id' => 'custom_theme']) !!} + +
+
+ +
+{!! Form::close() !!} + +@endsection \ No newline at end of file diff --git a/flexiapi/resources/views/layouts/base.blade.php b/flexiapi/resources/views/layouts/base.blade.php index 90e4d1c..d705a00 100644 --- a/flexiapi/resources/views/layouts/base.blade.php +++ b/flexiapi/resources/views/layouts/base.blade.php @@ -1,4 +1,7 @@ + +@php $configuration = \App\Configuration::first() @endphp + @@ -6,7 +9,9 @@ {{ config('app.name') }} - + @if ($configuration && $configuration->custom_theme) + + @endif
@@ -14,7 +19,9 @@
@yield('body') diff --git a/flexiapi/routes/web.php b/flexiapi/routes/web.php index 9fc721e..cde2875 100644 --- a/flexiapi/routes/web.php +++ b/flexiapi/routes/web.php @@ -50,9 +50,13 @@ Route::group(['middleware' => 'auth'], function () { Route::group(['middleware' => 'auth.admin'], function () { Route::get('admin/accounts/{search?}', 'Admin\AccountController@index')->name('admin.account.index'); Route::post('admin/search', 'Admin\AccountController@search')->name('admin.account.search'); + Route::get('admin/accounts/show/{id}', 'Admin\AccountController@show')->name('admin.account.show'); Route::get('admin/accounts/{id}/activate', 'Admin\AccountController@activate')->name('admin.account.activate'); Route::get('admin/accounts/{id}/deactivate', 'Admin\AccountController@deactivate')->name('admin.account.deactivate'); Route::get('admin/accounts/{id}/admin', 'Admin\AccountController@admin')->name('admin.account.admin'); Route::get('admin/accounts/{id}/unadmin', 'Admin\AccountController@unadmin')->name('admin.account.unadmin'); + + Route::get('admin/configuration', 'Admin\ConfigurationController@edit')->name('admin.configuration.edit'); + Route::post('admin/configuration', 'Admin\ConfigurationController@update')->name('admin.configuration.update'); }); \ No newline at end of file