diff --git a/.bash-profile b/.bash-profile new file mode 100644 index 0000000..0775496 --- /dev/null +++ b/.bash-profile @@ -0,0 +1 @@ +export PATH=/Applications/MAMP/bin/php/php7.3.9/bin/:$PATH diff --git a/.idea/mein.sterntours.iml b/.idea/mein.sterntours.iml index 512c226..6321464 100644 --- a/.idea/mein.sterntours.iml +++ b/.idea/mein.sterntours.iml @@ -16,8 +16,12 @@ + + + + @@ -44,7 +48,6 @@ - diff --git a/.idea/php.xml b/.idea/php.xml index f1e68aa..8a2af3c 100644 --- a/.idea/php.xml +++ b/.idea/php.xml @@ -16,7 +16,6 @@ - @@ -92,7 +91,6 @@ - @@ -129,9 +127,13 @@ + + + + - + diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 817ada6..8c66a24 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,62 +2,15 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + @@ -77,11 +30,43 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -89,30 +74,56 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - + + + - - - + + - - - + + + @@ -121,6 +132,7 @@ + @@ -159,35 +171,27 @@ - - - - - - - - - + + + + + - - - - - - + - - - - - - + + + + + + + @@ -388,24 +394,24 @@ - + - - - - - - - + - + + + + + + + @@ -694,6 +700,20 @@ + + + + + + + + + + + + + + @@ -734,10 +754,10 @@ - + - + @@ -753,20 +773,20 @@ - + - + - - + + - + - + - + \ No newline at end of file diff --git a/.phpstorm.meta.php b/.phpstorm.meta.php index d1ca819..16c0b9d 100644 --- a/.phpstorm.meta.php +++ b/.phpstorm.meta.php @@ -5,7 +5,7 @@ namespace PHPSTORM_META { /** * PhpStorm Meta file, to provide autocomplete information for PhpStorm - * Generated on 2020-02-10 17:24:00. + * Generated on 2020-02-26 13:37:45. * * @author Barry vd. Heuvel * @see https://github.com/barryvdh/laravel-ide-helper @@ -41,8 +41,6 @@ namespace PHPSTORM_META { 'Maatwebsite\Excel\Transactions\TransactionManager' => \Maatwebsite\Excel\Transactions\TransactionManager::class, 'NunoMaduro\Collision\Contracts\Adapters\Phpunit\Listener' => \NunoMaduro\Collision\Adapters\Phpunit\Listener::class, 'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class, - 'Psr\Http\Message\ResponseInterface' => \Zend\Diactoros\Response::class, - 'Psr\Http\Message\ServerRequestInterface' => \Zend\Diactoros\ServerRequest::class, 'Reliese\Coders\Model\Factory' => \Reliese\Coders\Model\Factory::class, 'auth' => \Illuminate\Auth\AuthManager::class, 'auth.driver' => \Illuminate\Auth\SessionGuard::class, @@ -51,8 +49,6 @@ namespace PHPSTORM_META { 'blade.compiler' => \Illuminate\View\Compilers\BladeCompiler::class, 'cache' => \Illuminate\Cache\CacheManager::class, 'cache.store' => \Illuminate\Cache\Repository::class, - 'command.app.name' => \Illuminate\Foundation\Console\AppNameCommand::class, - 'command.auth.make' => \Illuminate\Auth\Console\AuthMakeCommand::class, 'command.auth.resets.clear' => \Illuminate\Auth\Console\ClearResetsCommand::class, 'command.cache.clear' => \Illuminate\Cache\Console\ClearCommand::class, 'command.cache.forget' => \Illuminate\Cache\Console\ForgetCommand::class, @@ -63,6 +59,7 @@ namespace PHPSTORM_META { 'command.config.clear' => \Illuminate\Foundation\Console\ConfigClearCommand::class, 'command.console.make' => \Illuminate\Foundation\Console\ConsoleMakeCommand::class, 'command.controller.make' => \Illuminate\Routing\Console\ControllerMakeCommand::class, + 'command.db.wipe' => \Illuminate\Database\Console\WipeCommand::class, 'command.debugbar.clear' => \Barryvdh\Debugbar\Console\ClearCommand::class, 'command.down' => \Illuminate\Foundation\Console\DownCommand::class, 'command.environment' => \Illuminate\Foundation\Console\EnvironmentCommand::class, @@ -205,8 +202,6 @@ namespace PHPSTORM_META { 'Maatwebsite\Excel\Transactions\TransactionManager' => \Maatwebsite\Excel\Transactions\TransactionManager::class, 'NunoMaduro\Collision\Contracts\Adapters\Phpunit\Listener' => \NunoMaduro\Collision\Adapters\Phpunit\Listener::class, 'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class, - 'Psr\Http\Message\ResponseInterface' => \Zend\Diactoros\Response::class, - 'Psr\Http\Message\ServerRequestInterface' => \Zend\Diactoros\ServerRequest::class, 'Reliese\Coders\Model\Factory' => \Reliese\Coders\Model\Factory::class, 'auth' => \Illuminate\Auth\AuthManager::class, 'auth.driver' => \Illuminate\Auth\SessionGuard::class, @@ -215,8 +210,6 @@ namespace PHPSTORM_META { 'blade.compiler' => \Illuminate\View\Compilers\BladeCompiler::class, 'cache' => \Illuminate\Cache\CacheManager::class, 'cache.store' => \Illuminate\Cache\Repository::class, - 'command.app.name' => \Illuminate\Foundation\Console\AppNameCommand::class, - 'command.auth.make' => \Illuminate\Auth\Console\AuthMakeCommand::class, 'command.auth.resets.clear' => \Illuminate\Auth\Console\ClearResetsCommand::class, 'command.cache.clear' => \Illuminate\Cache\Console\ClearCommand::class, 'command.cache.forget' => \Illuminate\Cache\Console\ForgetCommand::class, @@ -227,6 +220,7 @@ namespace PHPSTORM_META { 'command.config.clear' => \Illuminate\Foundation\Console\ConfigClearCommand::class, 'command.console.make' => \Illuminate\Foundation\Console\ConsoleMakeCommand::class, 'command.controller.make' => \Illuminate\Routing\Console\ControllerMakeCommand::class, + 'command.db.wipe' => \Illuminate\Database\Console\WipeCommand::class, 'command.debugbar.clear' => \Barryvdh\Debugbar\Console\ClearCommand::class, 'command.down' => \Illuminate\Foundation\Console\DownCommand::class, 'command.environment' => \Illuminate\Foundation\Console\EnvironmentCommand::class, @@ -369,8 +363,6 @@ namespace PHPSTORM_META { 'Maatwebsite\Excel\Transactions\TransactionManager' => \Maatwebsite\Excel\Transactions\TransactionManager::class, 'NunoMaduro\Collision\Contracts\Adapters\Phpunit\Listener' => \NunoMaduro\Collision\Adapters\Phpunit\Listener::class, 'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class, - 'Psr\Http\Message\ResponseInterface' => \Zend\Diactoros\Response::class, - 'Psr\Http\Message\ServerRequestInterface' => \Zend\Diactoros\ServerRequest::class, 'Reliese\Coders\Model\Factory' => \Reliese\Coders\Model\Factory::class, 'auth' => \Illuminate\Auth\AuthManager::class, 'auth.driver' => \Illuminate\Auth\SessionGuard::class, @@ -379,8 +371,6 @@ namespace PHPSTORM_META { 'blade.compiler' => \Illuminate\View\Compilers\BladeCompiler::class, 'cache' => \Illuminate\Cache\CacheManager::class, 'cache.store' => \Illuminate\Cache\Repository::class, - 'command.app.name' => \Illuminate\Foundation\Console\AppNameCommand::class, - 'command.auth.make' => \Illuminate\Auth\Console\AuthMakeCommand::class, 'command.auth.resets.clear' => \Illuminate\Auth\Console\ClearResetsCommand::class, 'command.cache.clear' => \Illuminate\Cache\Console\ClearCommand::class, 'command.cache.forget' => \Illuminate\Cache\Console\ForgetCommand::class, @@ -391,6 +381,7 @@ namespace PHPSTORM_META { 'command.config.clear' => \Illuminate\Foundation\Console\ConfigClearCommand::class, 'command.console.make' => \Illuminate\Foundation\Console\ConsoleMakeCommand::class, 'command.controller.make' => \Illuminate\Routing\Console\ControllerMakeCommand::class, + 'command.db.wipe' => \Illuminate\Database\Console\WipeCommand::class, 'command.debugbar.clear' => \Barryvdh\Debugbar\Console\ClearCommand::class, 'command.down' => \Illuminate\Foundation\Console\DownCommand::class, 'command.environment' => \Illuminate\Foundation\Console\EnvironmentCommand::class, @@ -533,8 +524,6 @@ namespace PHPSTORM_META { 'Maatwebsite\Excel\Transactions\TransactionManager' => \Maatwebsite\Excel\Transactions\TransactionManager::class, 'NunoMaduro\Collision\Contracts\Adapters\Phpunit\Listener' => \NunoMaduro\Collision\Adapters\Phpunit\Listener::class, 'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class, - 'Psr\Http\Message\ResponseInterface' => \Zend\Diactoros\Response::class, - 'Psr\Http\Message\ServerRequestInterface' => \Zend\Diactoros\ServerRequest::class, 'Reliese\Coders\Model\Factory' => \Reliese\Coders\Model\Factory::class, 'auth' => \Illuminate\Auth\AuthManager::class, 'auth.driver' => \Illuminate\Auth\SessionGuard::class, @@ -543,8 +532,6 @@ namespace PHPSTORM_META { 'blade.compiler' => \Illuminate\View\Compilers\BladeCompiler::class, 'cache' => \Illuminate\Cache\CacheManager::class, 'cache.store' => \Illuminate\Cache\Repository::class, - 'command.app.name' => \Illuminate\Foundation\Console\AppNameCommand::class, - 'command.auth.make' => \Illuminate\Auth\Console\AuthMakeCommand::class, 'command.auth.resets.clear' => \Illuminate\Auth\Console\ClearResetsCommand::class, 'command.cache.clear' => \Illuminate\Cache\Console\ClearCommand::class, 'command.cache.forget' => \Illuminate\Cache\Console\ForgetCommand::class, @@ -555,6 +542,7 @@ namespace PHPSTORM_META { 'command.config.clear' => \Illuminate\Foundation\Console\ConfigClearCommand::class, 'command.console.make' => \Illuminate\Foundation\Console\ConsoleMakeCommand::class, 'command.controller.make' => \Illuminate\Routing\Console\ControllerMakeCommand::class, + 'command.db.wipe' => \Illuminate\Database\Console\WipeCommand::class, 'command.debugbar.clear' => \Barryvdh\Debugbar\Console\ClearCommand::class, 'command.down' => \Illuminate\Foundation\Console\DownCommand::class, 'command.environment' => \Illuminate\Foundation\Console\EnvironmentCommand::class, @@ -697,8 +685,6 @@ namespace PHPSTORM_META { 'Maatwebsite\Excel\Transactions\TransactionManager' => \Maatwebsite\Excel\Transactions\TransactionManager::class, 'NunoMaduro\Collision\Contracts\Adapters\Phpunit\Listener' => \NunoMaduro\Collision\Adapters\Phpunit\Listener::class, 'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class, - 'Psr\Http\Message\ResponseInterface' => \Zend\Diactoros\Response::class, - 'Psr\Http\Message\ServerRequestInterface' => \Zend\Diactoros\ServerRequest::class, 'Reliese\Coders\Model\Factory' => \Reliese\Coders\Model\Factory::class, 'auth' => \Illuminate\Auth\AuthManager::class, 'auth.driver' => \Illuminate\Auth\SessionGuard::class, @@ -707,8 +693,6 @@ namespace PHPSTORM_META { 'blade.compiler' => \Illuminate\View\Compilers\BladeCompiler::class, 'cache' => \Illuminate\Cache\CacheManager::class, 'cache.store' => \Illuminate\Cache\Repository::class, - 'command.app.name' => \Illuminate\Foundation\Console\AppNameCommand::class, - 'command.auth.make' => \Illuminate\Auth\Console\AuthMakeCommand::class, 'command.auth.resets.clear' => \Illuminate\Auth\Console\ClearResetsCommand::class, 'command.cache.clear' => \Illuminate\Cache\Console\ClearCommand::class, 'command.cache.forget' => \Illuminate\Cache\Console\ForgetCommand::class, @@ -719,6 +703,7 @@ namespace PHPSTORM_META { 'command.config.clear' => \Illuminate\Foundation\Console\ConfigClearCommand::class, 'command.console.make' => \Illuminate\Foundation\Console\ConsoleMakeCommand::class, 'command.controller.make' => \Illuminate\Routing\Console\ControllerMakeCommand::class, + 'command.db.wipe' => \Illuminate\Database\Console\WipeCommand::class, 'command.debugbar.clear' => \Barryvdh\Debugbar\Console\ClearCommand::class, 'command.down' => \Illuminate\Foundation\Console\DownCommand::class, 'command.environment' => \Illuminate\Foundation\Console\EnvironmentCommand::class, @@ -861,8 +846,6 @@ namespace PHPSTORM_META { 'Maatwebsite\Excel\Transactions\TransactionManager' => \Maatwebsite\Excel\Transactions\TransactionManager::class, 'NunoMaduro\Collision\Contracts\Adapters\Phpunit\Listener' => \NunoMaduro\Collision\Adapters\Phpunit\Listener::class, 'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class, - 'Psr\Http\Message\ResponseInterface' => \Zend\Diactoros\Response::class, - 'Psr\Http\Message\ServerRequestInterface' => \Zend\Diactoros\ServerRequest::class, 'Reliese\Coders\Model\Factory' => \Reliese\Coders\Model\Factory::class, 'auth' => \Illuminate\Auth\AuthManager::class, 'auth.driver' => \Illuminate\Auth\SessionGuard::class, @@ -871,8 +854,6 @@ namespace PHPSTORM_META { 'blade.compiler' => \Illuminate\View\Compilers\BladeCompiler::class, 'cache' => \Illuminate\Cache\CacheManager::class, 'cache.store' => \Illuminate\Cache\Repository::class, - 'command.app.name' => \Illuminate\Foundation\Console\AppNameCommand::class, - 'command.auth.make' => \Illuminate\Auth\Console\AuthMakeCommand::class, 'command.auth.resets.clear' => \Illuminate\Auth\Console\ClearResetsCommand::class, 'command.cache.clear' => \Illuminate\Cache\Console\ClearCommand::class, 'command.cache.forget' => \Illuminate\Cache\Console\ForgetCommand::class, @@ -883,6 +864,7 @@ namespace PHPSTORM_META { 'command.config.clear' => \Illuminate\Foundation\Console\ConfigClearCommand::class, 'command.console.make' => \Illuminate\Foundation\Console\ConsoleMakeCommand::class, 'command.controller.make' => \Illuminate\Routing\Console\ControllerMakeCommand::class, + 'command.db.wipe' => \Illuminate\Database\Console\WipeCommand::class, 'command.debugbar.clear' => \Barryvdh\Debugbar\Console\ClearCommand::class, 'command.down' => \Illuminate\Foundation\Console\DownCommand::class, 'command.environment' => \Illuminate\Foundation\Console\EnvironmentCommand::class, @@ -1025,8 +1007,6 @@ namespace PHPSTORM_META { 'Maatwebsite\Excel\Transactions\TransactionManager' => \Maatwebsite\Excel\Transactions\TransactionManager::class, 'NunoMaduro\Collision\Contracts\Adapters\Phpunit\Listener' => \NunoMaduro\Collision\Adapters\Phpunit\Listener::class, 'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class, - 'Psr\Http\Message\ResponseInterface' => \Zend\Diactoros\Response::class, - 'Psr\Http\Message\ServerRequestInterface' => \Zend\Diactoros\ServerRequest::class, 'Reliese\Coders\Model\Factory' => \Reliese\Coders\Model\Factory::class, 'auth' => \Illuminate\Auth\AuthManager::class, 'auth.driver' => \Illuminate\Auth\SessionGuard::class, @@ -1035,8 +1015,6 @@ namespace PHPSTORM_META { 'blade.compiler' => \Illuminate\View\Compilers\BladeCompiler::class, 'cache' => \Illuminate\Cache\CacheManager::class, 'cache.store' => \Illuminate\Cache\Repository::class, - 'command.app.name' => \Illuminate\Foundation\Console\AppNameCommand::class, - 'command.auth.make' => \Illuminate\Auth\Console\AuthMakeCommand::class, 'command.auth.resets.clear' => \Illuminate\Auth\Console\ClearResetsCommand::class, 'command.cache.clear' => \Illuminate\Cache\Console\ClearCommand::class, 'command.cache.forget' => \Illuminate\Cache\Console\ForgetCommand::class, @@ -1047,6 +1025,7 @@ namespace PHPSTORM_META { 'command.config.clear' => \Illuminate\Foundation\Console\ConfigClearCommand::class, 'command.console.make' => \Illuminate\Foundation\Console\ConsoleMakeCommand::class, 'command.controller.make' => \Illuminate\Routing\Console\ControllerMakeCommand::class, + 'command.db.wipe' => \Illuminate\Database\Console\WipeCommand::class, 'command.debugbar.clear' => \Barryvdh\Debugbar\Console\ClearCommand::class, 'command.down' => \Illuminate\Foundation\Console\DownCommand::class, 'command.environment' => \Illuminate\Foundation\Console\EnvironmentCommand::class, @@ -1189,8 +1168,6 @@ namespace PHPSTORM_META { 'Maatwebsite\Excel\Transactions\TransactionManager' => \Maatwebsite\Excel\Transactions\TransactionManager::class, 'NunoMaduro\Collision\Contracts\Adapters\Phpunit\Listener' => \NunoMaduro\Collision\Adapters\Phpunit\Listener::class, 'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class, - 'Psr\Http\Message\ResponseInterface' => \Zend\Diactoros\Response::class, - 'Psr\Http\Message\ServerRequestInterface' => \Zend\Diactoros\ServerRequest::class, 'Reliese\Coders\Model\Factory' => \Reliese\Coders\Model\Factory::class, 'auth' => \Illuminate\Auth\AuthManager::class, 'auth.driver' => \Illuminate\Auth\SessionGuard::class, @@ -1199,8 +1176,6 @@ namespace PHPSTORM_META { 'blade.compiler' => \Illuminate\View\Compilers\BladeCompiler::class, 'cache' => \Illuminate\Cache\CacheManager::class, 'cache.store' => \Illuminate\Cache\Repository::class, - 'command.app.name' => \Illuminate\Foundation\Console\AppNameCommand::class, - 'command.auth.make' => \Illuminate\Auth\Console\AuthMakeCommand::class, 'command.auth.resets.clear' => \Illuminate\Auth\Console\ClearResetsCommand::class, 'command.cache.clear' => \Illuminate\Cache\Console\ClearCommand::class, 'command.cache.forget' => \Illuminate\Cache\Console\ForgetCommand::class, @@ -1211,6 +1186,7 @@ namespace PHPSTORM_META { 'command.config.clear' => \Illuminate\Foundation\Console\ConfigClearCommand::class, 'command.console.make' => \Illuminate\Foundation\Console\ConsoleMakeCommand::class, 'command.controller.make' => \Illuminate\Routing\Console\ControllerMakeCommand::class, + 'command.db.wipe' => \Illuminate\Database\Console\WipeCommand::class, 'command.debugbar.clear' => \Barryvdh\Debugbar\Console\ClearCommand::class, 'command.down' => \Illuminate\Foundation\Console\DownCommand::class, 'command.environment' => \Illuminate\Foundation\Console\EnvironmentCommand::class, diff --git a/_ide_helper.php b/_ide_helper.php index b2d1393..d5e503c 100644 --- a/_ide_helper.php +++ b/_ide_helper.php @@ -3,7 +3,7 @@ /** * A helper file for Laravel 5, to provide autocomplete information to your IDE - * Generated for Laravel 5.8.36 on 2020-02-10 17:24:00. + * Generated for Laravel 6.17.0 on 2020-02-26 13:37:45. * * This file should not be included in your code, only analyzed by your IDE! * @@ -333,10 +333,10 @@ namespace Illuminate\Support\Facades { * @return string|bool * @static */ - public static function environment($environments = null) + public static function environment(...$environments) { /** @var \Illuminate\Foundation\Application $instance */ - return $instance->environment($environments); + return $instance->environment(...$environments); } /** @@ -724,6 +724,7 @@ namespace Illuminate\Support\Facades { * @param array $headers * @return void * @throws \Symfony\Component\HttpKernel\Exception\HttpException + * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException * @static */ public static function abort($code, $message = '', $headers = []) @@ -1090,6 +1091,21 @@ namespace Illuminate\Support\Facades { $instance->singleton($abstract, $concrete); } + /** + * Register a shared binding if it hasn't already been registered. + * + * @param string $abstract + * @param \Closure|string|null $concrete + * @return void + * @static + */ + public static function singletonIf($abstract, $concrete = null) + { + //Method inherited from \Illuminate\Container\Container + /** @var \Illuminate\Foundation\Application $instance */ + $instance->singletonIf($abstract, $concrete); + } + /** * "Extend" an abstract type in the container. * @@ -1779,6 +1795,18 @@ namespace Illuminate\Support\Facades { return $instance->provider($name, $callback); } + /** + * Determines if any guards have already been resolved. + * + * @return bool + * @static + */ + public static function hasResolvedGuards() + { + /** @var \Illuminate\Auth\AuthManager $instance */ + return $instance->hasResolvedGuards(); + } + /** * Create the user provider implementation for the driver. * @@ -1950,6 +1978,18 @@ namespace Illuminate\Support\Facades { $instance->logout(); } + /** + * Log the user out of the application on their current device only. + * + * @return void + * @static + */ + public static function logoutCurrentDevice() + { + /** @var \Illuminate\Auth\SessionGuard $instance */ + $instance->logoutCurrentDevice(); + } + /** * Invalidate other sessions for the current user. * @@ -2373,10 +2413,10 @@ namespace Illuminate\Support\Facades { * @return bool * @static */ - public static function check($name, $parameters = null) + public static function check($name, ...$parameters) { /** @var \Illuminate\View\Compilers\BladeCompiler $instance */ - return $instance->check($name, $parameters); + return $instance->check($name, ...$parameters); } /** @@ -2413,6 +2453,7 @@ namespace Illuminate\Support\Facades { * @param string $name * @param callable $handler * @return void + * @throws \InvalidArgumentException * @static */ public static function directive($name, $handler) @@ -2503,7 +2544,7 @@ namespace Illuminate\Support\Facades { /** * * - * @method static \Illuminate\Broadcasting\Broadcasters\Broadcaster channel(string $channel, callable|string $callback) + * @method static \Illuminate\Broadcasting\Broadcasters\Broadcaster channel(string $channel, callable|string $callback, array $options = []) * @method static mixed auth(\Illuminate\Http\Request $request) * @see \Illuminate\Contracts\Broadcasting\Factory */ @@ -2702,6 +2743,20 @@ namespace Illuminate\Support\Facades { return $instance->dispatchToQueue($command); } + /** + * Dispatch a command to its appropriate handler after the current process. + * + * @param mixed $command + * @param mixed $handler + * @return void + * @static + */ + public static function dispatchAfterResponse($command, $handler = null) + { + /** @var \Illuminate\Bus\Dispatcher $instance */ + $instance->dispatchAfterResponse($command, $handler); + } + /** * Set the pipes through which commands should be piped before dispatching. * @@ -2742,6 +2797,20 @@ namespace Illuminate\Support\Facades { $instance->assertDispatched($command, $callback); } + /** + * Assert if a job was pushed a number of times. + * + * @param string $command + * @param int $times + * @return void + * @static + */ + public static function assertDispatchedTimes($command, $times = 1) + { + /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */ + $instance->assertDispatchedTimes($command, $times); + } + /** * Determine if a job was dispatched based on a truth-test callback. * @@ -2756,6 +2825,48 @@ namespace Illuminate\Support\Facades { $instance->assertNotDispatched($command, $callback); } + /** + * Assert if a job was dispatched after the response was sent based on a truth-test callback. + * + * @param string $command + * @param callable|int|null $callback + * @return void + * @static + */ + public static function assertDispatchedAfterResponse($command, $callback = null) + { + /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */ + $instance->assertDispatchedAfterResponse($command, $callback); + } + + /** + * Assert if a job was pushed after the response was sent a number of times. + * + * @param string $command + * @param int $times + * @return void + * @static + */ + public static function assertDispatchedAfterResponseTimes($command, $times = 1) + { + /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */ + $instance->assertDispatchedAfterResponseTimes($command, $times); + } + + /** + * Determine if a job was dispatched based on a truth-test callback. + * + * @param string $command + * @param callable|null $callback + * @return void + * @static + */ + public static function assertNotDispatchedAfterResponse($command, $callback = null) + { + /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */ + $instance->assertNotDispatchedAfterResponse($command, $callback); + } + /** * Get all of the jobs matching a truth-test callback. * @@ -2770,6 +2881,20 @@ namespace Illuminate\Support\Facades { return $instance->dispatched($command, $callback); } + /** + * Get all of the jobs dispatched after the response was sent matching a truth-test callback. + * + * @param string $command + * @param callable|null $callback + * @return \Illuminate\Support\Collection + * @static + */ + public static function dispatchedAfterResponse($command, $callback = null) + { + /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */ + return $instance->dispatchedAfterResponse($command, $callback); + } + /** * Determine if there are any stored commands for a given class. * @@ -2782,6 +2907,19 @@ namespace Illuminate\Support\Facades { /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */ return $instance->hasDispatched($command); } + + /** + * Determine if there are any stored commands for a given class. + * + * @param string $command + * @return bool + * @static + */ + public static function hasDispatchedAfterResponse($command) + { + /** @var \Illuminate\Support\Testing\Fakes\BusFake $instance */ + return $instance->hasDispatchedAfterResponse($command); + } } @@ -2832,6 +2970,18 @@ namespace Illuminate\Support\Facades { return $instance->repository($store); } + /** + * Re-set the event dispatcher on all resolved cache repositories. + * + * @return void + * @static + */ + public static function refreshEventDispatcher() + { + /** @var \Illuminate\Cache\CacheManager $instance */ + $instance->refreshEventDispatcher(); + } + /** * Get the default cache driver name. * @@ -3210,7 +3360,7 @@ namespace Illuminate\Support\Facades { /** * Get the default cache time. * - * @return int + * @return int|null * @static */ public static function getDefaultCacheTime() @@ -3244,6 +3394,18 @@ namespace Illuminate\Support\Facades { return $instance->getStore(); } + /** + * Get the event dispatcher instance. + * + * @return \Illuminate\Contracts\Events\Dispatcher + * @static + */ + public static function getEventDispatcher() + { + /** @var \Illuminate\Cache\Repository $instance */ + return $instance->getEventDispatcher(); + } + /** * Set the event dispatcher instance. * @@ -3637,13 +3799,14 @@ namespace Illuminate\Support\Facades { * Determine if a cookie has been queued. * * @param string $key + * @param string|null $path * @return bool * @static */ - public static function hasQueued($key) + public static function hasQueued($key, $path = null) { /** @var \Illuminate\Cookie\CookieJar $instance */ - return $instance->hasQueued($key); + return $instance->hasQueued($key, $path); } /** @@ -3651,13 +3814,14 @@ namespace Illuminate\Support\Facades { * * @param string $key * @param mixed $default + * @param string|null $path * @return \Symfony\Component\HttpFoundation\Cookie * @static */ - public static function queued($key, $default = null) + public static function queued($key, $default = null, $path = null) { /** @var \Illuminate\Cookie\CookieJar $instance */ - return $instance->queued($key, $default); + return $instance->queued($key, $default, $path); } /** @@ -3667,23 +3831,24 @@ namespace Illuminate\Support\Facades { * @return void * @static */ - public static function queue($parameters = null) + public static function queue(...$parameters) { /** @var \Illuminate\Cookie\CookieJar $instance */ - $instance->queue($parameters); + $instance->queue(...$parameters); } /** * Remove a cookie from the queue. * * @param string $name + * @param string|null $path * @return void * @static */ - public static function unqueue($name) + public static function unqueue($name, $path = null) { /** @var \Illuminate\Cookie\CookieJar $instance */ - $instance->unqueue($name); + $instance->unqueue($name, $path); } /** @@ -4019,20 +4184,6 @@ namespace Illuminate\Support\Facades { return $instance->getSchemaBuilder(); } - /** - * Bind values to their parameters in the given statement. - * - * @param \PDOStatement $statement - * @param array $bindings - * @return void - * @static - */ - public static function bindValues($statement, $bindings) - { - /** @var \Illuminate\Database\MySqlConnection $instance */ - $instance->bindValues($statement, $bindings); - } - /** * Set the query grammar to the default implementation. * @@ -4075,15 +4226,16 @@ namespace Illuminate\Support\Facades { /** * Begin a fluent query against a database table. * - * @param string $table + * @param \Closure|\Illuminate\Database\Query\Builder|string $table + * @param string|null $as * @return \Illuminate\Database\Query\Builder * @static */ - public static function table($table) + public static function table($table, $as = null) { //Method inherited from \Illuminate\Database\Connection /** @var \Illuminate\Database\MySqlConnection $instance */ - return $instance->table($table); + return $instance->table($table, $as); } /** @@ -4265,6 +4417,21 @@ namespace Illuminate\Support\Facades { return $instance->pretend($callback); } + /** + * Bind values to their parameters in the given statement. + * + * @param \PDOStatement $statement + * @param array $bindings + * @return void + * @static + */ + public static function bindValues($statement, $bindings) + { + //Method inherited from \Illuminate\Database\Connection + /** @var \Illuminate\Database\MySqlConnection $instance */ + $instance->bindValues($statement, $bindings); + } + /** * Prepare the query bindings for execution. * @@ -4404,6 +4571,19 @@ namespace Illuminate\Support\Facades { return $instance->getPdo(); } + /** + * Get the current PDO connection parameter without executing any reconnect logic. + * + * @return \PDO|\Closure|null + * @static + */ + public static function getRawPdo() + { + //Method inherited from \Illuminate\Database\Connection + /** @var \Illuminate\Database\MySqlConnection $instance */ + return $instance->getRawPdo(); + } + /** * Get the current PDO connection used for reading. * @@ -4417,6 +4597,19 @@ namespace Illuminate\Support\Facades { return $instance->getReadPdo(); } + /** + * Get the current read PDO connection parameter without executing any reconnect logic. + * + * @return \PDO|\Closure|null + * @static + */ + public static function getRawReadPdo() + { + //Method inherited from \Illuminate\Database\Connection + /** @var \Illuminate\Database\MySqlConnection $instance */ + return $instance->getRawReadPdo(); + } + /** * Set the PDO connection. * @@ -4863,7 +5056,7 @@ namespace Illuminate\Support\Facades { * Register an event listener with the dispatcher. * * @param string|array $events - * @param mixed $listener + * @param \Closure|string $listener * @return void * @static */ @@ -4886,6 +5079,19 @@ namespace Illuminate\Support\Facades { return $instance->hasListeners($eventName); } + /** + * Determine if the given event has any wildcard listeners. + * + * @param string $eventName + * @return bool + * @static + */ + public static function hasWildcardListeners($eventName) + { + /** @var \Illuminate\Events\Dispatcher $instance */ + return $instance->hasWildcardListeners($eventName); + } + /** * Register an event and payload to be fired later. * @@ -5034,6 +5240,45 @@ namespace Illuminate\Support\Facades { return $instance->setQueueResolver($resolver); } + /** + * Register a custom macro. + * + * @param string $name + * @param object|callable $macro + * @return void + * @static + */ + public static function macro($name, $macro) + { + \Illuminate\Events\Dispatcher::macro($name, $macro); + } + + /** + * Mix another object into the class. + * + * @param object $mixin + * @param bool $replace + * @return void + * @throws \ReflectionException + * @static + */ + public static function mixin($mixin, $replace = true) + { + \Illuminate\Events\Dispatcher::mixin($mixin, $replace); + } + + /** + * Checks if macro is registered. + * + * @param string $name + * @return bool + * @static + */ + public static function hasMacro($name) + { + return \Illuminate\Events\Dispatcher::hasMacro($name); + } + /** * Assert if an event was dispatched based on a truth-test callback. * @@ -5125,6 +5370,19 @@ namespace Illuminate\Support\Facades { return $instance->exists($path); } + /** + * Determine if a file or directory is missing. + * + * @param string $path + * @return bool + * @static + */ + public static function missing($path) + { + /** @var \Illuminate\Filesystem\Filesystem $instance */ + return $instance->missing($path); + } + /** * Get the contents of a file. * @@ -5306,7 +5564,7 @@ namespace Illuminate\Support\Facades { } /** - * Create a hard link to the target file or directory. + * Create a symlink to the target file or directory. On Windows, a hard link is created if the target is a file. * * @param string $target * @param string $link @@ -5530,6 +5788,21 @@ namespace Illuminate\Support\Facades { return $instance->directories($directory); } + /** + * Ensure a directory exists. + * + * @param string $path + * @param int $mode + * @param bool $recursive + * @return void + * @static + */ + public static function ensureDirectoryExists($path, $mode = 493, $recursive = true) + { + /** @var \Illuminate\Filesystem\Filesystem $instance */ + $instance->ensureDirectoryExists($path, $mode, $recursive); + } + /** * Create a directory. * @@ -5834,12 +6107,27 @@ namespace Illuminate\Support\Facades { return $instance->authorize($ability, $arguments); } + /** + * Inspect the user for the given ability. + * + * @param string $ability + * @param array|mixed $arguments + * @return \Illuminate\Auth\Access\Response + * @static + */ + public static function inspect($ability, $arguments = []) + { + /** @var \Illuminate\Auth\Access\Gate $instance */ + return $instance->inspect($ability, $arguments); + } + /** * Get the raw result from the authorization callback. * * @param string $ability * @param array|mixed $arguments * @return mixed + * @throws \Illuminate\Auth\Access\AuthorizationException * @static */ public static function raw($ability, $arguments = []) @@ -6119,21 +6407,6 @@ namespace Illuminate\Support\Facades { return $instance->has($key, $locale, $fallback); } - /** - * Get the translation for a given key. - * - * @param string $key - * @param array $replace - * @param string|null $locale - * @return string|array - * @static - */ - public static function trans($key, $replace = [], $locale = null) - { - /** @var \Illuminate\Translation\Translator $instance */ - return $instance->trans($key, $replace, $locale); - } - /** * Get the translation for the given key. * @@ -6150,42 +6423,11 @@ namespace Illuminate\Support\Facades { return $instance->get($key, $replace, $locale, $fallback); } - /** - * Get the translation for a given key from the JSON translation files. - * - * @param string $key - * @param array $replace - * @param string|null $locale - * @return string|array - * @static - */ - public static function getFromJson($key, $replace = [], $locale = null) - { - /** @var \Illuminate\Translation\Translator $instance */ - return $instance->getFromJson($key, $replace, $locale); - } - /** * Get a translation according to an integer value. * * @param string $key - * @param int|array|\Countable $number - * @param array $replace - * @param string|null $locale - * @return string - * @static - */ - public static function transChoice($key, $number, $replace = [], $locale = null) - { - /** @var \Illuminate\Translation\Translator $instance */ - return $instance->transChoice($key, $number, $replace, $locale); - } - - /** - * Get a translation according to an integer value. - * - * @param string $key - * @param int|array|\Countable $number + * @param \Countable|int|array $number * @param array $replace * @param string|null $locale * @return string @@ -6442,118 +6684,6 @@ namespace Illuminate\Support\Facades { */ class Log { - /** - * Adds a log record at the DEBUG level. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - * @static - */ - public static function debug($message, $context = []) - { - /** @var \Monolog\Logger $instance */ - return $instance->addDebug($message, $context); - } - - /** - * Adds a log record at the INFO level. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - * @static - */ - public static function info($message, $context = []) - { - /** @var \Monolog\Logger $instance */ - return $instance->addInfo($message, $context); - } - - /** - * Adds a log record at the NOTICE level. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - * @static - */ - public static function notice($message, $context = []) - { - /** @var \Monolog\Logger $instance */ - return $instance->addNotice($message, $context); - } - - /** - * Adds a log record at the WARNING level. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - * @static - */ - public static function warning($message, $context = []) - { - /** @var \Monolog\Logger $instance */ - return $instance->addWarning($message, $context); - } - - /** - * Adds a log record at the ERROR level. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - * @static - */ - public static function error($message, $context = []) - { - /** @var \Monolog\Logger $instance */ - return $instance->addError($message, $context); - } - - /** - * Adds a log record at the CRITICAL level. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - * @static - */ - public static function critical($message, $context = []) - { - /** @var \Monolog\Logger $instance */ - return $instance->addCritical($message, $context); - } - - /** - * Adds a log record at the ALERT level. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - * @static - */ - public static function alert($message, $context = []) - { - /** @var \Monolog\Logger $instance */ - return $instance->addAlert($message, $context); - } - - /** - * Adds a log record at the EMERGENCY level. - * - * @param string $message The log message - * @param array $context The log context - * @return bool Whether the record has been processed - * @static - */ - public static function emergency($message, $context = []) - { - /** @var \Monolog\Logger $instance */ - return $instance->addEmergency($message, $context); - } - /** * Create a new, on-demand aggregate logger instance. * @@ -6572,7 +6702,7 @@ namespace Illuminate\Support\Facades { * Get a log channel instance. * * @param string|null $channel - * @return mixed + * @return \Psr\Log\LoggerInterface * @static */ public static function channel($channel = null) @@ -6585,7 +6715,7 @@ namespace Illuminate\Support\Facades { * Get a log driver instance. * * @param string|null $driver - * @return mixed + * @return \Psr\Log\LoggerInterface * @static */ public static function driver($driver = null) @@ -6594,6 +6724,18 @@ namespace Illuminate\Support\Facades { return $instance->driver($driver); } + /** + * + * + * @return array + * @static + */ + public static function getChannels() + { + /** @var \Illuminate\Log\LogManager $instance */ + return $instance->getChannels(); + } + /** * Get the default log driver name. * @@ -6633,6 +6775,142 @@ namespace Illuminate\Support\Facades { return $instance->extend($driver, $callback); } + /** + * Unset the given channel instance. + * + * @param string|null $name + * @return \Illuminate\Log\LogManager + * @static + */ + public static function forgetChannel($driver = null) + { + /** @var \Illuminate\Log\LogManager $instance */ + return $instance->forgetChannel($driver); + } + + /** + * System is unusable. + * + * @param string $message + * @param array $context + * @return void + * @static + */ + public static function emergency($message, $context = []) + { + /** @var \Illuminate\Log\LogManager $instance */ + $instance->emergency($message, $context); + } + + /** + * Action must be taken immediately. + * + * Example: Entire website down, database unavailable, etc. This should + * trigger the SMS alerts and wake you up. + * + * @param string $message + * @param array $context + * @return void + * @static + */ + public static function alert($message, $context = []) + { + /** @var \Illuminate\Log\LogManager $instance */ + $instance->alert($message, $context); + } + + /** + * Critical conditions. + * + * Example: Application component unavailable, unexpected exception. + * + * @param string $message + * @param array $context + * @return void + * @static + */ + public static function critical($message, $context = []) + { + /** @var \Illuminate\Log\LogManager $instance */ + $instance->critical($message, $context); + } + + /** + * Runtime errors that do not require immediate action but should typically + * be logged and monitored. + * + * @param string $message + * @param array $context + * @return void + * @static + */ + public static function error($message, $context = []) + { + /** @var \Illuminate\Log\LogManager $instance */ + $instance->error($message, $context); + } + + /** + * Exceptional occurrences that are not errors. + * + * Example: Use of deprecated APIs, poor use of an API, undesirable things + * that are not necessarily wrong. + * + * @param string $message + * @param array $context + * @return void + * @static + */ + public static function warning($message, $context = []) + { + /** @var \Illuminate\Log\LogManager $instance */ + $instance->warning($message, $context); + } + + /** + * Normal but significant events. + * + * @param string $message + * @param array $context + * @return void + * @static + */ + public static function notice($message, $context = []) + { + /** @var \Illuminate\Log\LogManager $instance */ + $instance->notice($message, $context); + } + + /** + * Interesting events. + * + * Example: User logs in, SQL logs. + * + * @param string $message + * @param array $context + * @return void + * @static + */ + public static function info($message, $context = []) + { + /** @var \Illuminate\Log\LogManager $instance */ + $instance->info($message, $context); + } + + /** + * Detailed debug information. + * + * @param string $message + * @param array $context + * @return void + * @static + */ + public static function debug($message, $context = []) + { + /** @var \Illuminate\Log\LogManager $instance */ + $instance->debug($message, $context); + } + /** * Logs with an arbitrary level. * @@ -6799,7 +7077,7 @@ namespace Illuminate\Support\Facades { /** * Send a new message using a view. * - * @param string|array|\Illuminate\Contracts\Mail\Mailable $view + * @param \Illuminate\Contracts\Mail\Mailable|string|array $view * @param array $data * @param \Closure|string|null $callback * @return void @@ -7273,6 +7551,7 @@ namespace Illuminate\Support\Facades { * @param string $notification * @param callable|null $callback * @return void + * @throws \Exception * @static */ public static function assertSentTo($notifiable, $notification, $callback = null) @@ -7303,6 +7582,7 @@ namespace Illuminate\Support\Facades { * @param string $notification * @param callable|null $callback * @return void + * @throws \Exception * @static */ public static function assertNotSentTo($notifiable, $notification, $callback = null) @@ -7412,8 +7692,6 @@ namespace Illuminate\Support\Facades { * * @method static string sendResetLink(array $credentials) * @method static mixed reset(array $credentials, \Closure $callback) - * @method static void validator(\Closure $callback) - * @method static bool validateNewPassword(array $credentials) * @see \Illuminate\Auth\Passwords\PasswordBroker */ class Password { @@ -7636,18 +7914,6 @@ namespace Illuminate\Support\Facades { return $instance->getName($connection); } - /** - * Determine if the application is in maintenance mode. - * - * @return bool - * @static - */ - public static function isDownForMaintenance() - { - /** @var \Illuminate\Queue\QueueManager $instance */ - return $instance->isDownForMaintenance(); - } - /** * Assert if a job was pushed based on a truth-test callback. * @@ -7692,6 +7958,20 @@ namespace Illuminate\Support\Facades { $instance->assertPushedWithChain($job, $expectedChain, $callback); } + /** + * Assert if a job was pushed with an empty chain based on a truth-test callback. + * + * @param string $job + * @param callable|null $callback + * @return void + * @static + */ + public static function assertPushedWithoutChain($job, $callback = null) + { + /** @var \Illuminate\Support\Testing\Fakes\QueueFake $instance */ + $instance->assertPushedWithoutChain($job, $callback); + } + /** * Determine if a job was pushed based on a truth-test callback. * @@ -8198,6 +8478,7 @@ namespace Illuminate\Support\Facades { /** * * + * @method static mixed filterFiles(mixed $files) * @see \Illuminate\Http\Request */ class Request { @@ -8343,10 +8624,10 @@ namespace Illuminate\Support\Facades { * @return bool * @static */ - public static function is($patterns = null) + public static function is(...$patterns) { /** @var \Illuminate\Http\Request $instance */ - return $instance->is($patterns); + return $instance->is(...$patterns); } /** @@ -8356,10 +8637,10 @@ namespace Illuminate\Support\Facades { * @return bool * @static */ - public static function routeIs($patterns = null) + public static function routeIs(...$patterns) { /** @var \Illuminate\Http\Request $instance */ - return $instance->routeIs($patterns); + return $instance->routeIs(...$patterns); } /** @@ -8369,10 +8650,10 @@ namespace Illuminate\Support\Facades { * @return bool * @static */ - public static function fullUrlIs($patterns = null) + public static function fullUrlIs(...$patterns) { /** @var \Illuminate\Http\Request $instance */ - return $instance->fullUrlIs($patterns); + return $instance->fullUrlIs(...$patterns); } /** @@ -8614,7 +8895,7 @@ namespace Illuminate\Support\Facades { * * @param string|null $param * @param mixed $default - * @return \Illuminate\Routing\Route|object|string + * @return \Illuminate\Routing\Route|object|string|null * @static */ public static function route($param = null, $default = null) @@ -10096,6 +10377,19 @@ namespace Illuminate\Support\Facades { return $instance->anyFilled($keys); } + /** + * Determine if the request is missing a given input item key. + * + * @param string|array $key + * @return bool + * @static + */ + public static function missing($key) + { + /** @var \Illuminate\Http\Request $instance */ + return $instance->missing($key); + } + /** * Get the keys for all of the input and files. * @@ -10125,8 +10419,8 @@ namespace Illuminate\Support\Facades { * Retrieve an input item from the request. * * @param string|null $key - * @param string|array|null $default - * @return string|array|null + * @param mixed $default + * @return mixed * @static */ public static function input($key = null, $default = null) @@ -10135,6 +10429,22 @@ namespace Illuminate\Support\Facades { return $instance->input($key, $default); } + /** + * Retrieve input as a boolean value. + * + * Returns true when value is "1", "true", "on", and "yes". Otherwise, returns false. + * + * @param string|null $key + * @param bool $default + * @return bool + * @static + */ + public static function boolean($key = null, $default = false) + { + /** @var \Illuminate\Http\Request $instance */ + return $instance->boolean($key, $default); + } + /** * Get a subset containing the provided keys with values from the input data. * @@ -10299,9 +10609,19 @@ namespace Illuminate\Support\Facades { * * @static */ - public static function validate($rules, $params = null) + public static function validate($rules, ...$params) { - return \Illuminate\Http\Request::validate($rules, $params); + return \Illuminate\Http\Request::validate($rules, ...$params); + } + + /** + * + * + * @static + */ + public static function validateWithBag($errorBag, $rules, ...$params) + { + return \Illuminate\Http\Request::validateWithBag($errorBag, $rules, ...$params); } /** @@ -10355,7 +10675,7 @@ namespace Illuminate\Support\Facades { /** * Create a new response for a given view. * - * @param string $view + * @param string|array $view * @param array $data * @param int $status * @param array $headers @@ -10883,7 +11203,7 @@ namespace Illuminate\Support\Facades { * Return the response returned by the given route. * * @param string $name - * @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse + * @return \Symfony\Component\HttpFoundation\Response * @static */ public static function respondWithRoute($name) @@ -10896,7 +11216,7 @@ namespace Illuminate\Support\Facades { * Dispatch the request to the application. * * @param \Illuminate\Http\Request $request - * @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse + * @return \Symfony\Component\HttpFoundation\Response * @static */ public static function dispatch($request) @@ -10909,7 +11229,7 @@ namespace Illuminate\Support\Facades { * Dispatch the request to a route and return the response. * * @param \Illuminate\Http\Request $request - * @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse + * @return \Symfony\Component\HttpFoundation\Response * @static */ public static function dispatchToRoute($request) @@ -10936,7 +11256,7 @@ namespace Illuminate\Support\Facades { * * @param \Symfony\Component\HttpFoundation\Request $request * @param mixed $response - * @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse + * @return \Symfony\Component\HttpFoundation\Response * @static */ public static function prepareResponse($request, $response) @@ -10950,7 +11270,7 @@ namespace Illuminate\Support\Facades { * * @param \Symfony\Component\HttpFoundation\Request $request * @param mixed $response - * @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse + * @return \Symfony\Component\HttpFoundation\Response * @static */ public static function toResponse($request, $response) @@ -11283,10 +11603,10 @@ namespace Illuminate\Support\Facades { * @return bool * @static */ - public static function is($patterns = null) + public static function is(...$patterns) { /** @var \Illuminate\Routing\Router $instance */ - return $instance->is($patterns); + return $instance->is(...$patterns); } /** @@ -11296,10 +11616,10 @@ namespace Illuminate\Support\Facades { * @return bool * @static */ - public static function currentRouteNamed($patterns = null) + public static function currentRouteNamed(...$patterns) { /** @var \Illuminate\Routing\Router $instance */ - return $instance->currentRouteNamed($patterns); + return $instance->currentRouteNamed(...$patterns); } /** @@ -11321,10 +11641,10 @@ namespace Illuminate\Support\Facades { * @return bool * @static */ - public static function uses($patterns = null) + public static function uses(...$patterns) { /** @var \Illuminate\Routing\Router $instance */ - return $instance->uses($patterns); + return $instance->uses(...$patterns); } /** @@ -11365,6 +11685,18 @@ namespace Illuminate\Support\Facades { $instance->resetPassword(); } + /** + * Register the typical confirm password routes for an application. + * + * @return void + * @static + */ + public static function confirmPassword() + { + /** @var \Illuminate\Routing\Router $instance */ + $instance->confirmPassword(); + } + /** * Register the typical email verification routes for an application. * @@ -11554,6 +11886,30 @@ namespace Illuminate\Support\Facades { $instance->dropAllViews(); } + /** + * Get all of the table names for the database. + * + * @return array + * @static + */ + public static function getAllTables() + { + /** @var \Illuminate\Database\Schema\MySqlBuilder $instance */ + return $instance->getAllTables(); + } + + /** + * Get all of the view names for the database. + * + * @return array + * @static + */ + public static function getAllViews() + { + /** @var \Illuminate\Database\Schema\MySqlBuilder $instance */ + return $instance->getAllViews(); + } + /** * Set the default string length for migrations. * @@ -11733,6 +12089,7 @@ namespace Illuminate\Support\Facades { * @param string $type * @return void * @throws \Doctrine\DBAL\DBALException + * @throws \RuntimeException * @static */ public static function registerCustomDoctrineType($class, $name, $type) @@ -12513,19 +12870,6 @@ namespace Illuminate\Support\Facades { return $instance->createS3Driver($config); } - /** - * Create an instance of the Rackspace driver. - * - * @param array $config - * @return \Illuminate\Contracts\Filesystem\Cloud - * @static - */ - public static function createRackspaceDriver($config) - { - /** @var \Illuminate\Filesystem\FilesystemManager $instance */ - return $instance->createRackspaceDriver($config); - } - /** * Set the given disk instance. * @@ -12630,6 +12974,19 @@ namespace Illuminate\Support\Facades { return $instance->exists($path); } + /** + * Determine if a file or directory is missing. + * + * @param string $path + * @return bool + * @static + */ + public static function missing($path) + { + /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ + return $instance->missing($path); + } + /** * Get the full path for the file at the given "short" path. * @@ -12707,7 +13064,7 @@ namespace Illuminate\Support\Facades { * Store the uploaded file on the disk. * * @param string $path - * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile $file + * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile|string $file * @param array $options * @return string|false * @static @@ -12722,7 +13079,7 @@ namespace Illuminate\Support\Facades { * Store the uploaded file on the disk with a given name. * * @param string $path - * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile $file + * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile|string $file * @param string $name * @param array $options * @return string|false @@ -12890,7 +13247,7 @@ namespace Illuminate\Support\Facades { * * @param string $path * @return resource|null The path resource or null on failure. - * @throws FileNotFoundException + * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException * @static */ public static function readStream($path) @@ -12907,7 +13264,7 @@ namespace Illuminate\Support\Facades { * @param array $options * @return bool * @throws \InvalidArgumentException If $resource is not a file handle. - * @throws FileExistsException + * @throws \Illuminate\Contracts\Filesystem\FileExistsException * @static */ public static function writeStream($path, $resource, $options = []) @@ -12948,22 +13305,6 @@ namespace Illuminate\Support\Facades { return $instance->getAwsTemporaryUrl($adapter, $path, $expiration, $options); } - /** - * Get a temporary URL for the file at the given path. - * - * @param \League\Flysystem\Rackspace\RackspaceAdapter $adapter - * @param string $path - * @param \DateTimeInterface $expiration - * @param array $options - * @return string - * @static - */ - public static function getRackspaceTemporaryUrl($adapter, $path, $expiration, $options) - { - /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ - return $instance->getRackspaceTemporaryUrl($adapter, $path, $expiration, $options); - } - /** * Get an array of all files in a directory. * @@ -13206,6 +13547,7 @@ namespace Illuminate\Support\Facades { * @param \DateTimeInterface|\DateInterval|int|null $expiration * @param bool $absolute * @return string + * @throws \InvalidArgumentException * @static */ public static function signedRoute($name, $parameters = [], $expiration = null, $absolute = true) @@ -13244,6 +13586,33 @@ namespace Illuminate\Support\Facades { return $instance->hasValidSignature($request, $absolute); } + /** + * Determine if the signature from the given request matches the URL. + * + * @param \Illuminate\Http\Request $request + * @param bool $absolute + * @return bool + * @static + */ + public static function hasCorrectSignature($request, $absolute = true) + { + /** @var \Illuminate\Routing\UrlGenerator $instance */ + return $instance->hasCorrectSignature($request, $absolute); + } + + /** + * Determine if the expires timestamp from the given request is not from the past. + * + * @param \Illuminate\Http\Request $request + * @return bool + * @static + */ + public static function signatureHasNotExpired($request) + { + /** @var \Illuminate\Routing\UrlGenerator $instance */ + return $instance->signatureHasNotExpired($request); + } + /** * Get the URL to a named route. * @@ -13251,7 +13620,7 @@ namespace Illuminate\Support\Facades { * @param mixed $parameters * @param bool $absolute * @return string - * @throws \InvalidArgumentException + * @throws \Symfony\Component\Routing\Exception\RouteNotFoundException * @static */ public static function route($name, $parameters = [], $absolute = true) @@ -13260,6 +13629,22 @@ namespace Illuminate\Support\Facades { return $instance->route($name, $parameters, $absolute); } + /** + * Get the URL for a given route instance. + * + * @param \Illuminate\Routing\Route $route + * @param mixed $parameters + * @param bool $absolute + * @return string + * @throws \Illuminate\Routing\Exceptions\UrlGenerationException + * @static + */ + public static function toRoute($route, $parameters, $absolute) + { + /** @var \Illuminate\Routing\UrlGenerator $instance */ + return $instance->toRoute($route, $parameters, $absolute); + } + /** * Get the URL to a controller action. * @@ -14572,7 +14957,7 @@ namespace Illuminate\Support\Facades { * @method static mixed filterFiles(mixed $files) * @see \Illuminate\Http\Request */ - class Input { + class Request { /** * Create a new Illuminate HTTP request from server variables. @@ -14715,10 +15100,10 @@ namespace Illuminate\Support\Facades { * @return bool * @static */ - public static function is($patterns = null) + public static function is(...$patterns) { /** @var \Illuminate\Http\Request $instance */ - return $instance->is($patterns); + return $instance->is(...$patterns); } /** @@ -14728,10 +15113,10 @@ namespace Illuminate\Support\Facades { * @return bool * @static */ - public static function routeIs($patterns = null) + public static function routeIs(...$patterns) { /** @var \Illuminate\Http\Request $instance */ - return $instance->routeIs($patterns); + return $instance->routeIs(...$patterns); } /** @@ -14741,10 +15126,10 @@ namespace Illuminate\Support\Facades { * @return bool * @static */ - public static function fullUrlIs($patterns = null) + public static function fullUrlIs(...$patterns) { /** @var \Illuminate\Http\Request $instance */ - return $instance->fullUrlIs($patterns); + return $instance->fullUrlIs(...$patterns); } /** @@ -14986,7 +15371,7 @@ namespace Illuminate\Support\Facades { * * @param string|null $param * @param mixed $default - * @return \Illuminate\Routing\Route|object|string + * @return \Illuminate\Routing\Route|object|string|null * @static */ public static function route($param = null, $default = null) @@ -16468,6 +16853,19 @@ namespace Illuminate\Support\Facades { return $instance->anyFilled($keys); } + /** + * Determine if the request is missing a given input item key. + * + * @param string|array $key + * @return bool + * @static + */ + public static function missing($key) + { + /** @var \Illuminate\Http\Request $instance */ + return $instance->missing($key); + } + /** * Get the keys for all of the input and files. * @@ -16497,8 +16895,8 @@ namespace Illuminate\Support\Facades { * Retrieve an input item from the request. * * @param string|null $key - * @param string|array|null $default - * @return string|array|null + * @param mixed $default + * @return mixed * @static */ public static function input($key = null, $default = null) @@ -16507,6 +16905,22 @@ namespace Illuminate\Support\Facades { return $instance->input($key, $default); } + /** + * Retrieve input as a boolean value. + * + * Returns true when value is "1", "true", "on", and "yes". Otherwise, returns false. + * + * @param string|null $key + * @param bool $default + * @return bool + * @static + */ + public static function boolean($key = null, $default = false) + { + /** @var \Illuminate\Http\Request $instance */ + return $instance->boolean($key, $default); + } + /** * Get a subset containing the provided keys with values from the input data. * @@ -16671,9 +17085,19 @@ namespace Illuminate\Support\Facades { * * @static */ - public static function validate($rules, $params = null) + public static function validate($rules, ...$params) { - return \Illuminate\Http\Request::validate($rules, $params); + return \Illuminate\Http\Request::validate($rules, ...$params); + } + + /** + * + * + * @static + */ + public static function validateWithBag($errorBag, $rules, ...$params) + { + return \Illuminate\Http\Request::validateWithBag($errorBag, $rules, ...$params); } /** @@ -16690,6 +17114,26 @@ namespace Illuminate\Support\Facades { } +namespace Illuminate\Support { + + /** + * + * + */ + class Arr { + + } + + /** + * + * + */ + class Str { + + } + +} + namespace Collective\Html { /** @@ -17875,432 +18319,6 @@ namespace Collective\Html { } } - - /** - * - * - * @see \Collective\Html\HtmlBuilder - */ - class HtmlFacade { - - /** - * Convert an HTML string to entities. - * - * @param string $value - * @return string - * @static - */ - public static function entities($value) - { - /** @var \Collective\Html\HtmlBuilder $instance */ - return $instance->entities($value); - } - - /** - * Convert entities to HTML characters. - * - * @param string $value - * @return string - * @static - */ - public static function decode($value) - { - /** @var \Collective\Html\HtmlBuilder $instance */ - return $instance->decode($value); - } - - /** - * Generate a link to a JavaScript file. - * - * @param string $url - * @param array $attributes - * @param bool $secure - * @return \Illuminate\Support\HtmlString - * @static - */ - public static function script($url, $attributes = [], $secure = null) - { - /** @var \Collective\Html\HtmlBuilder $instance */ - return $instance->script($url, $attributes, $secure); - } - - /** - * Generate a link to a CSS file. - * - * @param string $url - * @param array $attributes - * @param bool $secure - * @return \Illuminate\Support\HtmlString - * @static - */ - public static function style($url, $attributes = [], $secure = null) - { - /** @var \Collective\Html\HtmlBuilder $instance */ - return $instance->style($url, $attributes, $secure); - } - - /** - * Generate an HTML image element. - * - * @param string $url - * @param string $alt - * @param array $attributes - * @param bool $secure - * @return \Illuminate\Support\HtmlString - * @static - */ - public static function image($url, $alt = null, $attributes = [], $secure = null) - { - /** @var \Collective\Html\HtmlBuilder $instance */ - return $instance->image($url, $alt, $attributes, $secure); - } - - /** - * Generate a link to a Favicon file. - * - * @param string $url - * @param array $attributes - * @param bool $secure - * @return \Illuminate\Support\HtmlString - * @static - */ - public static function favicon($url, $attributes = [], $secure = null) - { - /** @var \Collective\Html\HtmlBuilder $instance */ - return $instance->favicon($url, $attributes, $secure); - } - - /** - * Generate a HTML link. - * - * @param string $url - * @param string $title - * @param array $attributes - * @param bool $secure - * @param bool $escape - * @return \Illuminate\Support\HtmlString - * @static - */ - public static function link($url, $title = null, $attributes = [], $secure = null, $escape = true) - { - /** @var \Collective\Html\HtmlBuilder $instance */ - return $instance->link($url, $title, $attributes, $secure, $escape); - } - - /** - * Generate a HTTPS HTML link. - * - * @param string $url - * @param string $title - * @param array $attributes - * @return \Illuminate\Support\HtmlString - * @static - */ - public static function secureLink($url, $title = null, $attributes = []) - { - /** @var \Collective\Html\HtmlBuilder $instance */ - return $instance->secureLink($url, $title, $attributes); - } - - /** - * Generate a HTML link to an asset. - * - * @param string $url - * @param string $title - * @param array $attributes - * @param bool $secure - * @return \Illuminate\Support\HtmlString - * @static - */ - public static function linkAsset($url, $title = null, $attributes = [], $secure = null) - { - /** @var \Collective\Html\HtmlBuilder $instance */ - return $instance->linkAsset($url, $title, $attributes, $secure); - } - - /** - * Generate a HTTPS HTML link to an asset. - * - * @param string $url - * @param string $title - * @param array $attributes - * @return \Illuminate\Support\HtmlString - * @static - */ - public static function linkSecureAsset($url, $title = null, $attributes = []) - { - /** @var \Collective\Html\HtmlBuilder $instance */ - return $instance->linkSecureAsset($url, $title, $attributes); - } - - /** - * Generate a HTML link to a named route. - * - * @param string $name - * @param string $title - * @param array $parameters - * @param array $attributes - * @return \Illuminate\Support\HtmlString - * @static - */ - public static function linkRoute($name, $title = null, $parameters = [], $attributes = []) - { - /** @var \Collective\Html\HtmlBuilder $instance */ - return $instance->linkRoute($name, $title, $parameters, $attributes); - } - - /** - * Generate a HTML link to a controller action. - * - * @param string $action - * @param string $title - * @param array $parameters - * @param array $attributes - * @return \Illuminate\Support\HtmlString - * @static - */ - public static function linkAction($action, $title = null, $parameters = [], $attributes = []) - { - /** @var \Collective\Html\HtmlBuilder $instance */ - return $instance->linkAction($action, $title, $parameters, $attributes); - } - - /** - * Generate a HTML link to an email address. - * - * @param string $email - * @param string $title - * @param array $attributes - * @param bool $escape - * @return \Illuminate\Support\HtmlString - * @static - */ - public static function mailto($email, $title = null, $attributes = [], $escape = true) - { - /** @var \Collective\Html\HtmlBuilder $instance */ - return $instance->mailto($email, $title, $attributes, $escape); - } - - /** - * Obfuscate an e-mail address to prevent spam-bots from sniffing it. - * - * @param string $email - * @return string - * @static - */ - public static function email($email) - { - /** @var \Collective\Html\HtmlBuilder $instance */ - return $instance->email($email); - } - - /** - * Generates non-breaking space entities based on number supplied. - * - * @param int $num - * @return string - * @static - */ - public static function nbsp($num = 1) - { - /** @var \Collective\Html\HtmlBuilder $instance */ - return $instance->nbsp($num); - } - - /** - * Generate an ordered list of items. - * - * @param array $list - * @param array $attributes - * @return \Illuminate\Support\HtmlString|string - * @static - */ - public static function ol($list, $attributes = []) - { - /** @var \Collective\Html\HtmlBuilder $instance */ - return $instance->ol($list, $attributes); - } - - /** - * Generate an un-ordered list of items. - * - * @param array $list - * @param array $attributes - * @return \Illuminate\Support\HtmlString|string - * @static - */ - public static function ul($list, $attributes = []) - { - /** @var \Collective\Html\HtmlBuilder $instance */ - return $instance->ul($list, $attributes); - } - - /** - * Generate a description list of items. - * - * @param array $list - * @param array $attributes - * @return \Illuminate\Support\HtmlString - * @static - */ - public static function dl($list, $attributes = []) - { - /** @var \Collective\Html\HtmlBuilder $instance */ - return $instance->dl($list, $attributes); - } - - /** - * Build an HTML attribute string from an array. - * - * @param array $attributes - * @return string - * @static - */ - public static function attributes($attributes) - { - /** @var \Collective\Html\HtmlBuilder $instance */ - return $instance->attributes($attributes); - } - - /** - * Obfuscate a string to prevent spam-bots from sniffing it. - * - * @param string $value - * @return string - * @static - */ - public static function obfuscate($value) - { - /** @var \Collective\Html\HtmlBuilder $instance */ - return $instance->obfuscate($value); - } - - /** - * Generate a meta tag. - * - * @param string $name - * @param string $content - * @param array $attributes - * @return \Illuminate\Support\HtmlString - * @static - */ - public static function meta($name, $content, $attributes = []) - { - /** @var \Collective\Html\HtmlBuilder $instance */ - return $instance->meta($name, $content, $attributes); - } - - /** - * Generate an html tag. - * - * @param string $tag - * @param mixed $content - * @param array $attributes - * @return \Illuminate\Support\HtmlString - * @static - */ - public static function tag($tag, $content, $attributes = []) - { - /** @var \Collective\Html\HtmlBuilder $instance */ - return $instance->tag($tag, $content, $attributes); - } - - /** - * Register a custom macro. - * - * @param string $name - * @param object|callable $macro - * @return void - * @static - */ - public static function macro($name, $macro) - { - \Collective\Html\HtmlBuilder::macro($name, $macro); - } - - /** - * Mix another object into the class. - * - * @param object $mixin - * @param bool $replace - * @return void - * @throws \ReflectionException - * @static - */ - public static function mixin($mixin, $replace = true) - { - \Collective\Html\HtmlBuilder::mixin($mixin, $replace); - } - - /** - * Checks if macro is registered. - * - * @param string $name - * @return bool - * @static - */ - public static function hasMacro($name) - { - return \Collective\Html\HtmlBuilder::hasMacro($name); - } - - /** - * Dynamically handle calls to the class. - * - * @param string $method - * @param array $parameters - * @return mixed - * @throws \BadMethodCallException - * @static - */ - public static function macroCall($method, $parameters) - { - /** @var \Collective\Html\HtmlBuilder $instance */ - return $instance->macroCall($method, $parameters); - } - - /** - * Register a custom component. - * - * @param $name - * @param $view - * @param array $signature - * @return void - * @static - */ - public static function component($name, $view, $signature) - { - \Collective\Html\HtmlBuilder::component($name, $view, $signature); - } - - /** - * Check if a component is registered. - * - * @param $name - * @return bool - * @static - */ - public static function hasComponent($name) - { - return \Collective\Html\HtmlBuilder::hasComponent($name); - } - - /** - * Dynamically handle calls to the class. - * - * @param string $method - * @param array $parameters - * @return \Illuminate\Contracts\View\View|mixed - * @throws \BadMethodCallException - * @static - */ - public static function componentCall($method, $parameters) - { - /** @var \Collective\Html\HtmlBuilder $instance */ - return $instance->componentCall($method, $parameters); - } - - } } @@ -20007,6 +20025,19 @@ namespace Barryvdh\DomPDF { return $instance->loadFile($file); } + /** + * Add metadata info + * + * @param array $info + * @return static + * @static + */ + public static function addInfo($info) + { + /** @var \Barryvdh\DomPDF\PDF $instance */ + return $instance->addInfo($info); + } + /** * Load a View and convert to HTML * @@ -20262,6 +20293,8 @@ namespace { class App extends \Illuminate\Support\Facades\App {} + class Arr extends \Illuminate\Support\Arr {} + class Artisan extends \Illuminate\Support\Facades\Artisan {} class Auth extends \Illuminate\Support\Facades\Auth {} @@ -20287,7 +20320,7 @@ namespace { * Create and return an un-saved model instance. * * @param array $attributes - * @return \Illuminate\Database\Eloquent\Model + * @return \Illuminate\Database\Eloquent\Model|static * @static */ public static function make($attributes = []) @@ -20377,7 +20410,7 @@ namespace { /** * Add a basic where clause to the query. * - * @param string|array|\Closure $column + * @param \Closure|string|array $column * @param mixed $operator * @param mixed $value * @param string $boolean @@ -20390,6 +20423,22 @@ namespace { return $instance->where($column, $operator, $value, $boolean); } + /** + * Add a basic where clause to the query, and return the first result. + * + * @param \Closure|string|array $column + * @param mixed $operator + * @param mixed $value + * @param string $boolean + * @return \Illuminate\Database\Eloquent\Model|static + * @static + */ + public static function firstWhere($column, $operator = null, $value = null, $boolean = 'and') + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->firstWhere($column, $operator, $value, $boolean); + } + /** * Add an "or where" clause to the query. * @@ -20601,7 +20650,7 @@ namespace { /** * Execute the query as a "select" statement. * - * @param array $columns + * @param array|string $columns * @return \Illuminate\Database\Eloquent\Collection|static[] * @static */ @@ -20614,7 +20663,7 @@ namespace { /** * Get the hydrated models without eager loading. * - * @param array $columns + * @param array|string $columns * @return \Illuminate\Database\Eloquent\Model[]|static[] * @static */ @@ -20638,9 +20687,9 @@ namespace { } /** - * Get a generator for the given query. + * Get a lazy collection for the given query. * - * @return \Generator + * @return \Illuminate\Support\LazyCollection * @static */ public static function cursor() @@ -20649,22 +20698,6 @@ namespace { return $instance->cursor(); } - /** - * Chunk the results of a query by comparing numeric IDs. - * - * @param int $count - * @param callable $callback - * @param string|null $column - * @param string|null $alias - * @return bool - * @static - */ - public static function chunkById($count, $callback, $column = null, $alias = null) - { - /** @var \Illuminate\Database\Eloquent\Builder $instance */ - return $instance->chunkById($count, $callback, $column, $alias); - } - /** * Get an array with the values of a given column. * @@ -20682,7 +20715,7 @@ namespace { /** * Paginate the given query. * - * @param int $perPage + * @param int|null $perPage * @param array $columns * @param string $pageName * @param int|null $page @@ -20699,7 +20732,7 @@ namespace { /** * Paginate the given query into a simple paginator. * - * @param int $perPage + * @param int|null $perPage * @param array $columns * @param string $pageName * @param int|null $page @@ -20754,7 +20787,7 @@ namespace { /** * Call the given local model scopes. * - * @param array $scopes + * @param array|string $scopes * @return static|mixed * @static */ @@ -20902,6 +20935,43 @@ namespace { return $instance->getMacro($name); } + /** + * Checks if a macro is registered. + * + * @param string $name + * @return bool + * @static + */ + public static function hasMacro($name) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->hasMacro($name); + } + + /** + * Get the given global macro by name. + * + * @param string $name + * @return \Closure + * @static + */ + public static function getGlobalMacro($name) + { + return \Illuminate\Database\Eloquent\Builder::getGlobalMacro($name); + } + + /** + * Checks if a global macro is registered. + * + * @param string $name + * @return bool + * @static + */ + public static function hasGlobalMacro($name) + { + return \Illuminate\Database\Eloquent\Builder::hasGlobalMacro($name); + } + /** * Chunk the results of the query. * @@ -20930,10 +21000,42 @@ namespace { return $instance->each($callback, $count); } + /** + * Chunk the results of a query by comparing IDs. + * + * @param int $count + * @param callable $callback + * @param string|null $column + * @param string|null $alias + * @return bool + * @static + */ + public static function chunkById($count, $callback, $column = null, $alias = null) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->chunkById($count, $callback, $column, $alias); + } + + /** + * Execute a callback over each item while chunking by id. + * + * @param callable $callback + * @param int $count + * @param string|null $column + * @param string|null $alias + * @return bool + * @static + */ + public static function eachById($callback, $count = 1000, $column = null, $alias = null) + { + /** @var \Illuminate\Database\Eloquent\Builder $instance */ + return $instance->eachById($callback, $count, $column, $alias); + } + /** * Execute the query and get the first result. * - * @param array $columns + * @param array|string $columns * @return \Illuminate\Database\Eloquent\Model|object|static|null * @static */ @@ -20989,12 +21091,13 @@ namespace { /** * Add a relationship count / exists condition to the query. * - * @param string|\Illuminate\Database\Eloquent\Relations\Relation $relation + * @param \Illuminate\Database\Eloquent\Relations\Relation|string $relation * @param string $operator * @param int $count * @param string $boolean * @param \Closure|null $callback * @return \Illuminate\Database\Eloquent\Builder|static + * @throws \RuntimeException * @static */ public static function has($relation, $operator = '>=', $count = 1, $boolean = 'and', $callback = null) @@ -21359,14 +21462,15 @@ namespace { /** * Set the table which the query is targeting. * - * @param string $table + * @param \Closure|\Illuminate\Database\Query\Builder|string $table + * @param string|null $as * @return \Illuminate\Database\Query\Builder * @static */ - public static function from($table) + public static function from($table, $as = null) { /** @var \Illuminate\Database\Query\Builder $instance */ - return $instance->from($table); + return $instance->from($table, $as); } /** @@ -21749,15 +21853,15 @@ namespace { /** * Add a "where not null" clause to the query. * - * @param string $column + * @param string|array $columns * @param string $boolean * @return \Illuminate\Database\Query\Builder|static * @static */ - public static function whereNotNull($column, $boolean = 'and') + public static function whereNotNull($columns, $boolean = 'and') { /** @var \Illuminate\Database\Query\Builder $instance */ - return $instance->whereNotNull($column, $boolean); + return $instance->whereNotNull($columns, $boolean); } /** @@ -22106,6 +22210,7 @@ namespace { * @param array $values * @param string $boolean * @return \Illuminate\Database\Query\Builder + * @throws \InvalidArgumentException * @static */ public static function whereRowValues($columns, $operator, $values, $boolean = 'and') @@ -22236,14 +22341,28 @@ namespace { /** * Add a "group by" clause to the query. * - * @param array $groups + * @param array|string $groups * @return \Illuminate\Database\Query\Builder * @static */ - public static function groupBy($groups = null) + public static function groupBy(...$groups) { /** @var \Illuminate\Database\Query\Builder $instance */ - return $instance->groupBy($groups); + return $instance->groupBy(...$groups); + } + + /** + * Add a raw groupBy clause to the query. + * + * @param string $sql + * @param array $bindings + * @return \Illuminate\Database\Query\Builder + * @static + */ + public static function groupByRaw($sql, $bindings = []) + { + /** @var \Illuminate\Database\Query\Builder $instance */ + return $instance->groupByRaw($sql, $bindings); } /** @@ -22325,7 +22444,7 @@ namespace { /** * Add an "order by" clause to the query. * - * @param string $column + * @param \Closure|\Illuminate\Database\Query\Builder|string $column * @param string $direction * @return \Illuminate\Database\Query\Builder * @throws \InvalidArgumentException @@ -22600,6 +22719,32 @@ namespace { return $instance->doesntExist(); } + /** + * Execute the given callback if no rows exist for the current query. + * + * @param \Closure $callback + * @return mixed + * @static + */ + public static function existsOr($callback) + { + /** @var \Illuminate\Database\Query\Builder $instance */ + return $instance->existsOr($callback); + } + + /** + * Execute the given callback if rows exist for the current query. + * + * @param \Closure $callback + * @return mixed + * @static + */ + public static function doesntExistOr($callback) + { + /** @var \Illuminate\Database\Query\Builder $instance */ + return $instance->doesntExistOr($callback); + } + /** * Retrieve the "count" result of the query. * @@ -22751,7 +22896,7 @@ namespace { * * @param array $columns * @param \Closure|\Illuminate\Database\Query\Builder|string $query - * @return bool + * @return int * @static */ public static function insertUsing($columns, $query) @@ -22979,18 +23124,6 @@ namespace { \Illuminate\Database\Query\Builder::mixin($mixin, $replace); } - /** - * Checks if macro is registered. - * - * @param string $name - * @return bool - * @static - */ - public static function hasMacro($name) - { - return \Illuminate\Database\Query\Builder::hasMacro($name); - } - /** * Dynamically handle calls to the class. * @@ -23041,18 +23174,18 @@ namespace { class Storage extends \Illuminate\Support\Facades\Storage {} + class Str extends \Illuminate\Support\Str {} + class URL extends \Illuminate\Support\Facades\URL {} class Validator extends \Illuminate\Support\Facades\Validator {} class View extends \Illuminate\Support\Facades\View {} - class Input extends \Illuminate\Support\Facades\Input {} + class Input extends \Illuminate\Support\Facades\Request {} class Form extends \Collective\Html\FormFacade {} - class HTML extends \Collective\Html\HtmlFacade {} - class Image extends \Intervention\Image\Facades\Image {} class Carbon extends \Carbon\Carbon {} diff --git a/_ide_helper_models.php b/_ide_helper_models.php index 1eeb96a..a4f2771 100644 --- a/_ide_helper_models.php +++ b/_ide_helper_models.php @@ -198,6 +198,8 @@ namespace App\Models\Sym{ * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\TravelCountry whereContactText4($value) * @property array|null $contact_lands * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\TravelCountry whereContactLands($value) + * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Booking[] $bookings + * @property-read int|null $bookings_count */ class TravelCountry extends \Eloquent {} } @@ -2184,6 +2186,7 @@ namespace App\Models{ * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereUpdatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereWebsiteId($value) * @mixin \Eloquent + * @property-read \App\Models\Sym\TravelCountry|null $travel_country_crm */ class Lead extends \Eloquent {} } diff --git a/app/Http/Controllers/API/CMSContentController.php b/app/Http/Controllers/API/CMSContentController.php index f3a213b..df40551 100755 --- a/app/Http/Controllers/API/CMSContentController.php +++ b/app/Http/Controllers/API/CMSContentController.php @@ -141,7 +141,6 @@ class CMSContentController extends Controller public function makeNaviTree(IQContentTree $iq_content_tree, $urlArray = [], $url = "", $lvl = 0, $parent_id = false) { - $link = false; if (!empty($urlArray[$lvl])) { $link = ($urlArray[$lvl]); diff --git a/app/Http/Controllers/API/DraftController.php b/app/Http/Controllers/API/DraftController.php index b9b3a58..f05088a 100755 --- a/app/Http/Controllers/API/DraftController.php +++ b/app/Http/Controllers/API/DraftController.php @@ -8,6 +8,7 @@ use App\Models\Draft; use App\Models\TravelProgram; use Carbon\Carbon; use HTMLHelper; +use Request; class DraftController extends Controller @@ -49,7 +50,7 @@ class DraftController extends Controller } if ($action === "create_drafts_from_fewo") { - $data = \Input::all(); + $data = Request::all(); $start_date = Carbon::parse($data['startDateStr']); $end_date = Carbon::parse($data['endDateStr']); $pos = 0; diff --git a/app/Http/Controllers/API/FewoController.php b/app/Http/Controllers/API/FewoController.php index 81c1b3f..df83934 100755 --- a/app/Http/Controllers/API/FewoController.php +++ b/app/Http/Controllers/API/FewoController.php @@ -7,7 +7,7 @@ use App\Mail\MailSendFeWoService; use App\Models\TravelUser; use App\Models\TravelUserBookingFewo; use Illuminate\Support\Facades\Mail; -use Input; +use Request; use Validator; class FewoController extends Controller @@ -24,7 +24,7 @@ class FewoController extends Controller { if ($action == "create_travel_users") { - $data = \Input::all(); + $data = Request::all(); if(!isset($data['travel_user']) && !is_array($data['travel_user'])) { return response()->json(['error' => 'travel_user not exist, but need'], $this->errorStatus); } @@ -77,7 +77,7 @@ class FewoController extends Controller if ($action == "create_fewo_booking") { - $data = \Input::all(); + $data = Request::all(); if(!isset($data['travel_user_booking_fewo']) && !is_array($data['travel_user_booking_fewo'])) { return response()->json(['error' => 'travel_user_booking_fewo not exist, but need'], $this->errorStatus); } diff --git a/app/Http/Controllers/API/UserController.php b/app/Http/Controllers/API/UserController.php index 4461c79..6916620 100755 --- a/app/Http/Controllers/API/UserController.php +++ b/app/Http/Controllers/API/UserController.php @@ -2,7 +2,7 @@ namespace App\Http\Controllers\API; -use Illuminate\Http\Request; +use Request; use App\Http\Controllers\Controller; use App\User; use Illuminate\Support\Facades\Auth; diff --git a/app/Http/Controllers/Admin/ReportController.php b/app/Http/Controllers/Admin/ReportController.php index dfb5822..f4e9e3c 100755 --- a/app/Http/Controllers/Admin/ReportController.php +++ b/app/Http/Controllers/Admin/ReportController.php @@ -13,7 +13,6 @@ use App\Services\Util; use Carbon\Carbon; use HTMLHelper; use Illuminate\Validation\Rules\In; -use Input; use Maatwebsite\Excel\Facades\Excel; use Request; use Response; @@ -45,21 +44,21 @@ class ReportController extends Controller public function providersExport(){ $query = ServiceProviderEntry::with('booking', 'service_provider', 'booking.customer'); - if(Input::get('filter_is_cleared') != ""){ - $query->where('is_cleared', '=', Input::get('filter_is_cleared')); + if(Request::get('filter_is_cleared') != ""){ + $query->where('is_cleared', '=', Request::get('filter_is_cleared')); } - if(Input::get('filter_service_provider_id') != ""){ - $query->where('service_provider_id', '=', Input::get('filter_service_provider_id')); + if(Request::get('filter_service_provider_id') != ""){ + $query->where('service_provider_id', '=', Request::get('filter_service_provider_id')); } - if(Input::get('filter_travel_date_from') != ""){ + if(Request::get('filter_travel_date_from') != ""){ $query->whereHas('booking', function ($q) { - $travel_date_from = Carbon::parse(Input::get('filter_travel_date_from'))->format("Y-m-d"); + $travel_date_from = Carbon::parse(Request::get('filter_travel_date_from'))->format("Y-m-d"); $q->where("start_date", '>=', $travel_date_from); }); } - if(Input::get('filter_travel_date_to') != ""){ + if(Request::get('filter_travel_date_to') != ""){ $query->whereHas('booking', function ($q) { - $travel_date_to = Carbon::parse(Input::get('filter_travel_date_to'))->format("Y-m-d"); + $travel_date_to = Carbon::parse(Request::get('filter_travel_date_to'))->format("Y-m-d"); $q->where("start_date", '<=', $travel_date_to); }); } @@ -71,7 +70,7 @@ class ReportController extends Controller $filename = "file-".date('Y-m-d-H-i-s'); $exports = $query->get(); $columns = []; - if(Input::get('export') === "export"){ + if(Request::get('export') === "export"){ $filename = "Export_".date('Y-m-d-H-i-s'); $headers = array( @@ -114,7 +113,7 @@ class ReportController extends Controller $isset[] = $export->booking->lead_id; } } - if(Input::get('export') === "export_lt"){ + if(Request::get('export') === "export_lt"){ $filename = "Export_LT_".date('Y-m-d-H-i-s'); $headers = array( @@ -162,21 +161,21 @@ class ReportController extends Controller $query = ServiceProviderEntry::with('booking', 'service_provider', 'booking.customer'); - if(Input::get('filter_is_cleared') != ""){ - $query->where('is_cleared', '=', Input::get('filter_is_cleared')); + if(Request::get('filter_is_cleared') != ""){ + $query->where('is_cleared', '=', Request::get('filter_is_cleared')); } - if(Input::get('filter_service_provider_id') != ""){ - $query->where('service_provider_id', '=', Input::get('filter_service_provider_id')); + if(Request::get('filter_service_provider_id') != ""){ + $query->where('service_provider_id', '=', Request::get('filter_service_provider_id')); } - if(Input::get('filter_travel_date_from') != ""){ + if(Request::get('filter_travel_date_from') != ""){ $query->whereHas('booking', function ($q) { - $travel_date_from = Carbon::parse(Input::get('filter_travel_date_from'))->format("Y-m-d"); + $travel_date_from = Carbon::parse(Request::get('filter_travel_date_from'))->format("Y-m-d"); $q->where("start_date", '>=', $travel_date_from); }); } - if(Input::get('filter_travel_date_to') != ""){ + if(Request::get('filter_travel_date_to') != ""){ $query->whereHas('booking', function ($q) { - $travel_date_to = Carbon::parse(Input::get('filter_travel_date_to'))->format("Y-m-d"); + $travel_date_to = Carbon::parse(Request::get('filter_travel_date_to'))->format("Y-m-d"); $q->where("start_date", '<=', $travel_date_to); }); } diff --git a/app/Http/Controllers/AdminUserController.php b/app/Http/Controllers/AdminUserController.php index a76de9a..3d0e55f 100755 --- a/app/Http/Controllers/AdminUserController.php +++ b/app/Http/Controllers/AdminUserController.php @@ -10,13 +10,10 @@ use App\Repositories\UserRepository; use App\Services\HTMLHelper; use App\User; use Illuminate\Support\Facades\Mail; -use Input; use Request; use Validator; use DataTables; - - class AdminUserController extends Controller { protected $userRepo; @@ -63,7 +60,7 @@ class AdminUserController extends Controller public function store() { - $data = Input::all(); + $data = Request::all(); if($data['user_id'] === "new"){ $rules = array( @@ -76,9 +73,9 @@ class AdminUserController extends Controller 'name' => 'required' ); } - $validator = Validator::make(Input::all(), $rules); + $validator = Validator::make(Request::all(), $rules); if ($validator->fails()) { - return back()->withInput(Input::all())->withErrors($validator); + return back()->withRequest(Request::all())->withErrors($validator); } if($data['user_id'] === "new"){ @@ -140,7 +137,7 @@ class AdminUserController extends Controller public function updateModal($step = false){ if($step == 'user'){ - $data = Input::all(); + $data = Request::all(); $user = User::findOrFail($data['id']); $user->permissions = isset($data['permissions']) ? $data['permissions'] : []; diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index c9ee721..cf40ac0 100755 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -5,7 +5,7 @@ namespace App\Http\Controllers\Auth; use App\Http\Controllers\Controller; use Illuminate\Foundation\Auth\AuthenticatesUsers; -use Illuminate\Http\Request; +use Illuminate\Http\Request;; class LoginController extends Controller diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php index bb28d06..d34311d 100755 --- a/app/Http/Controllers/Auth/RegisterController.php +++ b/app/Http/Controllers/Auth/RegisterController.php @@ -4,7 +4,7 @@ namespace App\Http\Controllers\Auth; use App\User; use App\Http\Controllers\Controller; -use Illuminate\Http\Request; +use Request; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Validator; use Illuminate\Foundation\Auth\RegistersUsers; diff --git a/app/Http/Controllers/BookingController.php b/app/Http/Controllers/BookingController.php index e4fb6dc..28998a6 100755 --- a/app/Http/Controllers/BookingController.php +++ b/app/Http/Controllers/BookingController.php @@ -5,7 +5,7 @@ namespace App\Http\Controllers; use App\Models\Booking; use App\Models\BookingDraftItem; use App\Repositories\BookingRepository; -use Input; +use Request; class BookingController extends Controller { @@ -50,7 +50,7 @@ class BookingController extends Controller // \Session()->flash('alert-save', '1'); - $data = Input::all(); + $data = Request::all(); if($id == "new") { $booking = new Booking(); }else{ diff --git a/app/Http/Controllers/CMS/CMSContentAuthorController.php b/app/Http/Controllers/CMS/CMSContentAuthorController.php new file mode 100755 index 0000000..38296ca --- /dev/null +++ b/app/Http/Controllers/CMS/CMSContentAuthorController.php @@ -0,0 +1,91 @@ + CMSAuthor::all()->sortByDesc('id') + ]; + return view('cms.content.author.index', $data); + } + + public function store() + { + $data = Request::all(); + $rules = array( + 'name' => 'required', + ); + $validator = Validator::make(Request::all(), $rules); + + if ($validator->fails()) { + return back()->withErrors($validator); + } + + if($data['id'] === "new"){ + CMSAuthor::create($data); + }else{ + + $model = CMSAuthor::find($data['id']); + $model->fill($data); + $model->save(); + } + \Session()->flash('alert-save', '1'); + return redirect(route('cms_content_author')); + } + + + public function loadModal() + { + if(Request::ajax()){ + $data = Request::all(); + $returnHTML = ""; + if(isset($data['model']) && isset($data['id']) ){ + if($data['model'] === 'content'){ + if($data['id'] === "new"){ + $value = new CMSAuthor(); + }else { + $value = CMSAuthor::find($data['id']); + } + $returnHTML = view("cms.content.author.modal", compact('data','value') )->render(); + } + + } + return response()->json(['response' => $data, 'html'=>$returnHTML]); + } + } + + + + public function delete($id){ + $content = CMSAuthor::findOrFail($id); + $content->delete(); + \Session()->flash('alert-success', __('Autor gelöscht')); + return redirect(route('cms_content_author')); + } + + + + + +} diff --git a/app/Http/Controllers/CMS/CMSContentController.php b/app/Http/Controllers/CMS/CMSContentController.php index 2625437..39f62b7 100755 --- a/app/Http/Controllers/CMS/CMSContentController.php +++ b/app/Http/Controllers/CMS/CMSContentController.php @@ -5,7 +5,6 @@ namespace App\Http\Controllers\CMS; use App\Http\Controllers\Controller; use App\Models\CMSContent; -use Input; use Request; use Validator; @@ -35,12 +34,12 @@ class CMSContentController extends Controller public function store() { - $data = Input::all(); + $data = Request::all(); $rules = array( 'name' => 'required', 'field' => 'required', ); - $validator = Validator::make(Input::all(), $rules); + $validator = Validator::make(Request::all(), $rules); if ($validator->fails()) { return back()->withErrors($validator); @@ -69,7 +68,7 @@ class CMSContentController extends Controller public function loadModal() { if(Request::ajax()){ - $data = Input::all(); + $data = Request::all(); $returnHTML = ""; if(isset($data['model']) && isset($data['id']) ){ if($data['model'] == 'content'){ diff --git a/app/Http/Controllers/CMS/CMSContentCountryController.php b/app/Http/Controllers/CMS/CMSContentCountryController.php index 0254a7c..21021a2 100755 --- a/app/Http/Controllers/CMS/CMSContentCountryController.php +++ b/app/Http/Controllers/CMS/CMSContentCountryController.php @@ -7,7 +7,6 @@ use App\Http\Controllers\Controller; use App\Models\CMSContent; use App\Models\TravelCountry; use App\Models\TravelNationality; -use Input; use Request; use Validator; @@ -53,7 +52,7 @@ class CMSContentCountryController extends Controller public function store($id) { - $data = Input::all(); + $data = Request::all(); if(!isset($data['contact_lands'])){ $data['contact_lands'] = null; } diff --git a/app/Http/Controllers/CMS/CMSContentInfoController.php b/app/Http/Controllers/CMS/CMSContentInfoController.php index ba71b51..736370c 100755 --- a/app/Http/Controllers/CMS/CMSContentInfoController.php +++ b/app/Http/Controllers/CMS/CMSContentInfoController.php @@ -9,7 +9,6 @@ use App\Models\CMSInfo; use App\Models\CMSInfoAvailable; use App\Models\CMSInfoHoliday; use App\Services\HTMLHelper; -use Input; use Request; use Validator; @@ -40,7 +39,7 @@ class CMSContentInfoController extends Controller public function store() { - $data = Input::all(); + $data = Request::all(); if($data['action'] === "saveAll"){ diff --git a/app/Http/Controllers/CMS/CMSFeedbackController.php b/app/Http/Controllers/CMS/CMSFeedbackController.php index 5c12adf..de29f69 100755 --- a/app/Http/Controllers/CMS/CMSFeedbackController.php +++ b/app/Http/Controllers/CMS/CMSFeedbackController.php @@ -6,7 +6,7 @@ namespace App\Http\Controllers\CMS; use App\Http\Controllers\Controller; use App\Models\Feedback; use Carbon\Carbon; -use Input; +use Request; class CMSFeedbackController extends Controller { @@ -56,7 +56,7 @@ class CMSFeedbackController extends Controller public function store($id) { - $data = Input::all(); + $data = Request::all(); if($id == "new") { if(!isset($data['feedback_parent']) && !$data['feedback_parent']) { diff --git a/app/Http/Controllers/CMS/CMSSidebarController.php b/app/Http/Controllers/CMS/CMSSidebarController.php index 41920c9..0e7e796 100755 --- a/app/Http/Controllers/CMS/CMSSidebarController.php +++ b/app/Http/Controllers/CMS/CMSSidebarController.php @@ -5,7 +5,7 @@ namespace App\Http\Controllers\CMS; use App\Http\Controllers\Controller; use App\Models\SidebarWidget; -use Input; +use Request; class CMSSidebarController extends Controller @@ -57,7 +57,7 @@ class CMSSidebarController extends Controller public function store($id) { - $data = Input::all(); + $data = Request::all(); if($id == "new") { $widget = new SidebarWidget(); }else{ diff --git a/app/Http/Controllers/CMS/CMSTravelGuideController.php b/app/Http/Controllers/CMS/CMSTravelGuideController.php index 24701fd..311e503 100755 --- a/app/Http/Controllers/CMS/CMSTravelGuideController.php +++ b/app/Http/Controllers/CMS/CMSTravelGuideController.php @@ -8,10 +8,10 @@ use App\Models\IQContentTree; use App\Models\IQContentTreeNode; use App\Models\TravelGuide; use App\Models\TravelPageGuide; -use AppBundle\Util; -use Gregwar\Image\Image; -use Illuminate\Http\Request; -use Input; +#use AppBundle\Util; +#use Gregwar\Image\Image; +use IqContent\LaravelFilemanager\Lfm; +use Request; use Validator; class CMSTravelGuideController extends Controller @@ -44,7 +44,6 @@ class CMSTravelGuideController extends Controller public function page() { - //make tree $data = [ 'travel_guide_pages' => TravelPageGuide::getPageGuides(), @@ -56,7 +55,7 @@ class CMSTravelGuideController extends Controller public function detail($id) { - if($id == "new") { + if($id === "new") { $model = new TravelGuide(); $id = 'new'; $model->active = 1; @@ -65,15 +64,15 @@ class CMSTravelGuideController extends Controller $model = TravelGuide::findOrFail($id); $id = $model->id; } - - if(Input::get('clean') == "true"){ + if(Request::get('clean') === "true"){ $model->full_text = \App\Services\Util::cleanHTML($model->full_text); } - $data = [ + 'response_clean' => Request::get('clean'), 'travel_guide' => $model, 'id' => $id, + 'lfm_helper' => app(Lfm::class), ]; return view('cms.travel_guide.detail', $data); @@ -83,7 +82,7 @@ class CMSTravelGuideController extends Controller public function pageDetail($id) { - if($id == "new") { + if($id === "new") { /* $model = new TravelGuide(); $id = 'new'; $model->active = 1; @@ -104,13 +103,13 @@ class CMSTravelGuideController extends Controller public function store($id) { - $data = Input::all(); + $data = Request::all(); $data['active'] = isset($data['active']) ? true : false; $data['scope'] = isset($data['scope']) ? true : false; $rules = array( 'name' => 'required', ); - if($id != "new") { + if($id !== "new") { $model = TravelGuide::findOrFail($id); $rules = array( @@ -121,12 +120,12 @@ class CMSTravelGuideController extends Controller } - $validator = Validator::make(Input::all(), $rules); + $validator = Validator::make(Request::all(), $rules); if ($validator->fails()) { return back()->withErrors($validator); } - if($id == "new") { + if($id === "new") { $model = TravelGuide::create($data); }else{ $model = TravelGuide::findOrFail($id); @@ -141,14 +140,14 @@ class CMSTravelGuideController extends Controller public function pageStore($id) { - $data = Input::all(); + $data = Request::all(); $data['status'] = isset($data['status']) ? 1 : 0; $data['show_in_navi'] = isset($data['show_in_navi']) ? 1 : 0; $rules = array( 'title' => 'required', ); - if($id != "new") { + if($id !== "new") { $model = TravelPageGuide::findOrFail($id); $rules = array( @@ -158,12 +157,12 @@ class CMSTravelGuideController extends Controller } - $validator = Validator::make(Input::all(), $rules); + $validator = Validator::make(Request::all(), $rules); if ($validator->fails()) { return back()->withErrors($validator); } - if($id == "new") { + if($id === "new") { $model = TravelPageGuide::create($data); }else{ $model = TravelPageGuide::findOrFail($id); diff --git a/app/Http/Controllers/DataTableController.php b/app/Http/Controllers/DataTableController.php index 2cdbc38..ffe3aa5 100644 --- a/app/Http/Controllers/DataTableController.php +++ b/app/Http/Controllers/DataTableController.php @@ -8,7 +8,6 @@ use Carbon\Carbon; use Composer\DependencyResolver\Request; use DataTables; use App\User; -use Input; class DataTableController extends Controller { diff --git a/app/Http/Controllers/DraftController.php b/app/Http/Controllers/DraftController.php index ff7b94b..18ae12e 100755 --- a/app/Http/Controllers/DraftController.php +++ b/app/Http/Controllers/DraftController.php @@ -5,7 +5,6 @@ namespace App\Http\Controllers; use App\Models\Draft; use App\Models\DraftItem; use App\Models\DraftType; -use Input; class DraftController extends Controller { @@ -48,7 +47,7 @@ class DraftController extends Controller public function store($id) { - $data = Input::all(); + $data = Request::all(); if($id == "new") { $draft = new Draft(); }else{ @@ -145,7 +144,7 @@ class DraftController extends Controller */ public function typeUpdate(){ - $data = Input::all(); + $data = Request::all(); if($data['id'] == "new"){ $draft_type = DraftType::create([ 'name' => $data['name'], @@ -184,7 +183,7 @@ class DraftController extends Controller * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function loadOldAction(){ - $data = Input::all(); + $data = Request::all(); $template = \App\Models\Sym\ArrangementTemplate::findOrFail($data['load_old']); $draft = new Draft(); @@ -259,7 +258,7 @@ class DraftController extends Controller * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function loadNewAction(){ - $data = Input::all(); + $data = Request::all(); $d = Draft::findOrFail($data['load_new']); $draft = new Draft(); $draft->active = true; diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index c21e6ea..ee0bb93 100755 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -8,7 +8,6 @@ use Auth; use Carbon\Carbon; use Config; use Request; -use Input; class HomeController extends Controller { @@ -50,8 +49,8 @@ class HomeController extends Controller public function loadingModal(){ - $data = Input::get('data'); - $target = Input::get('target'); + $data = Request::get('data'); + $target = Request::get('target'); $response = ""; if($data == "data_protection"){ diff --git a/app/Http/Controllers/IQ/ContentAssetController.php b/app/Http/Controllers/IQ/ContentAssetController.php index 3a58640..9beaf2c 100755 --- a/app/Http/Controllers/IQ/ContentAssetController.php +++ b/app/Http/Controllers/IQ/ContentAssetController.php @@ -3,7 +3,7 @@ namespace App\Http\Controllers\IQ; use App\Http\Controllers\Controller; -use Illuminate\Http\Request; +use Request; use IqContent\LaravelFilemanager\Controllers\LfmController; class ContentAssetController extends LfmController @@ -14,7 +14,18 @@ class ContentAssetController extends LfmController { $data = [ 'models' => [], + 'lfm_helper' => $this->helper, + 'modal' => false, ]; - return view('iq.content.assets.index', $data)->withHelper($this->helper); + return view('iq.content.assets.index', $data); + } + + public function modal(){ + $data = [ + 'models' => [], + 'lfm_helper' => $this->helper, + 'modal' => true, + ]; + return view('iq.content.assets.body', $data); } } diff --git a/app/Http/Controllers/IQ/ContentModalController.php b/app/Http/Controllers/IQ/ContentModalController.php index 8f2e0c5..a1df9a9 100755 --- a/app/Http/Controllers/IQ/ContentModalController.php +++ b/app/Http/Controllers/IQ/ContentModalController.php @@ -12,7 +12,6 @@ use App\Models\IQContentTree; use App\Models\IQContentTreeNode; use Illuminate\Database\Eloquent\Collection; use Request; -use Input; class ContentModalController extends Controller { @@ -32,8 +31,8 @@ class ContentModalController extends Controller */ public function load() { - if(\Request::ajax()){ - $data = Input::all(); + if(Request::ajax()){ + $data = Request::all(); $ret = ""; if(isset($data['model']) && isset($data['id']) ){ switch ($data['model']){ diff --git a/app/Http/Controllers/IQ/ContentTreeController.php b/app/Http/Controllers/IQ/ContentTreeController.php index 8d35f69..499a72b 100755 --- a/app/Http/Controllers/IQ/ContentTreeController.php +++ b/app/Http/Controllers/IQ/ContentTreeController.php @@ -10,9 +10,8 @@ use App\Models\IQContentTreeNode; use App\Models\TravelGuide; use App\Models\TravelPageGuide; use App\Repositories\IQ\ContentSiteRepository; -use Illuminate\Http\Request; use Illuminate\Support\Collection; -use Input; +use Request; use Validator; class ContentTreeController extends Controller @@ -147,7 +146,7 @@ class ContentTreeController extends Controller public function store($id, $node_id = false, $area_section_id = false) { - $data = Input::all(); + $data = Request::all(); //from ajax if(isset($data['action'])){ @@ -193,7 +192,7 @@ class ContentTreeController extends Controller $rules = array( 'name' => 'required', ); - $validator = Validator::make(Input::all(), $rules); + $validator = Validator::make(Request::all(), $rules); if ($validator->fails()) { return back()->withErrors($validator); } @@ -278,6 +277,42 @@ class ContentTreeController extends Controller } + + public function delete($id, $node_id = false, $section_id = false){ + //TODO delete Node not the tree.... + $model = IQContentTree::findOrFail($id); + $tree_node = IQContentTreeNode::find($node_id); + + if($tree_node){ + $this->recrusiveDelete($id, $tree_node->id); + $tree_node->delete(); + \Session()->flash('alert-success', __('Tree Node gelöscht')); + + } + return redirect(route('iq_content_tree_detail', [$id])); + } + + public function recrusiveDelete($id, $node_id = false, $section_id = false){ + + $model = IQContentTree::findOrFail($id); + $tree_node = IQContentTreeNode::find($node_id); + if($tree_node){ + if($tree_node->iq_content_tree_node_childs->count()){ + foreach ($tree_node->iq_content_tree_node_childs as $child){ + $this->recrusiveDelete($id, $child->id); + $child->delete(); + + } + } + if($tree_node->iq_content_sites->count()){ + foreach ($tree_node->iq_content_sites as $site){ + $site->delete(); + + } + } + } + } + public function removeSite($id, $node_id, $travel_guide_id, $r=false){ $model = IQContentTree::findOrFail($id); $tree_node = IQContentTreeNode::findOrFail($node_id); diff --git a/app/Http/Controllers/IQ/Tools/ContentLinkController.php b/app/Http/Controllers/IQ/Tools/ContentLinkController.php index 15751d3..77583f4 100755 --- a/app/Http/Controllers/IQ/Tools/ContentLinkController.php +++ b/app/Http/Controllers/IQ/Tools/ContentLinkController.php @@ -4,11 +4,10 @@ namespace App\Http\Controllers\IQ\Tools; use App\Http\Controllers\Controller; use App\Models\IQContentSite; -use App\Models\IQContentSiteField; use App\Models\IQContentTree; use App\Models\IQContentTreeNode; use App\Models\TravelGuide; -use Input; +use Request; use Validator; class ContentLinkController extends Controller @@ -96,7 +95,7 @@ class ContentLinkController extends Controller public function readNodeAndSaveToTree(){ - $input = Input::all(); + $input = Request::all(); $ret = []; if(isset($input['text'])){ $out = $this->ul_to_array($input['text']); @@ -226,7 +225,7 @@ class ContentLinkController extends Controller $iqContentTree = IQContentTree::find(2); $this->makeTree($iqContentTree); - $input = Input::all(); + $input = Request::all(); $ret = []; if(isset($input['text'])){ diff --git a/app/Http/Controllers/RequestController.php b/app/Http/Controllers/RequestController.php index 2aae410..7fd97e7 100755 --- a/app/Http/Controllers/RequestController.php +++ b/app/Http/Controllers/RequestController.php @@ -6,7 +6,7 @@ use App\Models\Booking; use App\Models\Sym\TravelCountry; use App\Models\TravelAgenda; use Carbon\Carbon; -use Input; +use Request; use DataTables; class RequestController extends Controller @@ -49,32 +49,32 @@ class RequestController extends Controller $query = Booking::where('lead_id', '!=', NULL); - if(Input::get('full_firstname_search') != ""){ - $query->where('participant_firstname', 'LIKE', '%'.Input::get('full_firstname_search').'%'); + if(Request::get('full_firstname_search') != ""){ + $query->where('participant_firstname', 'LIKE', '%'.Request::get('full_firstname_search').'%'); } - if(Input::get('full_lastname_search') != ""){ - $query->where('participant_name', 'LIKE', '%'.Input::get('full_lastname_search').'%'); + if(Request::get('full_lastname_search') != ""){ + $query->where('participant_name', 'LIKE', '%'.Request::get('full_lastname_search').'%'); } - if(Input::get('travel_option_country_id') != ""){ - $country_ids = TravelCountry::where('contact_lands', 'LIKE', '%"'.Input::get('travel_option_country_id').'"%')->get()->pluck('id'); - $country_ids[] = Input::get('travel_option_country_id'); + if(Request::get('travel_option_country_id') != ""){ + $country_ids = TravelCountry::where('contact_lands', 'LIKE', '%"'.Request::get('travel_option_country_id').'"%')->get()->pluck('id'); + $country_ids[] = Request::get('travel_option_country_id'); $query->whereIn('travel_country_id', $country_ids); } - if(Input::get('travel_option_agenda_id') != ""){ - $query->where('travelagenda_id', '=', Input::get('travel_option_agenda_id')); + if(Request::get('travel_option_agenda_id') != ""){ + $query->where('travelagenda_id', '=', Request::get('travel_option_agenda_id')); } // $query->where('end_date', '<=', $now); - if(Input::get('travel_option_search')){ + if(Request::get('travel_option_search')){ $now = Carbon::now(); - switch (Input::get('travel_option_search')){ + switch (Request::get('travel_option_search')){ case 'before_2': $query->whereBetween('start_date', [Carbon::now()->modify('-2 month'), $now]); @@ -99,14 +99,14 @@ class RequestController extends Controller }else{ $start = null; $end = null; - if(Input::get('arrival_start_date') != ""){ - $arrStart = explode(".", Input::get('arrival_start_date')); + if(Request::get('arrival_start_date') != ""){ + $arrStart = explode(".", Request::get('arrival_start_date')); if(count($arrStart) == 3){ $start = Carbon::create($arrStart[2], $arrStart[1], $arrStart[0], 0, 0, 0); } } - if(Input::get('arrival_end_date') != ""){ - $arrEnd = explode(".", Input::get('arrival_end_date')); + if(Request::get('arrival_end_date') != ""){ + $arrEnd = explode(".", Request::get('arrival_end_date')); if(count($arrEnd) == 3){ $end = Carbon::create($arrEnd[2], $arrEnd[1], $arrEnd[0], 23, 59, 59); } @@ -123,14 +123,14 @@ class RequestController extends Controller $start = null; $end = null; - if(Input::get('departure_start_date') != ""){ - $arrStart = explode(".", Input::get('departure_start_date')); + if(Request::get('departure_start_date') != ""){ + $arrStart = explode(".", Request::get('departure_start_date')); if(count($arrStart) == 3){ $start = Carbon::create($arrStart[2], $arrStart[1], $arrStart[0], 0, 0, 0); } } - if(Input::get('departure_end_date') != ""){ - $arrEnd = explode(".", Input::get('departure_end_date')); + if(Request::get('departure_end_date') != ""){ + $arrEnd = explode(".", Request::get('departure_end_date')); if(count($arrEnd) == 3){ $end = Carbon::create($arrEnd[2], $arrEnd[1], $arrEnd[0], 23, 59, 59); } @@ -148,27 +148,27 @@ class RequestController extends Controller - if(Input::get('sort_travel_country_id') != ""){ - $query->where('travel_country_id', '=', Input::get('sort_travel_country_id')); + if(Request::get('sort_travel_country_id') != ""){ + $query->where('travel_country_id', '=', Request::get('sort_travel_country_id')); } - if(Input::get('sort_travelagenda_id') != ""){ - $query->where('travelagenda_id', '=', Input::get('sort_travelagenda_id')); + if(Request::get('sort_travelagenda_id') != ""){ + $query->where('travelagenda_id', '=', Request::get('sort_travelagenda_id')); } - if(Input::get('sort_sf_guard_user_id') != ""){ - $query->where('sf_guard_user_id', '=', Input::get('sort_sf_guard_user_id')); + if(Request::get('sort_sf_guard_user_id') != ""){ + $query->where('sf_guard_user_id', '=', Request::get('sort_sf_guard_user_id')); } - if(Input::get('sort_travel_documents') != ""){ - $query->where('travel_documents', '=', Input::get('sort_travel_documents')); + if(Request::get('sort_travel_documents') != ""){ + $query->where('travel_documents', '=', Request::get('sort_travel_documents')); } - if(Input::get('full_lead_id_search') != ""){ - $query->where('lead_id', 'LIKE', '%'.Input::get('full_lead_id_search'). '%'); + if(Request::get('full_lead_id_search') != ""){ + $query->where('lead_id', 'LIKE', '%'.Request::get('full_lead_id_search'). '%'); } - if(Input::get('full_booking_id_search') != ""){ - $query->where('id', 'LIKE', '%'.Input::get('full_booking_id_search').'%'); + if(Request::get('full_booking_id_search') != ""){ + $query->where('id', 'LIKE', '%'.Request::get('full_booking_id_search').'%'); } return $query; } diff --git a/app/Http/Controllers/Settings/KeywordController.php b/app/Http/Controllers/Settings/KeywordController.php new file mode 100755 index 0000000..abdff88 --- /dev/null +++ b/app/Http/Controllers/Settings/KeywordController.php @@ -0,0 +1,60 @@ +middleware('admin'); + + } + + public function index($step = false) + { + $data = [ + 'keywords' => Keyword::all(), + ]; + return view('settings.keywords.index', $data); + } + + + public function update(){ + + $data = Request::all(); + if($data['id'] === "new"){ + $model = Keyword::create([ + 'name' => $data['name'], + ]); + }else{ + $model = Keyword::find($data['id']); + $model->name = $data['name']; + $model->save(); + } + + \Session()->flash('alert-save', '1'); + return redirect(route('admin_settings_keyword')); + } + + public function delete($id){ + //TODO check ist linked + /*if(Booking::where('travelagenda_id', $id)->count()){ + \Session()->flash('alert-error', 'Eintrag wird verwendet'); + return redirect()->back(); + }*/ + $model = Keyword::findOrFail($id); + $model->delete(); + \Session()->flash('alert-success', 'Eintrag gelöscht'); + return redirect()->back(); + } + +} + + diff --git a/app/Http/Controllers/Settings/TravelAgendaController.php b/app/Http/Controllers/Settings/TravelAgendaController.php index 85d3cc0..59e88f4 100755 --- a/app/Http/Controllers/Settings/TravelAgendaController.php +++ b/app/Http/Controllers/Settings/TravelAgendaController.php @@ -6,12 +6,7 @@ use App\Http\Controllers\Controller; use App\Models\Booking; use App\Models\TravelAgenda; -use App\Models\TravelCountry; -use App\Models\TravelNationality; -use App\Models\TravelNationalityRequirement; -use Carbon\Carbon; -use HTMLHelper; -use Input; +use Request; class TravelAgendaController extends Controller { @@ -32,7 +27,7 @@ class TravelAgendaController extends Controller public function update(){ - $data = Input::all(); + $data = Request::all(); if($data['id'] == "new"){ $model = TravelAgenda::create([ 'name' => $data['name'], diff --git a/app/Http/Controllers/Settings/TravelCountryController.php b/app/Http/Controllers/Settings/TravelCountryController.php index 97fb7ea..4012fef 100755 --- a/app/Http/Controllers/Settings/TravelCountryController.php +++ b/app/Http/Controllers/Settings/TravelCountryController.php @@ -6,10 +6,7 @@ use App\Http\Controllers\Controller; use App\Models\TravelCountry; use App\Models\TravelNationality; -use App\Models\TravelNationalityRequirement; -use Carbon\Carbon; -use HTMLHelper; -use Input; +use Request; class TravelCountryController extends Controller { @@ -49,7 +46,7 @@ class TravelCountryController extends Controller public function store(){ - $data = Input::all(); + $data = Request::all(); $data['is_customer_country'] = isset($data['is_customer_country']) ? true : false; $data['active_frontend'] = isset($data['active_frontend']) ? true : false; $data['active_backend'] = isset($data['active_backend']) ? true : false; diff --git a/app/Http/Controllers/Settings/TravelNationalityController.php b/app/Http/Controllers/Settings/TravelNationalityController.php index f338ed5..f126047 100755 --- a/app/Http/Controllers/Settings/TravelNationalityController.php +++ b/app/Http/Controllers/Settings/TravelNationalityController.php @@ -4,12 +4,9 @@ namespace App\Http\Controllers\Settings; use App\Http\Controllers\Controller; -use App\Models\TravelCountry; use App\Models\TravelNationality; use App\Models\TravelNationalityRequirement; -use Carbon\Carbon; -use HTMLHelper; -use Input; +use Request; class TravelNationalityController extends Controller { @@ -30,7 +27,7 @@ class TravelNationalityController extends Controller public function update(){ - $data = Input::all(); + $data = Request::all(); if($data['id'] == "new"){ $model = TravelNationality::create([ 'name' => $data['name'], diff --git a/app/Http/Controllers/SyS/Tools/ContentLinkController.php b/app/Http/Controllers/SyS/Tools/ContentLinkController.php index 3be911e..37c8a1c 100755 --- a/app/Http/Controllers/SyS/Tools/ContentLinkController.php +++ b/app/Http/Controllers/SyS/Tools/ContentLinkController.php @@ -8,7 +8,7 @@ use App\Models\IQContentSiteField; use App\Models\IQContentTree; use App\Models\IQContentTreeNode; use App\Models\TravelGuide; -use Input; +use Request; use Validator; class ContentLinkController extends Controller @@ -192,7 +192,7 @@ class ContentLinkController extends Controller public function readNodeAndSaveToTree(){ - $input = Input::all(); + $input = Request::all(); $ret = []; if(isset($input['text'])){ $out = $this->ul_to_array($input['text']); @@ -322,7 +322,7 @@ class ContentLinkController extends Controller $iqContentTree = IQContentTree::find(2); $this->makeTree($iqContentTree); - $input = Input::all(); + $input = Request::all(); $ret = []; if(isset($input['text'])){ diff --git a/app/Http/Controllers/TranslationController.php b/app/Http/Controllers/TranslationController.php index 5567e9c..a3c9dce 100755 --- a/app/Http/Controllers/TranslationController.php +++ b/app/Http/Controllers/TranslationController.php @@ -4,7 +4,7 @@ namespace App\Http\Controllers; use App; use File; -use Input; +use Request; class TranslationController extends Controller { @@ -63,7 +63,7 @@ class TranslationController extends Controller $path = $this->resourcePath($this->languagesPath); $file = $path.$language.".json"; - $data = Input::all(); + $data = Request::all(); $this->backup($path, $language.".json"); unset($data['_token']); diff --git a/app/Http/Controllers/TranslationFileController.php b/app/Http/Controllers/TranslationFileController.php index 73dc728..6734f3b 100755 --- a/app/Http/Controllers/TranslationFileController.php +++ b/app/Http/Controllers/TranslationFileController.php @@ -1,9 +1,5 @@ travelProgramRepo->update($data); \Session()->flash('alert-save', '1'); return redirect(route('travel_program_detail', [$program->id])); @@ -63,7 +63,7 @@ class TravelProgramController extends Controller * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector */ public function classUpdate(){ - $data = Input::all(); + $data = Request::all(); $this->travelProgramRepo->updateClass($data); \Session()->flash('alert-save', '1'); return redirect(route('travel_program_detail', [$data['program_id']])); @@ -89,7 +89,7 @@ class TravelProgramController extends Controller * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector */ public function draftUpdate(){ - $data = Input::all(); + $data = Request::all(); $this->travelProgramRepo->updateDraft($data); \Session()->flash('alert-save', '1'); return redirect(route('travel_program_detail', [$data['travel_program_id']])); diff --git a/app/Http/Controllers/TravelUserBookingFewoController.php b/app/Http/Controllers/TravelUserBookingFewoController.php index cd4a7a4..0825987 100755 --- a/app/Http/Controllers/TravelUserBookingFewoController.php +++ b/app/Http/Controllers/TravelUserBookingFewoController.php @@ -12,7 +12,7 @@ use App\Models\TravelUserBookingFewo; use App\Repositories\TravelUserBookingFewoRepository; use App\Services\Util; use Illuminate\Support\Facades\Mail; -use Input; +use Request; class TravelUserBookingFewoController extends Controller { @@ -69,18 +69,18 @@ class TravelUserBookingFewoController extends Controller public function store($id) { - $data = Input::all(); + $data = Request::all(); if($data['action'] == 'saveAll'){ return $this->userBookingFewoRepo->update($id, $data); } if($data['action'] == 'createInvoice'){ if(!TravelUserBookingFewo::find($id)){ \Session()->flash('alert-error', __('Buchung nicht gefunden.')); - return back()->withInput(Input::all()); + return back()->withRequest(Request::all()); } $ret = $this->userBookingFewoRepo->check($id, $data); if($ret['success'] == false){ - return back()->withInput(Input::all())->withErrors($ret['error']); + return back()->withRequest(Request::all())->withErrors($ret['error']); } if($ret['success'] == true){ $this->userBookingFewoRepo->createInvoicePDF($id); @@ -92,11 +92,11 @@ class TravelUserBookingFewoController extends Controller if($data['action'] == 'createTravelInfo'){ if(!TravelUserBookingFewo::find($id)){ \Session()->flash('alert-error', __('Buchung nicht gefunden.')); - return back()->withInput(Input::all()); + return back()->withRequest(Request::all()); } $ret = $this->userBookingFewoRepo->check($id, $data); if($ret['success'] == false){ - return back()->withInput(Input::all())->withErrors($ret['error']); + return back()->withRequest(Request::all())->withErrors($ret['error']); } if($ret['success'] == true){ $this->userBookingFewoRepo->createTravelInfoPDF($id, $data['info_mail_text']); @@ -110,9 +110,9 @@ class TravelUserBookingFewoController extends Controller $travel_user_booking_fewo = TravelUserBookingFewo::findOrFail($id); if($travel_user_booking_fewo->travel_user_id && $travel_user_booking_fewo->travel_user->email){ $mail_bbc = config('mail.mail_bbc'); - Mail::to($travel_user_booking_fewo->travel_user->email)->bcc($mail_bbc)->send(new MailSendFeWoInvoice($travel_user_booking_fewo, Input::get('send_mail_user_notice'))); + Mail::to($travel_user_booking_fewo->travel_user->email)->bcc($mail_bbc)->send(new MailSendFeWoInvoice($travel_user_booking_fewo, Request::get('send_mail_user_notice'))); $send_user_mail = $travel_user_booking_fewo->send_user_mail; - $send_user_mail[] = [date('H:i d.m.Y') => $travel_user_booking_fewo->travel_user->email." ".Input::get('send_mail_user_notice')]; + $send_user_mail[] = [date('H:i d.m.Y') => $travel_user_booking_fewo->travel_user->email." ".Request::get('send_mail_user_notice')]; $travel_user_booking_fewo->send_user_mail = $send_user_mail; $travel_user_booking_fewo->save(); \Session()->flash('alert-success', __('E-Mail wurde an den Mieter versendet.')); @@ -138,12 +138,12 @@ class TravelUserBookingFewoController extends Controller $travel_user_booking_fewo = TravelUserBookingFewo::findOrFail($id); if($travel_user_booking_fewo){ $mail_bbc = config('mail.mail_bbc'); - Mail::to(Input::get('send_mail_service_mail'))->bcc($mail_bbc)->send(new MailSendFeWoService($travel_user_booking_fewo, Input::get('send_mail_service_subject'), Input::get('send_mail_service_content'))); + Mail::to(Request::get('send_mail_service_mail'))->bcc($mail_bbc)->send(new MailSendFeWoService($travel_user_booking_fewo, Request::get('send_mail_service_subject'), Request::get('send_mail_service_content'))); $send_service_mail = $travel_user_booking_fewo->send_service_mail; $send_service_mail[] = ['d' => date('H:i d.m.Y'), - 'm'=>Input::get('send_mail_service_mail'), - 's'=>Input::get('send_mail_service_subject'), - 'c'=>Input::get('send_mail_service_content')]; + 'm'=>Request::get('send_mail_service_mail'), + 's'=>Request::get('send_mail_service_subject'), + 'c'=>Request::get('send_mail_service_content')]; $travel_user_booking_fewo->send_service_mail = $send_service_mail; $travel_user_booking_fewo->save(); @@ -155,13 +155,13 @@ class TravelUserBookingFewoController extends Controller if($data['action'] == 'sendMailtoEmployee') { $travel_user_booking_fewo = TravelUserBookingFewo::findOrFail($id); if($travel_user_booking_fewo){ - $mails = explode(",", Input::get('send_mail_employee_mail')); - Mail::to($mails)->send(new MailSendFeWoService($travel_user_booking_fewo, Input::get('send_mail_employee_subject'), Input::get('send_mail_employee_content'))); + $mails = explode(",", Request::get('send_mail_employee_mail')); + Mail::to($mails)->send(new MailSendFeWoService($travel_user_booking_fewo, Request::get('send_mail_employee_subject'), Request::get('send_mail_employee_content'))); $send_employee_mail = $travel_user_booking_fewo->send_employee_mail; $send_employee_mail[] = ['d' => date('H:i d.m.Y'), - 'm'=>Input::get('send_mail_employee_mail'), - 's'=>Input::get('send_mail_employee_subject'), - 'c'=>Input::get('send_mail_employee_content')]; + 'm'=>Request::get('send_mail_employee_mail'), + 's'=>Request::get('send_mail_employee_subject'), + 'c'=>Request::get('send_mail_employee_content')]; $travel_user_booking_fewo->send_employee_mail = $send_employee_mail; $travel_user_booking_fewo->save(); diff --git a/app/Http/Controllers/TravelUserController.php b/app/Http/Controllers/TravelUserController.php index 1d94fde..74005fd 100755 --- a/app/Http/Controllers/TravelUserController.php +++ b/app/Http/Controllers/TravelUserController.php @@ -4,7 +4,7 @@ namespace App\Http\Controllers; use App\Models\TravelUser; -use Input; +use Request; use Validator; class TravelUserController extends Controller @@ -43,7 +43,7 @@ class TravelUserController extends Controller public function store($id) { - $data = Input::all(); + $data = Request::all(); $rules = array( 'salutation_id' => 'required', @@ -58,10 +58,10 @@ class TravelUserController extends Controller $rules['email'] = 'required|string|email|max:255|unique:mysql_stern.travel_users,email,'.$model->id; } - $validator = Validator::make(Input::all(), $rules); + $validator = Validator::make(Request::all(), $rules); if ($validator->fails()) { - return back()->withInput(Input::all())->withErrors($validator); + return back()->withRequest(Request::all())->withErrors($validator); } if($id == "new") { diff --git a/app/Http/Controllers/UserDataController.php b/app/Http/Controllers/UserDataController.php index 2be1615..7c969a9 100755 --- a/app/Http/Controllers/UserDataController.php +++ b/app/Http/Controllers/UserDataController.php @@ -4,7 +4,7 @@ namespace App\Http\Controllers; use App\Repositories\UserRepository; use Auth; -use Input; +use Request; use Validator; @@ -41,12 +41,12 @@ class UserDataController extends Controller $rules = array( 'name' => 'required' ); - $validator = Validator::make(Input::all(), $rules); + $validator = Validator::make(Request::all(), $rules); if ($validator->fails()) { - return back()->withInput(Input::all())->withErrors($validator); + return back()->withRequest(Request::all())->withErrors($validator); } else { - $data = Input::all(); + $data = Request::all(); $user->name = $data['name']; $user->save(); \Session()->flash('alert-save', true); @@ -60,7 +60,7 @@ class UserDataController extends Controller public function userDataAcceptedForm(){ $user = Auth::user(); - if(Input::get('sender_accepted_infos') == "on"){ + if(Request::get('sender_accepted_infos') == "on"){ $user->agreement = now(); }else { $user->agreement = null; diff --git a/app/Http/Controllers/UserDeleteController.php b/app/Http/Controllers/UserDeleteController.php index ea519fb..39eb5e4 100755 --- a/app/Http/Controllers/UserDeleteController.php +++ b/app/Http/Controllers/UserDeleteController.php @@ -5,8 +5,7 @@ namespace App\Http\Controllers; use Auth; use Validator; -use Input; -use Illuminate\Http\Request; +use Request; use Illuminate\Support\Facades\Hash; use App\Repositories\UserRepository; @@ -53,7 +52,7 @@ class UserDeleteController extends Controller }); - $validator = Validator::make(Input::all(), $rules); + $validator = Validator::make(Request::all(), $rules); if ($validator->fails()) { diff --git a/app/Http/Controllers/UserUpdateEmailController.php b/app/Http/Controllers/UserUpdateEmailController.php index fd6699c..186a8ee 100755 --- a/app/Http/Controllers/UserUpdateEmailController.php +++ b/app/Http/Controllers/UserUpdateEmailController.php @@ -6,11 +6,9 @@ namespace App\Http\Controllers; use App\User; use Auth; use Validator; -use Input; +use Request; use Carbon\Carbon; use Illuminate\Database\Connection; -use Illuminate\Http\Request; -use App\Http\Controllers\Controller; use App\Mail\ReportExport; use Illuminate\Support\Facades\Mail; @@ -52,7 +50,7 @@ class UserUpdateEmailController extends Controller return true; }); - $validator = Validator::make(Input::all(), $rules); + $validator = Validator::make(Request::all(), $rules); if ($validator->fails()) { // redirect our user back to the form with the errors from the validator $messages = $validator->messages(); @@ -104,7 +102,7 @@ class UserUpdateEmailController extends Controller return true; }); - $validator = Validator::make(Input::all(), $rules); + $validator = Validator::make(Request::all(), $rules); if ($validator->fails()) { // redirect our user back to the form with the errors from the validator $messages = $validator->messages(); diff --git a/app/Http/Controllers/UserUpdatePasswordController.php b/app/Http/Controllers/UserUpdatePasswordController.php index de2bbd0..4acdd52 100755 --- a/app/Http/Controllers/UserUpdatePasswordController.php +++ b/app/Http/Controllers/UserUpdatePasswordController.php @@ -6,8 +6,7 @@ namespace App\Http\Controllers; use Auth; use Illuminate\Support\Facades\Hash; use Validator; -use Input; -use Illuminate\Http\Request; +use Request; class UserUpdatePasswordController extends Controller @@ -45,7 +44,7 @@ class UserUpdatePasswordController extends Controller }); - $validator = Validator::make(Input::all(), $rules); + $validator = Validator::make(Request::all(), $rules); if ($validator->fails()) { @@ -91,7 +90,7 @@ class UserUpdatePasswordController extends Controller ); - $validator = Validator::make(Input::all(), $rules); + $validator = Validator::make(Request::all(), $rules); if ($validator->fails()) { diff --git a/app/Models/CMSAuthor.php b/app/Models/CMSAuthor.php new file mode 100644 index 0000000..609db3a --- /dev/null +++ b/app/Models/CMSAuthor.php @@ -0,0 +1,31 @@ +getUri(); + } + public function getUri(){ $root = $this->iq_content_tree->identifier."/"; diff --git a/app/Models/Keyword.php b/app/Models/Keyword.php new file mode 100644 index 0000000..f590d5d --- /dev/null +++ b/app/Models/Keyword.php @@ -0,0 +1,31 @@ +iq_content_tree_node; } } + return false; } + public function author() + { + return $this->belongsTo('App\Models\Author', 'author_id', 'id'); + } public static function getScopeOptions($setKey = false){ $options = self::$scopes; diff --git a/app/Models/TravelProgram.php b/app/Models/TravelProgram.php index 156fb7e..d7b0a74 100644 --- a/app/Models/TravelProgram.php +++ b/app/Models/TravelProgram.php @@ -124,6 +124,7 @@ class TravelProgram extends Model 'subtitle', 'program_code', 'weekdays', + 'keywords', 'status', ]; @@ -142,6 +143,12 @@ class TravelProgram extends Model return $this->hasOne('App\Models\TravelProgramCountry', 'program_id', 'id'); } + public function hasTravelProgramDrafts (){ + if($this->travel_program_drafts->count()){ + return true; + } + return false; + } public function getWeekdaysArray(){ if($this->weekdays){ return explode(',', $this->weekdays); diff --git a/app/Repositories/TravelUserBookingFewoRepository.php b/app/Repositories/TravelUserBookingFewoRepository.php index 2c47dc3..9c63774 100644 --- a/app/Repositories/TravelUserBookingFewoRepository.php +++ b/app/Repositories/TravelUserBookingFewoRepository.php @@ -14,7 +14,7 @@ use App\Models\TravelUserBookingFewo; use App\Services\Util; use PDF; use Carbon\Carbon; -use Input; +use Request; use Storage; use Validator; @@ -99,7 +99,7 @@ class TravelUserBookingFewoRepository extends BaseRepository { 'status' => 'required' ); // $rules['email'] = 'required|string|email|max:255|unique:.travel_users,email,'.$model->id; - $validator = Validator::make(Input::all(), $rules); + $validator = Validator::make(Request::all(), $rules); if ($validator->fails()) { return ['success' => false, 'error' => $validator]; } @@ -166,7 +166,7 @@ class TravelUserBookingFewoRepository extends BaseRepository { foreach ($fewos as $fewo){ $error[] = "Reservierung gefunden: ".$fewo->from_date->format('d.m.Y')." - ".$fewo->to_date->format('d.m.Y'); } - return back()->withInput(Input::all())->withErrors($error); + return back()->withRequest(Request::all())->withErrors($error); } } @@ -180,14 +180,14 @@ class TravelUserBookingFewoRepository extends BaseRepository { 'status' => 'required' ); - if($fewo_reservation_id > 0 && $model && Input::get('invoice_number')){ + if($fewo_reservation_id > 0 && $model && Request::get('invoice_number')){ $rules['invoice_number'] = 'required|unique:mysql_stern.travel_user_booking_fewos,invoice_number,'.$model->id; } - $validator = Validator::make(Input::all(), $rules); + $validator = Validator::make(Request::all(), $rules); if ($validator->fails()) { - return back()->withInput(Input::all())->withErrors($validator); + return back()->withRequest(Request::all())->withErrors($validator); } $data['is_calendar_fewo_direct'] = isset($data['is_calendar_fewo_direct']) ? true : false; diff --git a/app/Services/HTMLHelper.php b/app/Services/HTMLHelper.php index 7c1a363..9ee7625 100644 --- a/app/Services/HTMLHelper.php +++ b/app/Services/HTMLHelper.php @@ -1,6 +1,7 @@ get(); + $ret = ""; + foreach ($options as $option){ + $attr = ($option->id === $setId) ? 'selected="selected"' : ''; + $ret .= '\n'; + } + return $ret; + } + public static function getTravelClassOptions($programId = false, $setId = false){ $options = TravelClass::where('program_id', $programId)->get(); $ret = '\n'; diff --git a/vendor.zip b/archiv.tar similarity index 60% rename from vendor.zip rename to archiv.tar index 9a14dff..4d2ecf9 100644 Binary files a/vendor.zip and b/archiv.tar differ diff --git a/archiv.tar.gz b/archiv.tar.gz new file mode 100644 index 0000000..59d5472 Binary files /dev/null and b/archiv.tar.gz differ diff --git a/bootstrap/cache/services.php b/bootstrap/cache/services.php index ed783a6..e76dc2f 100755 --- a/bootstrap/cache/services.php +++ b/bootstrap/cache/services.php @@ -68,25 +68,30 @@ 9 => 'Illuminate\\View\\ViewServiceProvider', 10 => 'Barryvdh\\Debugbar\\ServiceProvider', 11 => 'Barryvdh\\DomPDF\\ServiceProvider', - 12 => 'Cviebrock\\EloquentSluggable\\ServiceProvider', - 13 => 'Fideloper\\Proxy\\TrustedProxyServiceProvider', - 14 => 'Intervention\\Image\\ImageServiceProvider', - 15 => 'IqContent\\LaravelFilemanager\\LaravelFilemanagerServiceProvider', - 16 => 'Jenssegers\\Date\\DateServiceProvider', - 17 => 'Laracasts\\Flash\\FlashServiceProvider', - 18 => 'Laravel\\Passport\\PassportServiceProvider', - 19 => 'Maatwebsite\\Excel\\ExcelServiceProvider', - 20 => 'Carbon\\Laravel\\ServiceProvider', - 21 => 'Yajra\\DataTables\\DataTablesServiceProvider', - 22 => 'Laravel\\Passport\\PassportServiceProvider', - 23 => 'App\\Providers\\AppServiceProvider', - 24 => 'App\\Providers\\AuthServiceProvider', - 25 => 'App\\Providers\\EventServiceProvider', - 26 => 'App\\Providers\\RouteServiceProvider', - 27 => 'Jenssegers\\Date\\DateServiceProvider', - 28 => 'Intervention\\Image\\ImageServiceProvider', - 29 => 'Maatwebsite\\Excel\\ExcelServiceProvider', - 30 => 'Yajra\\DataTables\\DataTablesServiceProvider', + 12 => 'Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider', + 13 => 'Cviebrock\\EloquentSluggable\\ServiceProvider', + 14 => 'Fideloper\\Proxy\\TrustedProxyServiceProvider', + 15 => 'Intervention\\Image\\ImageServiceProvider', + 16 => 'IqContent\\LaravelFilemanager\\LaravelFilemanagerServiceProvider', + 17 => 'Jenssegers\\Date\\DateServiceProvider', + 18 => 'Laracasts\\Flash\\FlashServiceProvider', + 19 => 'Laravel\\Passport\\PassportServiceProvider', + 20 => 'Maatwebsite\\Excel\\ExcelServiceProvider', + 21 => 'Carbon\\Laravel\\ServiceProvider', + 22 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider', + 23 => 'Reliese\\Coders\\CodersServiceProvider', + 24 => 'Yajra\\DataTables\\DataTablesServiceProvider', + 25 => 'Laravel\\Passport\\PassportServiceProvider', + 26 => 'App\\Providers\\AppServiceProvider', + 27 => 'App\\Providers\\AuthServiceProvider', + 28 => 'App\\Providers\\EventServiceProvider', + 29 => 'App\\Providers\\RouteServiceProvider', + 30 => 'Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider', + 31 => 'Jenssegers\\Date\\DateServiceProvider', + 32 => 'Intervention\\Image\\ImageServiceProvider', + 33 => 'Maatwebsite\\Excel\\ExcelServiceProvider', + 34 => 'Yajra\\DataTables\\DataTablesServiceProvider', + 35 => 'Reliese\\Coders\\CodersServiceProvider', ), 'deferred' => array ( @@ -98,6 +103,7 @@ 'Illuminate\\Contracts\\Bus\\QueueingDispatcher' => 'Illuminate\\Bus\\BusServiceProvider', 'cache' => 'Illuminate\\Cache\\CacheServiceProvider', 'cache.store' => 'Illuminate\\Cache\\CacheServiceProvider', + 'cache.psr6' => 'Illuminate\\Cache\\CacheServiceProvider', 'memcached.connector' => 'Illuminate\\Cache\\CacheServiceProvider', 'command.cache.clear' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', 'command.cache.forget' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', @@ -105,19 +111,13 @@ 'command.auth.resets.clear' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', 'command.config.cache' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', 'command.config.clear' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'command.db.wipe' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', 'command.down' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', 'command.environment' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', 'command.event.cache' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', 'command.event.clear' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', 'command.event.list' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', 'command.key.generate' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', - 'command.migrate' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', - 'command.migrate.fresh' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', - 'command.migrate.install' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', - 'command.migrate.refresh' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', - 'command.migrate.reset' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', - 'command.migrate.rollback' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', - 'command.migrate.status' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', 'command.optimize' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', 'command.optimize.clear' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', 'command.package.discover' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', @@ -139,8 +139,6 @@ 'command.up' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', 'command.view.cache' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', 'command.view.clear' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', - 'command.app.name' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', - 'command.auth.make' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', 'command.cache.table' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', 'command.channel.make' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', 'command.console.make' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', @@ -153,7 +151,6 @@ 'command.listener.make' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', 'command.mail.make' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', 'command.middleware.make' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', - 'command.migrate.make' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', 'command.model.make' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', 'command.notification.make' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', 'command.notification.table' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', @@ -173,6 +170,14 @@ 'migrator' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', 'migration.repository' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', 'migration.creator' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'command.migrate' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'command.migrate.fresh' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'command.migrate.install' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'command.migrate.refresh' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'command.migrate.reset' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'command.migrate.rollback' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'command.migrate.status' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', + 'command.migrate.make' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', 'composer' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider', 'hash' => 'Illuminate\\Hashing\\HashServiceProvider', 'hash.driver' => 'Illuminate\\Hashing\\HashServiceProvider', @@ -194,15 +199,11 @@ 'translation.loader' => 'Illuminate\\Translation\\TranslationServiceProvider', 'validator' => 'Illuminate\\Validation\\ValidationServiceProvider', 'validation.presence' => 'Illuminate\\Validation\\ValidationServiceProvider', - 'command.ide-helper.generate' => 'Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider', - 'command.ide-helper.models' => 'Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider', 'command.tinker' => 'Laravel\\Tinker\\TinkerServiceProvider', 'html' => 'Collective\\Html\\HtmlServiceProvider', 'form' => 'Collective\\Html\\HtmlServiceProvider', 'Collective\\Html\\HtmlBuilder' => 'Collective\\Html\\HtmlServiceProvider', 'Collective\\Html\\FormBuilder' => 'Collective\\Html\\HtmlServiceProvider', - 'NunoMaduro\\Collision\\Contracts\\Provider' => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider', - 'Reliese\\Coders\\Model\\Factory' => 'Reliese\\Coders\\CodersServiceProvider', ), 'when' => array ( @@ -242,20 +243,11 @@ 'Illuminate\\Validation\\ValidationServiceProvider' => array ( ), - 'Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider' => - array ( - ), 'Laravel\\Tinker\\TinkerServiceProvider' => array ( ), 'Collective\\Html\\HtmlServiceProvider' => array ( ), - 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider' => - array ( - ), - 'Reliese\\Coders\\CodersServiceProvider' => - array ( - ), ), ); \ No newline at end of file diff --git a/composer.json b/composer.json index a7149db..9908981 100755 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.1.3", + "php": "^7.2", "barryvdh/laravel-dompdf": "^0.8.5", "cviebrock/eloquent-sluggable": "*", "doctrine/dbal": "*", @@ -24,7 +24,8 @@ "iqcontent/laravel-filemanager": "*", "jenssegers/date": "*", "laracasts/flash": "*", - "laravel/framework": "5.8.*", + "laravel/framework": "^6.0", + "laravel/helpers": "^1.1", "laravel/passport": "*", "laravel/tinker": "*", "laravelcollective/html": "*", diff --git a/composer.lock b/composer.lock index 834fcf8..eb023f0 100755 --- a/composer.lock +++ b/composer.lock @@ -4,25 +4,25 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "db27fc9863d48a36496764d8d350229a", + "content-hash": "ed17ddaad713069af32f3c21c0717aab", "packages": [ { "name": "barryvdh/laravel-dompdf", - "version": "v0.8.5", + "version": "v0.8.6", "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-dompdf.git", - "reference": "7393732b2f3a3ee357974cbb0c46c9b65b84dad1" + "reference": "d7108f78cf5254a2d8c224542967f133e5a6d4e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-dompdf/zipball/7393732b2f3a3ee357974cbb0c46c9b65b84dad1", - "reference": "7393732b2f3a3ee357974cbb0c46c9b65b84dad1", + "url": "https://api.github.com/repos/barryvdh/laravel-dompdf/zipball/d7108f78cf5254a2d8c224542967f133e5a6d4e8", + "reference": "d7108f78cf5254a2d8c224542967f133e5a6d4e8", "shasum": "" }, "require": { "dompdf/dompdf": "^0.8", - "illuminate/support": "^5.5|^6", + "illuminate/support": "^5.5|^6|^7", "php": ">=7" }, "type": "library", @@ -60,41 +60,46 @@ "laravel", "pdf" ], - "time": "2019-08-23T14:30:33+00:00" + "time": "2020-02-25T20:44:34+00:00" }, { "name": "cocur/slugify", - "version": "v3.2", + "version": "v4.0.0", "source": { "type": "git", "url": "https://github.com/cocur/slugify.git", - "reference": "d41701efe58ba2df9cae029c3d21e1518cc6780e" + "reference": "3f1ffc300f164f23abe8b64ffb3f92d35cec8307" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cocur/slugify/zipball/d41701efe58ba2df9cae029c3d21e1518cc6780e", - "reference": "d41701efe58ba2df9cae029c3d21e1518cc6780e", + "url": "https://api.github.com/repos/cocur/slugify/zipball/3f1ffc300f164f23abe8b64ffb3f92d35cec8307", + "reference": "3f1ffc300f164f23abe8b64ffb3f92d35cec8307", "shasum": "" }, "require": { "ext-mbstring": "*", - "php": ">=5.5.9" + "php": ">=7.0" + }, + "conflict": { + "symfony/config": "<3.4 || >=4,<4.3", + "symfony/dependency-injection": "<3.4 || >=4,<4.3", + "symfony/http-kernel": "<3.4 || >=4,<4.3", + "twig/twig": "<2.12.1" }, "require-dev": { "laravel/framework": "~5.1", "latte/latte": "~2.2", "league/container": "^2.2.0", - "mikey179/vfsstream": "~1.6", - "mockery/mockery": "~0.9", - "nette/di": "~2.2", - "phpunit/phpunit": "~4.8.36|~5.2", + "mikey179/vfsstream": "~1.6.8", + "mockery/mockery": "^1.3", + "nette/di": "~2.4", + "phpunit/phpunit": "^5.7.27", "pimple/pimple": "~1.1", "plumphp/plum": "~0.1", - "silex/silex": "~1.3", - "symfony/config": "~2.4|~3.0|~4.0", - "symfony/dependency-injection": "~2.4|~3.0|~4.0", - "symfony/http-kernel": "~2.4|~3.0|~4.0", - "twig/twig": "~1.26|~2.0", + "symfony/config": "^3.4 || ^4.3 || ^5.0", + "symfony/dependency-injection": "^3.4 || ^4.3 || ^5.0", + "symfony/http-kernel": "^3.4 || ^4.3 || ^5.0", + "twig/twig": "^2.12.1 || ~3.0", "zendframework/zend-modulemanager": "~2.2", "zendframework/zend-servicemanager": "~2.2", "zendframework/zend-view": "~2.2" @@ -110,14 +115,14 @@ "MIT" ], "authors": [ - { - "name": "Ivo Bathke", - "email": "ivo.bathke@gmail.com" - }, { "name": "Florian Eckerstorfer", "email": "florian@eckerstorfer.co", "homepage": "https://florian.ec" + }, + { + "name": "Ivo Bathke", + "email": "ivo.bathke@gmail.com" } ], "description": "Converts a string into a slug.", @@ -125,36 +130,35 @@ "slug", "slugify" ], - "time": "2019-01-31T20:38:55+00:00" + "time": "2019-12-14T13:04:14+00:00" }, { "name": "cviebrock/eloquent-sluggable", - "version": "4.8.1", + "version": "6.0.3", "source": { "type": "git", "url": "https://github.com/cviebrock/eloquent-sluggable.git", - "reference": "8820cf93a911cd6a1c440a8f5889caedac5cf697" + "reference": "ebaefa01b810b93d0c33a0465eb6c53c38340388" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/cviebrock/eloquent-sluggable/zipball/8820cf93a911cd6a1c440a8f5889caedac5cf697", - "reference": "8820cf93a911cd6a1c440a8f5889caedac5cf697", + "url": "https://api.github.com/repos/cviebrock/eloquent-sluggable/zipball/ebaefa01b810b93d0c33a0465eb6c53c38340388", + "reference": "ebaefa01b810b93d0c33a0465eb6c53c38340388", "shasum": "" }, "require": { - "cocur/slugify": "^3.1", - "ext-mbstring": "*", - "illuminate/config": "~5.8.0", - "illuminate/database": "~5.8.0", - "illuminate/support": "~5.8.0", - "php": "^7.1" + "cocur/slugify": "^4.0", + "illuminate/config": "^6.0", + "illuminate/database": "^6.0", + "illuminate/support": "^6.0", + "php": "^7.2" }, "require-dev": { - "limedeck/phpunit-detailed-printer": "^4.1", - "mockery/mockery": "^1.2", - "orchestra/database": "3.8.x-dev", - "orchestra/testbench": "v3.8.0", - "phpunit/phpunit": "~7.0" + "limedeck/phpunit-detailed-printer": "^5.0", + "mockery/mockery": "^1.2.3", + "orchestra/database": "4.*", + "orchestra/testbench": "4.*", + "phpunit/phpunit": "^8.0" }, "type": "library", "extra": { @@ -179,7 +183,7 @@ "email": "colin@viebrock.ca" } ], - "description": "Easy creation of slugs for your Eloquent models in Laravel 5.", + "description": "Easy creation of slugs for your Eloquent models in Laravel", "homepage": "https://github.com/cviebrock/eloquent-sluggable", "keywords": [ "eloquent", @@ -189,7 +193,7 @@ "slug", "sluggable" ], - "time": "2020-02-09T22:52:29+00:00" + "time": "2020-02-09T23:06:22+00:00" }, { "name": "defuse/php-encryption", @@ -668,16 +672,16 @@ }, { "name": "dompdf/dompdf", - "version": "v0.8.4", + "version": "v0.8.5", "source": { "type": "git", "url": "https://github.com/dompdf/dompdf.git", - "reference": "8f49b3b01693f51037dd50da81090beba1b5c005" + "reference": "6782abfc090b132134cd6cea0ec6d76f0fce2c56" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dompdf/dompdf/zipball/8f49b3b01693f51037dd50da81090beba1b5c005", - "reference": "8f49b3b01693f51037dd50da81090beba1b5c005", + "url": "https://api.github.com/repos/dompdf/dompdf/zipball/6782abfc090b132134cd6cea0ec6d76f0fce2c56", + "reference": "6782abfc090b132134cd6cea0ec6d76f0fce2c56", "shasum": "" }, "require": { @@ -730,7 +734,7 @@ ], "description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter", "homepage": "https://github.com/dompdf/dompdf", - "time": "2020-01-20T17:00:46+00:00" + "time": "2020-02-20T03:52:51+00:00" }, { "name": "dragonmantank/cron-expression", @@ -788,16 +792,16 @@ }, { "name": "egulias/email-validator", - "version": "2.1.15", + "version": "2.1.17", "source": { "type": "git", "url": "https://github.com/egulias/EmailValidator.git", - "reference": "e834eea5306d85d67de5a05db5882911d5b29357" + "reference": "ade6887fd9bd74177769645ab5c474824f8a418a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/e834eea5306d85d67de5a05db5882911d5b29357", - "reference": "e834eea5306d85d67de5a05db5882911d5b29357", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ade6887fd9bd74177769645ab5c474824f8a418a", + "reference": "ade6887fd9bd74177769645ab5c474824f8a418a", "shasum": "" }, "require": { @@ -842,74 +846,28 @@ "validation", "validator" ], - "time": "2020-01-20T21:40:59+00:00" - }, - { - "name": "erusev/parsedown", - "version": "1.7.4", - "source": { - "type": "git", - "url": "https://github.com/erusev/parsedown.git", - "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/erusev/parsedown/zipball/cb17b6477dfff935958ba01325f2e8a2bfa6dab3", - "reference": "cb17b6477dfff935958ba01325f2e8a2bfa6dab3", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35" - }, - "type": "library", - "autoload": { - "psr-0": { - "Parsedown": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Emanuil Rusev", - "email": "hello@erusev.com", - "homepage": "http://erusev.com" - } - ], - "description": "Parser for Markdown.", - "homepage": "http://parsedown.org", - "keywords": [ - "markdown", - "parser" - ], - "time": "2019-12-30T22:54:17+00:00" + "time": "2020-02-13T22:36:52+00:00" }, { "name": "fideloper/proxy", - "version": "4.2.2", + "version": "4.3.0", "source": { "type": "git", "url": "https://github.com/fideloper/TrustedProxy.git", - "reference": "790194d5d3da89a713478875d2e2d05855a90a81" + "reference": "ec38ad69ee378a1eec04fb0e417a97cfaf7ed11a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/790194d5d3da89a713478875d2e2d05855a90a81", - "reference": "790194d5d3da89a713478875d2e2d05855a90a81", + "url": "https://api.github.com/repos/fideloper/TrustedProxy/zipball/ec38ad69ee378a1eec04fb0e417a97cfaf7ed11a", + "reference": "ec38ad69ee378a1eec04fb0e417a97cfaf7ed11a", "shasum": "" }, "require": { - "illuminate/contracts": "^5.0|^6.0|^7.0", + "illuminate/contracts": "^5.0|^6.0|^7.0|^8.0", "php": ">=5.4.0" }, "require-dev": { - "illuminate/http": "^5.0|^6.0|^7.0", + "illuminate/http": "^5.0|^6.0|^7.0|^8.0", "mockery/mockery": "^1.0", "phpunit/phpunit": "^6.0" }, @@ -942,7 +900,7 @@ "proxy", "trusted proxy" ], - "time": "2019-12-20T13:11:11+00:00" + "time": "2020-02-22T01:51:47+00:00" }, { "name": "firebase/php-jwt", @@ -1261,11 +1219,11 @@ "cviebrock/eloquent-sluggable": "*", "ext-exif": "*", "ext-fileinfo": "*", - "illuminate/config": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.*", - "illuminate/container": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.*", - "illuminate/filesystem": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.*", - "illuminate/http": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.*", - "illuminate/support": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.*", + "illuminate/config": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0", + "illuminate/container": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0", + "illuminate/filesystem": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0", + "illuminate/http": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0", + "illuminate/support": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0", "intervention/image": "2.*", "php": ">=7.1.3" }, @@ -1474,6 +1432,142 @@ ], "time": "2019-03-10T08:50:58+00:00" }, + { + "name": "laminas/laminas-diactoros", + "version": "2.2.2", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-diactoros.git", + "reference": "95178c4751d737cdf9ab0a9f70a42754ac860e7b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/95178c4751d737cdf9ab0a9f70a42754ac860e7b", + "reference": "95178c4751d737cdf9ab0a9f70a42754ac860e7b", + "shasum": "" + }, + "require": { + "laminas/laminas-zendframework-bridge": "^1.0", + "php": "^7.1", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0" + }, + "conflict": { + "phpspec/prophecy": "<1.9.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "replace": { + "zendframework/zend-diactoros": "self.version" + }, + "require-dev": { + "ext-curl": "*", + "ext-dom": "*", + "ext-libxml": "*", + "http-interop/http-factory-tests": "^0.5.0", + "laminas/laminas-coding-standard": "~1.0.0", + "php-http/psr7-integration-tests": "dev-master", + "phpunit/phpunit": "^7.5.18" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1.x-dev", + "dev-develop": "2.2.x-dev", + "dev-release-1.8": "1.8.x-dev" + } + }, + "autoload": { + "files": [ + "src/functions/create_uploaded_file.php", + "src/functions/marshal_headers_from_sapi.php", + "src/functions/marshal_method_from_sapi.php", + "src/functions/marshal_protocol_version_from_sapi.php", + "src/functions/marshal_uri_from_sapi.php", + "src/functions/normalize_server.php", + "src/functions/normalize_uploaded_files.php", + "src/functions/parse_cookie_header.php", + "src/functions/create_uploaded_file.legacy.php", + "src/functions/marshal_headers_from_sapi.legacy.php", + "src/functions/marshal_method_from_sapi.legacy.php", + "src/functions/marshal_protocol_version_from_sapi.legacy.php", + "src/functions/marshal_uri_from_sapi.legacy.php", + "src/functions/normalize_server.legacy.php", + "src/functions/normalize_uploaded_files.legacy.php", + "src/functions/parse_cookie_header.legacy.php" + ], + "psr-4": { + "Laminas\\Diactoros\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "PSR HTTP Message implementations", + "homepage": "https://laminas.dev", + "keywords": [ + "http", + "laminas", + "psr", + "psr-7" + ], + "time": "2020-01-07T19:39:26+00:00" + }, + { + "name": "laminas/laminas-zendframework-bridge", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-zendframework-bridge.git", + "reference": "0fb9675b84a1666ab45182b6c5b29956921e818d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/0fb9675b84a1666ab45182b6c5b29956921e818d", + "reference": "0fb9675b84a1666ab45182b6c5b29956921e818d", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.1", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev", + "dev-develop": "1.1.x-dev" + }, + "laminas": { + "module": "Laminas\\ZendFrameworkBridge" + } + }, + "autoload": { + "files": [ + "src/autoload.php" + ], + "psr-4": { + "Laminas\\ZendFrameworkBridge\\": "src//" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Alias legacy ZF class names to Laminas Project equivalents.", + "keywords": [ + "ZendFramework", + "autoloading", + "laminas", + "zf" + ], + "time": "2020-01-07T22:58:31+00:00" + }, { "name": "laracasts/flash", "version": "3.0.3", @@ -1530,43 +1624,43 @@ }, { "name": "laravel/framework", - "version": "v5.8.36", + "version": "v6.17.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "ccf857af50897eda43ceaf12e318cf214e0e4e95" + "reference": "40fd590b93f060f2ebe407b3e6d29e66b0e57fbb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/ccf857af50897eda43ceaf12e318cf214e0e4e95", - "reference": "ccf857af50897eda43ceaf12e318cf214e0e4e95", + "url": "https://api.github.com/repos/laravel/framework/zipball/40fd590b93f060f2ebe407b3e6d29e66b0e57fbb", + "reference": "40fd590b93f060f2ebe407b3e6d29e66b0e57fbb", "shasum": "" }, "require": { "doctrine/inflector": "^1.1", "dragonmantank/cron-expression": "^2.0", - "egulias/email-validator": "^2.0", - "erusev/parsedown": "^1.7", + "egulias/email-validator": "^2.1.10", "ext-json": "*", "ext-mbstring": "*", "ext-openssl": "*", + "league/commonmark": "^1.3", "league/flysystem": "^1.0.8", - "monolog/monolog": "^1.12", - "nesbot/carbon": "^1.26.3 || ^2.0", + "monolog/monolog": "^1.12|^2.0", + "nesbot/carbon": "^2.0", "opis/closure": "^3.1", - "php": "^7.1.3", + "php": "^7.2", "psr/container": "^1.0", "psr/simple-cache": "^1.0", "ramsey/uuid": "^3.7", "swiftmailer/swiftmailer": "^6.0", - "symfony/console": "^4.2", - "symfony/debug": "^4.2", - "symfony/finder": "^4.2", - "symfony/http-foundation": "^4.2", - "symfony/http-kernel": "^4.2", - "symfony/process": "^4.2", - "symfony/routing": "^4.2", - "symfony/var-dumper": "^4.2", + "symfony/console": "^4.3.4", + "symfony/debug": "^4.3.4", + "symfony/finder": "^4.3.4", + "symfony/http-foundation": "^4.3.4", + "symfony/http-kernel": "^4.3.4", + "symfony/process": "^4.3.4", + "symfony/routing": "^4.3.4", + "symfony/var-dumper": "^4.3.4", "tijsverkoyen/css-to-inline-styles": "^2.2.1", "vlucas/phpdotenv": "^3.3" }, @@ -1606,47 +1700,45 @@ "require-dev": { "aws/aws-sdk-php": "^3.0", "doctrine/dbal": "^2.6", - "filp/whoops": "^2.1.4", - "guzzlehttp/guzzle": "^6.3", + "filp/whoops": "^2.4", + "guzzlehttp/guzzle": "^6.3|^7.0", "league/flysystem-cached-adapter": "^1.0", - "mockery/mockery": "^1.0", + "mockery/mockery": "^1.3.1", "moontoast/math": "^1.1", - "orchestra/testbench-core": "3.8.*", + "orchestra/testbench-core": "^4.0", "pda/pheanstalk": "^4.0", - "phpunit/phpunit": "^7.5|^8.0", + "phpunit/phpunit": "^7.5.15|^8.4|^9.0", "predis/predis": "^1.1.1", - "symfony/css-selector": "^4.2", - "symfony/dom-crawler": "^4.2", - "true/punycode": "^2.1" + "symfony/cache": "^4.3.4" }, "suggest": { - "aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (^3.0).", + "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.0).", "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6).", "ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().", + "ext-memcached": "Required to use the memcache cache driver.", "ext-pcntl": "Required to use all features of the queue worker.", "ext-posix": "Required to use all features of the queue worker.", - "filp/whoops": "Required for friendly error pages in development (^2.1.4).", - "fzaninotto/faker": "Required to use the eloquent factory builder (^1.4).", - "guzzlehttp/guzzle": "Required to use the Mailgun and Mandrill mail drivers and the ping methods on schedules (^6.0).", - "laravel/tinker": "Required to use the tinker console command (^1.0).", + "ext-redis": "Required to use the Redis cache and queue drivers.", + "filp/whoops": "Required for friendly error pages in development (^2.4).", + "fzaninotto/faker": "Required to use the eloquent factory builder (^1.9.1).", + "guzzlehttp/guzzle": "Required to use the Mailgun mail driver and the ping methods on schedules (^6.0|^7.0).", + "laravel/tinker": "Required to use the tinker console command (^2.0).", "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).", "league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).", - "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (^1.0).", "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0).", "moontoast/math": "Required to use ordered UUIDs (^1.1).", - "nexmo/client": "Required to use the Nexmo transport (^1.0).", + "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).", "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).", - "predis/predis": "Required to use the redis cache and queue drivers (^1.0).", - "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^3.0).", - "symfony/css-selector": "Required to use some of the crawler integration testing tools (^4.2).", - "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (^4.2).", - "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^1.1).", + "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0).", + "symfony/cache": "Required to PSR-6 cache bridge (^4.3.4).", + "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^1.2).", "wildbit/swiftmailer-postmark": "Required to use Postmark mail driver (^3.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.8-dev" + "dev-master": "6.x-dev" } }, "autoload": { @@ -1674,49 +1766,103 @@ "framework", "laravel" ], - "time": "2019-12-17T16:00:14+00:00" + "time": "2020-02-25T15:07:46+00:00" }, { - "name": "laravel/passport", - "version": "v7.5.1", + "name": "laravel/helpers", + "version": "v1.1.1", "source": { "type": "git", - "url": "https://github.com/laravel/passport.git", - "reference": "d63cdd672c3d65b3c35b73d0ef13a9dbfcb71c08" + "url": "https://github.com/laravel/helpers.git", + "reference": "b8eae9ddd461e89d0296f74fd069c413bf83b6fa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/passport/zipball/d63cdd672c3d65b3c35b73d0ef13a9dbfcb71c08", - "reference": "d63cdd672c3d65b3c35b73d0ef13a9dbfcb71c08", + "url": "https://api.github.com/repos/laravel/helpers/zipball/b8eae9ddd461e89d0296f74fd069c413bf83b6fa", + "reference": "b8eae9ddd461e89d0296f74fd069c413bf83b6fa", "shasum": "" }, "require": { - "ext-json": "*", - "firebase/php-jwt": "~3.0|~4.0|~5.0", - "guzzlehttp/guzzle": "~6.0", - "illuminate/auth": "~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0", - "illuminate/console": "~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0", - "illuminate/container": "~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0", - "illuminate/contracts": "~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0", - "illuminate/cookie": "~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0", - "illuminate/database": "~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0", - "illuminate/encryption": "~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0", - "illuminate/http": "~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0", - "illuminate/support": "~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0", - "league/oauth2-server": "^7.0", - "php": ">=7.1", - "phpseclib/phpseclib": "^2.0", - "symfony/psr-http-message-bridge": "~1.0", - "zendframework/zend-diactoros": "~1.0|~2.0" + "illuminate/support": "~5.8.0|^6.0", + "php": ">=7.1.3" }, "require-dev": { - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^7.4|^8.0" + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "7.0-dev" + "dev-master": "1.0-dev" + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + }, + { + "name": "Dries Vints", + "email": "dries.vints@gmail.com" + } + ], + "description": "Provides backwards compatibility for helpers in the latest Laravel release.", + "keywords": [ + "helpers", + "laravel" + ], + "time": "2019-07-30T15:25:31+00:00" + }, + { + "name": "laravel/passport", + "version": "v8.4.0", + "source": { + "type": "git", + "url": "https://github.com/laravel/passport.git", + "reference": "c1be259ff85109416e9e81c80fa4d3d611d6398a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/passport/zipball/c1be259ff85109416e9e81c80fa4d3d611d6398a", + "reference": "c1be259ff85109416e9e81c80fa4d3d611d6398a", + "shasum": "" + }, + "require": { + "ext-json": "*", + "firebase/php-jwt": "^3.0|^4.0|^5.0", + "guzzlehttp/guzzle": "^6.0", + "illuminate/auth": "^6.0|^7.0", + "illuminate/console": "^6.0|^7.0", + "illuminate/container": "^6.0|^7.0", + "illuminate/contracts": "^6.0|^7.0", + "illuminate/cookie": "^6.0|^7.0", + "illuminate/database": "^6.0|^7.0", + "illuminate/encryption": "^6.0|^7.0", + "illuminate/http": "^6.0|^7.0", + "illuminate/support": "^6.0|^7.0", + "laminas/laminas-diactoros": "^2.2", + "league/oauth2-server": "^8.0", + "php": "^7.2", + "phpseclib/phpseclib": "^2.0", + "symfony/psr-http-message-bridge": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^1.0", + "orchestra/testbench": "^4.4|^5.0", + "phpunit/phpunit": "^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.x-dev" }, "laravel": { "providers": [ @@ -1745,40 +1891,41 @@ "oauth", "passport" ], - "time": "2019-10-08T16:45:24+00:00" + "time": "2020-02-12T14:34:02+00:00" }, { "name": "laravel/tinker", - "version": "v1.0.10", + "version": "v2.2.0", "source": { "type": "git", "url": "https://github.com/laravel/tinker.git", - "reference": "ad571aacbac1539c30d480908f9d0c9614eaf1a7" + "reference": "37579c93271ec30ef099dd633ec7c2de5e5fb112" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/tinker/zipball/ad571aacbac1539c30d480908f9d0c9614eaf1a7", - "reference": "ad571aacbac1539c30d480908f9d0c9614eaf1a7", + "url": "https://api.github.com/repos/laravel/tinker/zipball/37579c93271ec30ef099dd633ec7c2de5e5fb112", + "reference": "37579c93271ec30ef099dd633ec7c2de5e5fb112", "shasum": "" }, "require": { - "illuminate/console": "~5.1|^6.0", - "illuminate/contracts": "~5.1|^6.0", - "illuminate/support": "~5.1|^6.0", - "php": ">=5.5.9", - "psy/psysh": "0.7.*|0.8.*|0.9.*", - "symfony/var-dumper": "~3.0|~4.0" + "illuminate/console": "^6.0|^7.0", + "illuminate/contracts": "^6.0|^7.0", + "illuminate/support": "^6.0|^7.0", + "php": "^7.2", + "psy/psysh": "^0.9", + "symfony/var-dumper": "^4.0|^5.0" }, "require-dev": { - "phpunit/phpunit": "~4.0|~5.0" + "mockery/mockery": "^1.3.1", + "phpunit/phpunit": "^8.0|^9.0" }, "suggest": { - "illuminate/database": "The Illuminate Database package (~5.1)." + "illuminate/database": "The Illuminate Database package (^6.0|^7.0)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.x-dev" }, "laravel": { "providers": [ @@ -1808,39 +1955,39 @@ "laravel", "psysh" ], - "time": "2019-08-07T15:10:45+00:00" + "time": "2020-02-05T15:00:44+00:00" }, { "name": "laravelcollective/html", - "version": "v5.8.1", + "version": "v6.0.3", "source": { "type": "git", "url": "https://github.com/LaravelCollective/html.git", - "reference": "3a1c9974ea629eed96e101a24e3852ced382eb29" + "reference": "bcc317d21a7e04eebcc81c4109fa84feaab63590" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/LaravelCollective/html/zipball/3a1c9974ea629eed96e101a24e3852ced382eb29", - "reference": "3a1c9974ea629eed96e101a24e3852ced382eb29", + "url": "https://api.github.com/repos/LaravelCollective/html/zipball/bcc317d21a7e04eebcc81c4109fa84feaab63590", + "reference": "bcc317d21a7e04eebcc81c4109fa84feaab63590", "shasum": "" }, "require": { - "illuminate/http": "5.8.*", - "illuminate/routing": "5.8.*", - "illuminate/session": "5.8.*", - "illuminate/support": "5.8.*", - "illuminate/view": "5.8.*", - "php": ">=7.1.3" + "illuminate/http": "^6.0", + "illuminate/routing": "^6.0", + "illuminate/session": "^6.0", + "illuminate/support": "^6.0", + "illuminate/view": "^6.0", + "php": ">=7.2" }, "require-dev": { - "illuminate/database": "5.8.*", + "illuminate/database": "^6.0", "mockery/mockery": "~1.0", "phpunit/phpunit": "~7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.8-dev" + "dev-master": "6.0-dev" }, "laravel": { "providers": [ @@ -1876,7 +2023,7 @@ ], "description": "HTML and Form Builders for the Laravel Framework", "homepage": "https://laravelcollective.com", - "time": "2019-09-05T12:32:25+00:00" + "time": "2019-10-02T00:37:39+00:00" }, { "name": "lcobucci/jwt", @@ -1933,6 +2080,80 @@ ], "time": "2019-05-24T18:30:49+00:00" }, + { + "name": "league/commonmark", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/commonmark.git", + "reference": "4f30be7a2cbf3bfa5788abab71384713e48f451f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/4f30be7a2cbf3bfa5788abab71384713e48f451f", + "reference": "4f30be7a2cbf3bfa5788abab71384713e48f451f", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": "^7.1" + }, + "conflict": { + "scrutinizer/ocular": "1.7.*" + }, + "require-dev": { + "cebe/markdown": "~1.0", + "commonmark/commonmark.js": "0.29.1", + "erusev/parsedown": "~1.0", + "ext-json": "*", + "github/gfm": "0.29.0", + "michelf/php-markdown": "~1.4", + "mikehaertl/php-shellcommand": "^1.4", + "phpstan/phpstan-shim": "^0.11.5", + "phpunit/phpunit": "^7.5", + "scrutinizer/ocular": "^1.5", + "symfony/finder": "^4.2" + }, + "bin": [ + "bin/commonmark" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "League\\CommonMark\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Colin O'Dell", + "email": "colinodell@gmail.com", + "homepage": "https://www.colinodell.com", + "role": "Lead Developer" + } + ], + "description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and Github-Flavored Markdown (GFM)", + "homepage": "https://commonmark.thephpleague.com", + "keywords": [ + "commonmark", + "flavored", + "gfm", + "github", + "github-flavored", + "markdown", + "md", + "parser" + ], + "time": "2020-02-08T23:42:03+00:00" + }, { "name": "league/event", "version": "2.2.0", @@ -2069,24 +2290,25 @@ }, { "name": "league/oauth2-server", - "version": "7.4.0", + "version": "8.0.0", "source": { "type": "git", "url": "https://github.com/thephpleague/oauth2-server.git", - "reference": "2eb1cf79e59d807d89c256e7ac5e2bf8bdbd4acf" + "reference": "e1dc4d708c56fcfa205be4bb1862b6d525b4baac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/oauth2-server/zipball/2eb1cf79e59d807d89c256e7ac5e2bf8bdbd4acf", - "reference": "2eb1cf79e59d807d89c256e7ac5e2bf8bdbd4acf", + "url": "https://api.github.com/repos/thephpleague/oauth2-server/zipball/e1dc4d708c56fcfa205be4bb1862b6d525b4baac", + "reference": "e1dc4d708c56fcfa205be4bb1862b6d525b4baac", "shasum": "" }, "require": { - "defuse/php-encryption": "^2.1", + "defuse/php-encryption": "^2.2.1", + "ext-json": "*", "ext-openssl": "*", - "lcobucci/jwt": "^3.2.2", - "league/event": "^2.1", - "php": ">=7.0.0", + "lcobucci/jwt": "^3.3.1", + "league/event": "^2.2", + "php": ">=7.1.0", "psr/http-message": "^1.0.1" }, "replace": { @@ -2094,12 +2316,11 @@ "lncd/oauth2": "*" }, "require-dev": { - "phpstan/phpstan": "^0.9.2", - "phpstan/phpstan-phpunit": "^0.9.4", - "phpstan/phpstan-strict-rules": "^0.9.0", - "phpunit/phpunit": "^6.3 || ^7.0", + "phpstan/phpstan": "^0.11.8", + "phpstan/phpstan-phpunit": "^0.11.2", + "phpunit/phpunit": "^7.5.13 || ^8.2.3", "roave/security-advisories": "dev-master", - "zendframework/zend-diactoros": "^1.3.2" + "zendframework/zend-diactoros": "^2.1.2" }, "type": "library", "autoload": { @@ -2142,7 +2363,7 @@ "secure", "server" ], - "time": "2019-05-05T09:22:01+00:00" + "time": "2019-07-13T18:58:26+00:00" }, { "name": "maatwebsite/excel", @@ -2377,21 +2598,21 @@ }, { "name": "monolog/monolog", - "version": "1.25.3", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "fa82921994db851a8becaf3787a9e73c5976b6f1" + "reference": "c861fcba2ca29404dc9e617eedd9eff4616986b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/fa82921994db851a8becaf3787a9e73c5976b6f1", - "reference": "fa82921994db851a8becaf3787a9e73c5976b6f1", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/c861fcba2ca29404dc9e617eedd9eff4616986b8", + "reference": "c861fcba2ca29404dc9e617eedd9eff4616986b8", "shasum": "" }, "require": { - "php": ">=5.3.0", - "psr/log": "~1.0" + "php": "^7.2", + "psr/log": "^1.0.1" }, "provide": { "psr/log-implementation": "1.0.0" @@ -2399,33 +2620,36 @@ "require-dev": { "aws/aws-sdk-php": "^2.4.9 || ^3.0", "doctrine/couchdb": "~1.0@dev", - "graylog2/gelf-php": "~1.0", - "jakub-onderka/php-parallel-lint": "0.9", + "elasticsearch/elasticsearch": "^6.0", + "graylog2/gelf-php": "^1.4.2", + "jakub-onderka/php-parallel-lint": "^0.9", "php-amqplib/php-amqplib": "~2.4", "php-console/php-console": "^3.1.3", - "phpunit/phpunit": "~4.5", - "phpunit/phpunit-mock-objects": "2.3.0", + "phpspec/prophecy": "^1.6.1", + "phpunit/phpunit": "^8.3", + "predis/predis": "^1.1", + "rollbar/rollbar": "^1.3", "ruflin/elastica": ">=0.90 <3.0", - "sentry/sentry": "^0.13", "swiftmailer/swiftmailer": "^5.3|^6.0" }, "suggest": { "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-mongo": "Allow sending log messages to a MongoDB server", + "ext-mbstring": "Allow to work properly with unicode symbols", + "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", "php-console/php-console": "Allow sending log messages to Google Chrome", "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server", - "sentry/sentry": "Allow sending log messages to a Sentry server" + "ruflin/elastica": "Allow sending log messages to an Elastic Search server" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "2.x-dev" } }, "autoload": { @@ -2451,20 +2675,20 @@ "logging", "psr-3" ], - "time": "2019-12-20T14:15:16+00:00" + "time": "2019-12-20T14:22:59+00:00" }, { "name": "nesbot/carbon", - "version": "2.29.1", + "version": "2.30.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "e509be5bf2d703390e69e14496d9a1168452b0a2" + "reference": "912dff66d2690ca66abddb9b291a1df5f371d3b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/e509be5bf2d703390e69e14496d9a1168452b0a2", - "reference": "e509be5bf2d703390e69e14496d9a1168452b0a2", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/912dff66d2690ca66abddb9b291a1df5f371d3b4", + "reference": "912dff66d2690ca66abddb9b291a1df5f371d3b4", "shasum": "" }, "require": { @@ -2521,7 +2745,7 @@ "datetime", "time" ], - "time": "2020-01-21T09:36:43+00:00" + "time": "2020-02-07T15:25:46+00:00" }, { "name": "nikic/php-parser", @@ -2908,16 +3132,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "2.0.23", + "version": "2.0.25", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "c78eb5058d5bb1a183133c36d4ba5b6675dfa099" + "reference": "c18159618ed7cd7ff721ac1a8fec7860a475d2f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/c78eb5058d5bb1a183133c36d4ba5b6675dfa099", - "reference": "c78eb5058d5bb1a183133c36d4ba5b6675dfa099", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/c18159618ed7cd7ff721ac1a8fec7860a475d2f0", + "reference": "c18159618ed7cd7ff721ac1a8fec7860a475d2f0", "shasum": "" }, "require": { @@ -2996,7 +3220,7 @@ "x.509", "x509" ], - "time": "2019-09-17T03:41:22+00:00" + "time": "2020-02-25T04:16:50+00:00" }, { "name": "psr/container", @@ -3360,16 +3584,16 @@ }, { "name": "ramsey/uuid", - "version": "3.9.2", + "version": "3.9.3", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "7779489a47d443f845271badbdcedfe4df8e06fb" + "reference": "7e1633a6964b48589b142d60542f9ed31bd37a92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/7779489a47d443f845271badbdcedfe4df8e06fb", - "reference": "7779489a47d443f845271badbdcedfe4df8e06fb", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/7e1633a6964b48589b142d60542f9ed31bd37a92", + "reference": "7e1633a6964b48589b142d60542f9ed31bd37a92", "shasum": "" }, "require": { @@ -3443,7 +3667,7 @@ "identifier", "uuid" ], - "time": "2019-12-17T08:18:51+00:00" + "time": "2020-02-21T04:36:14+00:00" }, { "name": "reliese/laravel", @@ -4238,16 +4462,16 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3" + "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", - "reference": "f8f0b461be3385e56d6de3dbb5a0df24c0c275e3", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", + "reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38", "shasum": "" }, "require": { @@ -4259,7 +4483,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -4292,20 +4516,20 @@ "polyfill", "portable" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/polyfill-iconv", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "a019efccc03f1a335af6b4f20c30f5ea8060be36" + "reference": "926832ce51059bb58211b7b2080a88e0c3b5328e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/a019efccc03f1a335af6b4f20c30f5ea8060be36", - "reference": "a019efccc03f1a335af6b4f20c30f5ea8060be36", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/926832ce51059bb58211b7b2080a88e0c3b5328e", + "reference": "926832ce51059bb58211b7b2080a88e0c3b5328e", "shasum": "" }, "require": { @@ -4317,7 +4541,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -4351,26 +4575,26 @@ "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "6f9c239e61e1b0c9229a28ff89a812dc449c3d46" + "reference": "6842f1a39cf7d580655688069a03dd7cd83d244a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/6f9c239e61e1b0c9229a28ff89a812dc449c3d46", - "reference": "6f9c239e61e1b0c9229a28ff89a812dc449c3d46", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/6842f1a39cf7d580655688069a03dd7cd83d244a", + "reference": "6842f1a39cf7d580655688069a03dd7cd83d244a", "shasum": "" }, "require": { "php": ">=5.3.3", "symfony/polyfill-mbstring": "^1.3", - "symfony/polyfill-php72": "^1.9" + "symfony/polyfill-php72": "^1.10" }, "suggest": { "ext-intl": "For best performance" @@ -4378,7 +4602,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -4413,20 +4637,20 @@ "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-17T12:01:36+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f" + "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7b4aab9743c30be783b73de055d24a39cf4b954f", - "reference": "7b4aab9743c30be783b73de055d24a39cf4b954f", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/34094cfa9abe1f0f14f48f490772db7a775559f2", + "reference": "34094cfa9abe1f0f14f48f490772db7a775559f2", "shasum": "" }, "require": { @@ -4438,7 +4662,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -4472,20 +4696,20 @@ "portable", "shim" ], - "time": "2019-11-27T14:18:11+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "66fea50f6cb37a35eea048d75a7d99a45b586038" + "reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/66fea50f6cb37a35eea048d75a7d99a45b586038", - "reference": "66fea50f6cb37a35eea048d75a7d99a45b586038", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf", + "reference": "46ecacf4751dd0dc81e4f6bf01dbf9da1dc1dadf", "shasum": "" }, "require": { @@ -4494,7 +4718,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -4527,20 +4751,20 @@ "portable", "shim" ], - "time": "2019-11-27T13:56:44+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.13.1", + "version": "v1.14.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "4b0e2222c55a25b4541305a053013d5647d3a25f" + "reference": "5e66a0fa1070bf46bec4bea7962d285108edd675" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/4b0e2222c55a25b4541305a053013d5647d3a25f", - "reference": "4b0e2222c55a25b4541305a053013d5647d3a25f", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/5e66a0fa1070bf46bec4bea7962d285108edd675", + "reference": "5e66a0fa1070bf46bec4bea7962d285108edd675", "shasum": "" }, "require": { @@ -4549,7 +4773,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.13-dev" + "dev-master": "1.14-dev" } }, "autoload": { @@ -4585,7 +4809,7 @@ "portable", "shim" ], - "time": "2019-11-27T16:25:15+00:00" + "time": "2020-01-13T11:15:53+00:00" }, { "name": "symfony/process", @@ -5220,99 +5444,31 @@ "laravel" ], "time": "2019-12-17T03:30:56+00:00" - }, - { - "name": "zendframework/zend-diactoros", - "version": "2.2.1", - "source": { - "type": "git", - "url": "https://github.com/zendframework/zend-diactoros.git", - "reference": "de5847b068362a88684a55b0dbb40d85986cfa52" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/de5847b068362a88684a55b0dbb40d85986cfa52", - "reference": "de5847b068362a88684a55b0dbb40d85986cfa52", - "shasum": "" - }, - "require": { - "php": "^7.1", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.0" - }, - "provide": { - "psr/http-factory-implementation": "1.0", - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "ext-curl": "*", - "ext-dom": "*", - "ext-libxml": "*", - "http-interop/http-factory-tests": "^0.5.0", - "php-http/psr7-integration-tests": "dev-master", - "phpunit/phpunit": "^7.0.2", - "zendframework/zend-coding-standard": "~1.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1.x-dev", - "dev-develop": "2.2.x-dev", - "dev-release-1.8": "1.8.x-dev" - } - }, - "autoload": { - "files": [ - "src/functions/create_uploaded_file.php", - "src/functions/marshal_headers_from_sapi.php", - "src/functions/marshal_method_from_sapi.php", - "src/functions/marshal_protocol_version_from_sapi.php", - "src/functions/marshal_uri_from_sapi.php", - "src/functions/normalize_server.php", - "src/functions/normalize_uploaded_files.php", - "src/functions/parse_cookie_header.php" - ], - "psr-4": { - "Zend\\Diactoros\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "PSR HTTP Message implementations", - "keywords": [ - "http", - "psr", - "psr-7" - ], - "abandoned": "laminas/laminas-diactoros", - "time": "2019-11-13T19:16:13+00:00" } ], "packages-dev": [ { "name": "barryvdh/laravel-debugbar", - "version": "v3.2.8", + "version": "v3.2.9", "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-debugbar.git", - "reference": "18208d64897ab732f6c04a19b319fe8f1d57a9c0" + "reference": "42d5da5379a7860093f8e4032167e4cb5ebec180" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/18208d64897ab732f6c04a19b319fe8f1d57a9c0", - "reference": "18208d64897ab732f6c04a19b319fe8f1d57a9c0", + "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/42d5da5379a7860093f8e4032167e4cb5ebec180", + "reference": "42d5da5379a7860093f8e4032167e4cb5ebec180", "shasum": "" }, "require": { - "illuminate/routing": "^5.5|^6", - "illuminate/session": "^5.5|^6", - "illuminate/support": "^5.5|^6", - "maximebf/debugbar": "~1.15.0", + "illuminate/routing": "^5.5|^6|^7", + "illuminate/session": "^5.5|^6|^7", + "illuminate/support": "^5.5|^6|^7", + "maximebf/debugbar": "^1.15.1", "php": ">=7.0", - "symfony/debug": "^3|^4", - "symfony/finder": "^3|^4" + "symfony/debug": "^3|^4|^5", + "symfony/finder": "^3|^4|^5" }, "require-dev": { "laravel/framework": "5.5.x" @@ -5357,37 +5513,37 @@ "profiler", "webprofiler" ], - "time": "2019-08-29T07:01:03+00:00" + "time": "2020-02-25T20:42:23+00:00" }, { "name": "barryvdh/laravel-ide-helper", - "version": "v2.6.6", + "version": "v2.6.7", "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-ide-helper.git", - "reference": "b91b959364d97af658f268c733c75dccdbff197e" + "reference": "edd69c5e0508972c81f1f7173236de2459c45814" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/b91b959364d97af658f268c733c75dccdbff197e", - "reference": "b91b959364d97af658f268c733c75dccdbff197e", + "url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/edd69c5e0508972c81f1f7173236de2459c45814", + "reference": "edd69c5e0508972c81f1f7173236de2459c45814", "shasum": "" }, "require": { "barryvdh/reflection-docblock": "^2.0.6", "composer/composer": "^1.6", "doctrine/dbal": "~2.3", - "illuminate/console": "^5.5|^6", - "illuminate/filesystem": "^5.5|^6", - "illuminate/support": "^5.5|^6", - "php": ">=7" + "illuminate/console": "^5.5|^6|^7", + "illuminate/filesystem": "^5.5|^6|^7", + "illuminate/support": "^5.5|^6|^7", + "php": ">=7.2" }, "require-dev": { - "illuminate/config": "^5.5|^6", - "illuminate/view": "^5.5|^6", - "phpro/grumphp": "^0.14", - "phpunit/phpunit": "4.*", - "scrutinizer/ocular": "~1.1", + "illuminate/config": "^5.5|^6|^7", + "illuminate/view": "^5.5|^6|^7", + "mockery/mockery": "^1.3", + "orchestra/testbench": "^3|^4", + "phpro/grumphp": "^0.17.1", "squizlabs/php_codesniffer": "^3" }, "type": "library", @@ -5428,7 +5584,7 @@ "phpstorm", "sublime" ], - "time": "2019-10-30T20:53:27+00:00" + "time": "2020-02-25T20:41:32+00:00" }, { "name": "barryvdh/reflection-docblock", @@ -5678,16 +5834,16 @@ }, { "name": "composer/spdx-licenses", - "version": "1.5.2", + "version": "1.5.3", "source": { "type": "git", "url": "https://github.com/composer/spdx-licenses.git", - "reference": "7ac1e6aec371357df067f8a688c3d6974df68fa5" + "reference": "0c3e51e1880ca149682332770e25977c70cf9dae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/7ac1e6aec371357df067f8a688c3d6974df68fa5", - "reference": "7ac1e6aec371357df067f8a688c3d6974df68fa5", + "url": "https://api.github.com/repos/composer/spdx-licenses/zipball/0c3e51e1880ca149682332770e25977c70cf9dae", + "reference": "0c3e51e1880ca149682332770e25977c70cf9dae", "shasum": "" }, "require": { @@ -5734,7 +5890,7 @@ "spdx", "validator" ], - "time": "2019-07-29T10:31:59+00:00" + "time": "2020-02-14T07:44:31+00:00" }, { "name": "composer/xdebug-handler", @@ -6063,22 +6219,22 @@ }, { "name": "maximebf/debugbar", - "version": "v1.15.1", + "version": "v1.16.1", "source": { "type": "git", "url": "https://github.com/maximebf/php-debugbar.git", - "reference": "6c4277f6117e4864966c9cb58fb835cee8c74a1e" + "reference": "58998b818c6567fac01e35b8a4b70c1a64530556" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/6c4277f6117e4864966c9cb58fb835cee8c74a1e", - "reference": "6c4277f6117e4864966c9cb58fb835cee8c74a1e", + "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/58998b818c6567fac01e35b8a4b70c1a64530556", + "reference": "58998b818c6567fac01e35b8a4b70c1a64530556", "shasum": "" }, "require": { - "php": ">=5.6", + "php": "^7.1", "psr/log": "^1.0", - "symfony/var-dumper": "^2.6|^3|^4" + "symfony/var-dumper": "^2.6|^3|^4|^5" }, "require-dev": { "phpunit/phpunit": "^5" @@ -6091,7 +6247,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.16-dev" } }, "autoload": { @@ -6120,7 +6276,7 @@ "debug", "debugbar" ], - "time": "2019-09-24T14:55:42+00:00" + "time": "2019-11-24T09:46:11+00:00" }, { "name": "mockery/mockery", @@ -6455,16 +6611,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.0.0", + "version": "5.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "a48807183a4b819072f26e347bbd0b5199a9d15f" + "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/a48807183a4b819072f26e347bbd0b5199a9d15f", - "reference": "a48807183a4b819072f26e347bbd0b5199a9d15f", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", + "reference": "cd72d394ca794d3466a3b2fc09d5a6c1dc86b47e", "shasum": "" }, "require": { @@ -6504,7 +6660,7 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2020-02-09T09:16:15+00:00" + "time": "2020-02-22T12:28:44+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -6618,16 +6774,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "8.0.0", + "version": "8.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "278b6e876467da2e6b5e5390a2310391618ebc10" + "reference": "31e94ccc084025d6abee0585df533eb3a792b96a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/278b6e876467da2e6b5e5390a2310391618ebc10", - "reference": "278b6e876467da2e6b5e5390a2310391618ebc10", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/31e94ccc084025d6abee0585df533eb3a792b96a", + "reference": "31e94ccc084025d6abee0585df533eb3a792b96a", "shasum": "" }, "require": { @@ -6678,7 +6834,7 @@ "testing", "xunit" ], - "time": "2020-02-07T06:03:55+00:00" + "time": "2020-02-19T13:41:19+00:00" }, { "name": "phpunit/php-file-iterator", @@ -6929,16 +7085,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.0.0", + "version": "9.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "a5be9621b19ee19dca5f150a5b159f48b5389547" + "reference": "68d7e5b17a6b9461e17c00446caa409863154f76" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a5be9621b19ee19dca5f150a5b159f48b5389547", - "reference": "a5be9621b19ee19dca5f150a5b159f48b5389547", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/68d7e5b17a6b9461e17c00446caa409863154f76", + "reference": "68d7e5b17a6b9461e17c00446caa409863154f76", "shasum": "" }, "require": { @@ -7011,7 +7167,7 @@ "testing", "xunit" ], - "time": "2020-02-07T06:56:17+00:00" + "time": "2020-02-13T07:30:12+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -7180,16 +7336,16 @@ }, { "name": "sebastian/environment", - "version": "5.0.0", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "fea125c3bf7cab63a909990133d425e5a0a61e40" + "reference": "9bffdefa7810031a165ddd6275da6a2c1f6f2dfb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/fea125c3bf7cab63a909990133d425e5a0a61e40", - "reference": "fea125c3bf7cab63a909990133d425e5a0a61e40", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/9bffdefa7810031a165ddd6275da6a2c1f6f2dfb", + "reference": "9bffdefa7810031a165ddd6275da6a2c1f6f2dfb", "shasum": "" }, "require": { @@ -7229,7 +7385,7 @@ "environment", "hhvm" ], - "time": "2020-02-07T06:10:11+00:00" + "time": "2020-02-19T13:40:20+00:00" }, { "name": "sebastian/exporter", @@ -7682,16 +7838,16 @@ }, { "name": "seld/phar-utils", - "version": "1.0.2", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/Seldaek/phar-utils.git", - "reference": "84715761c35808076b00908a20317a3a8a67d17e" + "reference": "8800503d56b9867d43d9c303b9cbcc26016e82f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/84715761c35808076b00908a20317a3a8a67d17e", - "reference": "84715761c35808076b00908a20317a3a8a67d17e", + "url": "https://api.github.com/repos/Seldaek/phar-utils/zipball/8800503d56b9867d43d9c303b9cbcc26016e82f0", + "reference": "8800503d56b9867d43d9c303b9cbcc26016e82f0", "shasum": "" }, "require": { @@ -7720,9 +7876,9 @@ ], "description": "PHAR file format utilities, for when PHP phars you up", "keywords": [ - "phra" + "phar" ], - "time": "2020-01-13T10:41:09+00:00" + "time": "2020-02-14T15:25:33+00:00" }, { "name": "symfony/filesystem", @@ -7816,16 +7972,16 @@ }, { "name": "webmozart/assert", - "version": "1.6.0", + "version": "1.7.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "573381c0a64f155a0d9a23f4b0c797194805b925" + "reference": "aed98a490f9a8f78468232db345ab9cf606cf598" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/573381c0a64f155a0d9a23f4b0c797194805b925", - "reference": "573381c0a64f155a0d9a23f4b0c797194805b925", + "url": "https://api.github.com/repos/webmozart/assert/zipball/aed98a490f9a8f78468232db345ab9cf606cf598", + "reference": "aed98a490f9a8f78468232db345ab9cf606cf598", "shasum": "" }, "require": { @@ -7860,7 +8016,7 @@ "check", "validate" ], - "time": "2019-11-24T13:36:37+00:00" + "time": "2020-02-14T12:15:55+00:00" } ], "aliases": [], @@ -7869,7 +8025,7 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": "^7.1.3" + "php": "^7.2" }, "platform-dev": [] } diff --git a/config/app.php b/config/app.php index 0607bdf..90b906a 100755 --- a/config/app.php +++ b/config/app.php @@ -195,6 +195,7 @@ return [ 'aliases' => [ 'App' => Illuminate\Support\Facades\App::class, + 'Arr' => Illuminate\Support\Arr::class, 'Artisan' => Illuminate\Support\Facades\Artisan::class, 'Auth' => Illuminate\Support\Facades\Auth::class, 'Blade' => Illuminate\Support\Facades\Blade::class, @@ -224,12 +225,13 @@ return [ 'Schema' => Illuminate\Support\Facades\Schema::class, 'Session' => Illuminate\Support\Facades\Session::class, 'Storage' => Illuminate\Support\Facades\Storage::class, + 'Str' => Illuminate\Support\Str::class, 'URL' => Illuminate\Support\Facades\URL::class, 'Validator' => Illuminate\Support\Facades\Validator::class, 'View' => Illuminate\Support\Facades\View::class, - 'Input' => Illuminate\Support\Facades\Input::class, + 'Input' => Illuminate\Support\Facades\Request::class, 'Form' => Collective\Html\FormFacade::class, - 'HTML' => Collective\Html\HtmlFacade::class, + //'HTML' => Collective\Html\HtmlFacade::class, 'Image' => Intervention\Image\Facades\Image::class, 'Carbon' => Carbon\Carbon::class, 'Date' => Jenssegers\Date\Date::class, diff --git a/config/permissions.php b/config/permissions.php index 98d7c70..092e457 100755 --- a/config/permissions.php +++ b/config/permissions.php @@ -23,12 +23,17 @@ return [ 'cms-fb' => ['name' => 'ADMIN CMS > Feedback' , 'color' => 'secondary'], 'cms-sb' => ['name' => 'ADMIN CMS > Sidebar' , 'color' => 'secondary'], 'cms-cn' => ['name' => 'ADMIN CMS > Inhalte' , 'color' => 'secondary'], - ], + 'cms-cn-in' => ['name' => 'ADMIN CMS > Inhalte > Infos' , 'color' => 'secondary'], + 'cms-cn-al' => ['name' => 'ADMIN CMS > Inhalte > Inhalte' , 'color' => 'secondary'], + 'cms-cn-co' => ['name' => 'ADMIN CMS > Inhalte > Länder' , 'color' => 'secondary'], + 'cms-cn-au' => ['name' => 'ADMIN CMS > Inhalte > Autor' , 'color' => 'secondary'], + ], 2 => [ 'sua-st' => ['name' => 'SUPERADMIN > Einstellungen' , 'color' => 'superadmin'], 'sua-st-tp' => ['name' => 'SUPERADMIN > Einstellungen > Reisprogramme' , 'color' => 'superadmin'], 'sua-st-tc' => ['name' => 'SUPERADMIN > Einstellungen > Reiseländer' , 'color' => 'superadmin'], 'sua-st-tn' => ['name' => 'SUPERADMIN > Einstellungen > Nationalitäten' , 'color' => 'superadmin'], + 'sua-st-ke' => ['name' => 'SUPERADMIN > Einstellungen > Keywords' , 'color' => 'superadmin'], 'sua-re' => ['name' => 'SUPERADMIN > Export' , 'color' => 'superadmin'], 'sua-re-bo' => ['name' => 'SUPERADMIN > Export > Buchungen' , 'color' => 'superadmin'], 'sua-re-pp' => ['name' => 'SUPERADMIN > Export > Leistungsträger' , 'color' => 'superadmin'], diff --git a/database/migrations/2018_10_28_134530_create_travel_program_table.php b/database/migrations/2018_10_28_134530_create_travel_program_table.php deleted file mode 100644 index cd37294..0000000 --- a/database/migrations/2018_10_28_134530_create_travel_program_table.php +++ /dev/null @@ -1,36 +0,0 @@ -create('travel_program', function (Blueprint $table) { - $table->increments('id'); - $table->string('title'); - $table->string('subtitle'); - $table->string('program_code'); - $table->string('weekdays'); - $table->boolean('status')->default('true'); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::connection('mysql_stern')->dropIfExists('travel_program'); - } -} diff --git a/database/migrations/2018_10_29_202124_create_arrangement_table.php b/database/migrations/2018_10_29_202124_create_arrangement_table.php deleted file mode 100644 index 6dd727f..0000000 --- a/database/migrations/2018_10_29_202124_create_arrangement_table.php +++ /dev/null @@ -1,56 +0,0 @@ -bigIncrements('id'); - $table->bigInteger('template_id')->nullable(); - $table->date('state')->nullable(); - $table->date('begin')->nullable(); - $table->date('end')->nullable(); - $table->string('type_s', 80)->nullable(); - $table->text('data_s')->nullable(); - $table->bigInteger('view_position')->nullable(); - $table->bigInteger('booking_id')->nullable(); - $table->bigInteger('type_id'); - $table->tinyInteger('in_pdf')->nullable()->default(0); - - $table->index('template_id', 'arrangement_template_id_idx'); - $table->index('booking_id', 'arrangement_booking_id_idx'); - - $table->foreign('booking_id', 'arrangement_booking_id_booking_id')->references('id')->on('booking')->onDelete('CASCADE -')->onUpdate('RESTRICT'); - $table->foreign('template_id', 'arrangement_template_id_arrangement_template_id')->references('id')->on('arrangement_template')->onDelete('CASCADE -')->onUpdate('RESTRICT'); - - }); - - - - } - - /** - * Reverse the migrations. - * - * @return void - */ - public function down() - { - Schema::dropIfExists('arrangement'); - } -} diff --git a/database/migrations/2019_03_11_094922_create_travel_guides_table.php b/database/migrations/2019_03_11_094922_create_travel_guides_table.php index cc5b34b..7d32edc 100644 --- a/database/migrations/2019_03_11_094922_create_travel_guides_table.php +++ b/database/migrations/2019_03_11_094922_create_travel_guides_table.php @@ -21,6 +21,9 @@ class CreateTravelGuidesTable extends Migration $table->string('text')->nullable(); $table->text('full_text')->nullable(); + + $table->unsignedBigInteger('author_id')->nullable(); + $table->string('keyword')->nullable(); @@ -37,6 +40,10 @@ class CreateTravelGuidesTable extends Migration $table->timestamps(); + $table->foreign('author_id') + ->references('id') + ->on('c_m_s_authors'); + }); } diff --git a/database/migrations/2020_02_27_160814_create_keywords_table.php b/database/migrations/2020_02_27_160814_create_keywords_table.php new file mode 100644 index 0000000..07c144f --- /dev/null +++ b/database/migrations/2020_02_27_160814_create_keywords_table.php @@ -0,0 +1,32 @@ +create('keywords', function (Blueprint $table) { + $table->bigIncrements('id'); + $table->string('name', 255); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('mysql_stern')->dropIfExists('keywords'); + } +} diff --git a/database/migrations/2020_03_06_140522_create_c_m_s_authors_table.php b/database/migrations/2020_03_06_140522_create_c_m_s_authors_table.php new file mode 100644 index 0000000..db35934 --- /dev/null +++ b/database/migrations/2020_03_06_140522_create_c_m_s_authors_table.php @@ -0,0 +1,32 @@ +create('c_m_s_authors', function (Blueprint $table) { + $table->bigIncrements('id'); + $table->string('name', 255); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('mysql_stern')->dropIfExists('c_m_s_authors'); + } +} diff --git a/packages/iqcontent/laravel-filemanager/composer.json b/packages/iqcontent/laravel-filemanager/composer.json index 7232738..20a8b9c 100644 --- a/packages/iqcontent/laravel-filemanager/composer.json +++ b/packages/iqcontent/laravel-filemanager/composer.json @@ -23,11 +23,11 @@ "ext-exif": "*", "ext-fileinfo": "*", "intervention/image": "2.*", - "illuminate/config": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.*", - "illuminate/filesystem": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.*", - "illuminate/support": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.*", - "illuminate/http": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.*", - "illuminate/container": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.*", + "illuminate/config": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0", + "illuminate/filesystem": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0", + "illuminate/support": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0", + "illuminate/http": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0", + "illuminate/container": "5.4.* || 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0", "cviebrock/eloquent-sluggable": "*" }, "require-dev": { diff --git a/packages/iqcontent/laravel-filemanager/src/Controllers/FileController.php b/packages/iqcontent/laravel-filemanager/src/Controllers/FileController.php index 09a8a07..b75294c 100644 --- a/packages/iqcontent/laravel-filemanager/src/Controllers/FileController.php +++ b/packages/iqcontent/laravel-filemanager/src/Controllers/FileController.php @@ -55,6 +55,8 @@ class FileController extends LfmController $content_id = $this->helper->input('content_id'); $content_title = $this->helper->input('content_title'); $content_description = $this->helper->input('content_description'); + $content_author = $this->helper->input('content_author'); + $file = $this->lfm->pretty($file_name); @@ -63,6 +65,7 @@ class FileController extends LfmController 'id' => $content_id, 'title' => $content_title, 'description' => $content_description, + 'author' => $content_author, ]; if($content_id && $content_id != ""){ diff --git a/packages/iqcontent/laravel-filemanager/src/Controllers/UploadController.php b/packages/iqcontent/laravel-filemanager/src/Controllers/UploadController.php index 18cb59e..71172ee 100644 --- a/packages/iqcontent/laravel-filemanager/src/Controllers/UploadController.php +++ b/packages/iqcontent/laravel-filemanager/src/Controllers/UploadController.php @@ -44,15 +44,27 @@ class UploadController extends LfmController if (is_array($uploaded_files)) { $response = count($error_bag) > 0 ? $error_bag : parent::$success_response; - } else { // upload via ckeditor 'Upload' tab + } else { // upload via ckeditor5 expects json responses if (is_null($new_filename)) { - $response = $error_bag[0]; + $response = ['error' => + [ + 'message' => $error_bag[0] + ] + ]; } else { - $response = view(Lfm::PACKAGE_NAME . '::use') + + /*$response = view(Lfm::PACKAGE_NAME . '::use') ->withFile($this->lfm->setName($new_filename)->url()); +*/ + $url = $this->lfm->setName($new_filename)->url(); + + $response = [ + 'url' => $url + ]; } } - - return $response; + return response()->json($response); } + + } diff --git a/packages/iqcontent/laravel-filemanager/src/LfmItem.php b/packages/iqcontent/laravel-filemanager/src/LfmItem.php index ed06ad6..fb200e0 100644 --- a/packages/iqcontent/laravel-filemanager/src/LfmItem.php +++ b/packages/iqcontent/laravel-filemanager/src/LfmItem.php @@ -2,6 +2,7 @@ namespace IqContent\LaravelFilemanager; +use App\Models\CMSAuthor; use Symfony\Component\HttpFoundation\File\UploadedFile; class LfmItem @@ -9,7 +10,7 @@ class LfmItem private $lfm; private $helper; - private $columns = ['name', 'url', 'time', 'icon', 'color', 'is_file', 'is_image', 'thumb_url', 'size', 'dimension', 'content']; + private $columns = ['name', 'url', 'time', 'icon', 'color', 'is_file', 'is_image', 'thumb_url', 'size', 'dimension', 'content', 'identifier']; public $attributes = []; public function __construct(LfmPath $lfm, Lfm $helper) @@ -119,11 +120,28 @@ class LfmItem public function content() { if($this->model()){ - return $this->model()->content; + $content = $this->model()->content; + if(isset($content['author'])){ + $author = CMSAuthor::find($content['author']); + if($author){ + $content['author_name'] = $author->name; + } + } + + return $content; } } + public function identifier() + { + if($this->model()){ + return $this->model()->identifier; + } + } + + + public function sizeRow() { return $this->isFile() ? $this->lfm->size() : ''; diff --git a/packages/iqcontent/laravel-filemanager/src/LfmPath.php b/packages/iqcontent/laravel-filemanager/src/LfmPath.php index 13108cb..cb4ce29 100644 --- a/packages/iqcontent/laravel-filemanager/src/LfmPath.php +++ b/packages/iqcontent/laravel-filemanager/src/LfmPath.php @@ -313,11 +313,13 @@ class LfmPath // Upload section public function upload($file) { - $this->uploadValidator($file); + $error = $this->uploadValidator($file); + if($error !== 'pass'){ + return false; + } $new_file_name = $this->getNewName($file); $new_file_path = $this->setName($new_file_name)->path('absolute'); - $working_folder_id = $this->getModelParentFolderId(); //event(new ImageIsUploading($new_file_path)); @@ -339,7 +341,6 @@ class LfmPath ]); // TODO should be "FileWasUploaded" // event(new ImageWasUploaded($new_file_path)); - return $new_file_name; } diff --git a/packages/iqcontent/laravel-filemanager/src/views/crop.blade.php b/packages/iqcontent/laravel-filemanager/src/views/crop.blade.php index 62f8b9f..7a243d9 100644 --- a/packages/iqcontent/laravel-filemanager/src/views/crop.blade.php +++ b/packages/iqcontent/laravel-filemanager/src/views/crop.blade.php @@ -54,8 +54,8 @@ options = {}; $(document).ready(function () { - $("#notify").on("shown.bs.modal", function() { + $("#notify").find('.modal-footer button.btn-primary').hide(); var $dataX = $('#dataX'), $dataY = $('#dataY'), $dataHeight = $('#dataHeight'), @@ -67,8 +67,7 @@ preview: ".img-preview", strict: false, crop: function (data) { - console.log(data); - + // console.log(data); // Output the result data for cropping image. $dataX.val(Math.round(data.x)); $dataY.val(Math.round(data.y)); @@ -78,14 +77,20 @@ }; $image.cropper(options); }); + + $("#notify").on("hidden.bs.modal", function() { + $("#notify").find('.modal-footer button.btn-primary').show(); + $image.cropper('destroy'); + $("#notify").off("shown.bs.modal"); + $("#notify").off("hidden.bs.modal"); + }); }); function closeAndLoadItems() { - $image = $('.crop-container > img'); $image.cropper('destroy'); $('#notify').modal('hide').find('.modal-body').html(""); - loadItems(); + LFileManager.loadItems(); } function changeAspectRatio(_this, aspectRatio) { options.aspectRatio = aspectRatio; @@ -96,7 +101,7 @@ return false; } function performCrop() { - performLfmRequest('cropimage', { + LFileManager.performLfmRequest('cropimage', { img: $("#img").val(), working_dir: $("#working_dir").val(), dataX: $("#dataX").val(), @@ -108,7 +113,7 @@ } function performCropNew() { - performLfmRequest('cropnewimage', { + LFileManager.performLfmRequest('cropnewimage', { img: $("#img").val(), working_dir: $("#working_dir").val(), dataX: $("#dataX").val(), diff --git a/packages/iqcontent/laravel-filemanager/src/views/index.blade.php b/packages/iqcontent/laravel-filemanager/src/views/index.blade.php index 5fbdf50..a2a89b5 100644 --- a/packages/iqcontent/laravel-filemanager/src/views/index.blade.php +++ b/packages/iqcontent/laravel-filemanager/src/views/index.blade.php @@ -205,43 +205,43 @@ { name: 'rename', icon: 'edit', - label: lang['menu-rename'], + label: lfm_lang['menu-rename'], multiple: false }, { name: 'download', icon: 'download', - label: lang['menu-download'], + label: lfm_lang['menu-download'], multiple: true }, // { // name: 'preview', // icon: 'image', - // label: lang['menu-view'], + // label: lfm_lang['menu-view'], // multiple: true // }, { name: 'move', icon: 'paste', - label: lang['menu-move'], + label: lfm_lang['menu-move'], multiple: true }, { name: 'resize', icon: 'arrows-alt', - label: lang['menu-resize'], + label: lfm_lang['menu-resize'], multiple: false }, { name: 'crop', icon: 'crop', - label: lang['menu-crop'], + label: lfm_lang['menu-crop'], multiple: false }, { name: 'trash', icon: 'trash', - label: lang['menu-delete'], + label: lfm_lang['menu-delete'], multiple: true }, ]; @@ -250,12 +250,12 @@ { by: 'alphabetic', icon: 'sort-alpha-down', - label: lang['nav-sort-alphabetic'] + label: lfm_lang['nav-sort-alphabetic'] }, { by: 'time', icon: 'sort-numeric-down', - label: lang['nav-sort-time'] + label: lfm_lang['nav-sort-time'] } ]; @@ -268,7 +268,7 @@ uploadMultiple: false, parallelUploads: 5, clickable: '#upload-button', - dictDefaultMessage: lang['message-drop'], + dictDefaultMessage: lfm_lang['message-drop'], init: function() { var _this = this; // For the closure this.on('success', function(file, response) { diff --git a/packages/iqcontent/laravel-filemanager/src/views/move.blade.php b/packages/iqcontent/laravel-filemanager/src/views/move.blade.php index b36961d..14798bc 100644 --- a/packages/iqcontent/laravel-filemanager/src/views/move.blade.php +++ b/packages/iqcontent/laravel-filemanager/src/views/move.blade.php @@ -20,9 +20,9 @@ $("#notify").modal('hide'); var items =[]; $("#items").find("input").each(function() {items.push(this.id)}); - performLfmRequest('domove', { + LFileManager.performLfmRequest('domove', { items: items, goToFolder: $folder - }).done(refreshFoldersAndItems); + }).done(LFileManager.refreshFoldersAndItems); } diff --git a/packages/iqcontent/laravel-filemanager/src/views/resize.blade.php b/packages/iqcontent/laravel-filemanager/src/views/resize.blade.php index 3f783e3..a41b7e5 100644 --- a/packages/iqcontent/laravel-filemanager/src/views/resize.blade.php +++ b/packages/iqcontent/laravel-filemanager/src/views/resize.blade.php @@ -116,10 +116,10 @@ } function doResize() { - performLfmRequest('doresize', { + LFileManager.performLfmRequest('doresize', { img: $("#img").val(), dataHeight: $("#height").val(), dataWidth: $("#width").val() - }).done(loadItems); + }).done(LFileManager.loadItems); } diff --git a/public/css/application.css b/public/css/application.css index ee15ddd..e2af3e1 100644 --- a/public/css/application.css +++ b/public/css/application.css @@ -253,4 +253,91 @@ li li li li li div.dd-content-link { .switcher-on-off.switcher .switcher-input:checked ~ .switcher-indicator { background: #648859; color: #fff; -} \ No newline at end of file +} + +.note-toolbar.card-header { + background-color: #f0f0f0; +} + +@media (min-width: 992px){ + .modal-xl { + max-width: 962px; + } +} +@media (min-width: 1200px){ + .modal-xl { + max-width: 1170px; + } +} + +figure { + + border: 1px solid gainsboro; + display: inline-block; +} +figure p { + margin-bottom: 0.2rem; +} +figcaption { + display: block; + padding: 10px; +} +.figure-caption { + color: #595a5c; +} + +.modal-xl.modal-dialog { + width: 98%; + height: 92%; + padding: 0; +} +.modal-xl .modal-content { + min-height: 99%; +} + +.note-editor.note-frame.fullscreen, .note-editor.note-airframe.fullscreen { + z-index: 2040; +} + +.video-container { + position: relative; + padding-bottom: 56.25%; + height: 0; + overflow: hidden; +} + +.video-container iframe, +.video-container object, +.video-container embed { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} + +.mediaA { + width: 98%; + margin-left: .9%; + margin-right: .9%; + display: block; +} +.mediaA img { + float: left; + width: 100%; +} + + +.mediaA .mediaInfo { + width: 100%; + float: left; + background-color: #648859; + color: #fff; + margin-bottom: 1rem; + +} +.mediaA .mediaInfo p { + padding: 4px 4px 4px 8px; + margin: 0; + width: auto; +} diff --git a/public/js/_bak_1_filemanager.js b/public/js/_bak_1_filemanager.js new file mode 100644 index 0000000..5e9cfa6 --- /dev/null +++ b/public/js/_bak_1_filemanager.js @@ -0,0 +1,933 @@ + +var lfm_route = location.origin + '/laravel-filemanager'; +var lfm_show_list; +var lfm_sort_type = 'alphabetic'; +var lfm_selected = []; +var lfm_items = []; +var lfm_content = '#file-manager-content'; + + +function initFileManager($editor = false) { + + + if(!$editor){ + $(document).on('click', '#lfm_add-file', function () { + performLfmRequest('add-file', {}) + .done(function (data) { + hideNavAndShowEditor(data, function () { + performLfmRequest('add-dofile', { + working_dir: $("#working_dir").val(), + file_type: $("#from_file_type").val(), + // file_name: $("#form_file_name").val(), + file_content: $("#form_file_content").val(), + }).done(refreshFoldersAndItems); + }); + }); + }); + + $(document).on('click', '#lfm_add-folder', function () { + dialog(lang['message-name'], '', createFolder); + }); + $(document).on('click', '#lfm_upload', function () { + $('#uploadModal').modal('show'); + }); + $('#uploadModal').on('hidden.bs.modal', function(e) { + $('#uploadForm')[0].dropzone.removeAllFiles(); + }); + $('#uploadClearButton').on('click', function () { + $('#uploadForm')[0].dropzone.removeAllFiles(); + }); + } + + + if($(lfm_content).length) { + loadItems(); + performLfmRequest('errors') + .done(function (response) { + JSON.parse(response).forEach(function (message) { + $('#alerts').append( + $('
').addClass('alert alert-warning') + .append($('').addClass('fas fa-exclamation-circle')) + .append(' ' + message) + ); + }); + }); + + $(lfm_content).on('dragenter', function () { + $('#uploadModal').modal('show'); + }); + + + + } + + // Checkboxes + $('.file-manager-container').on('change', '.file-item-checkbox input', function() { + $(this).parents('.file-item')[this.checked ? 'addClass': 'removeClass']('selected border-primary'); + }); + + // Focus + $('.file-manager-container').on('focusin', '.file-item', function() { + $(this).addClass('focused'); + }); + + $('.file-manager-container').on('focusout', '.file-item', function() { + if ($('.file-item-actions.show').length) return; + $(this).removeClass('focused'); + }); + + $('.file-manager-container').on('hide.bs.dropdown', '.file-item-actions', function() { + if ($(this).parents('.file-item').find(':focus').length) return; + $(this).parents('.file-item').removeClass('focused'); + }); + + // Change view + + $('[name="file-manager-view"]').on('change', function() { + $('.file-manager-container') + .removeClass('file-manager-col-view file-manager-row-view') + .addClass(this.value); + }); + + + + +}; + + +$(document).ready(function () { + + initFileManager(); + + /* + + actions.reverse().forEach(function (action) { + $('#nav-buttons > ul').prepend( + $('
  • ').addClass('nav-item').append( + $('').addClass('nav-link d-none') + .attr('data-action', action.name) + .attr('data-multiple', action.multiple) + .append($('').addClass('fas fa-fw fa-' + action.icon)) + .append($('').text(action.label)) + ) + ); + }); + + sortings.forEach(function (sort) { + $('#nav-buttons .dropdown-menu').append( + $('').addClass('dropdown-item').attr('data-sortby', sort.by) + .append($('').addClass('fas fa-fw fa-' + sort.icon)) + .append($('').text(sort.label)) + .click(function() { + sort_type = sort.by; + loadItems(); + }) + ); + }); + */ + + + /* if (usingWysiwygEditor()) { + $('#multi_selection_toggle').hide(); + }*/ +}); + +// ====================== +// == Navbar actions == +// ====================== +/* +$('#multi_selection_toggle').click(function () { + multi_selection_enabled = !multi_selection_enabled; + + $('#multi_selection_toggle i') + .toggleClass('fa-times', multi_selection_enabled) + .toggleClass('fa-check-double', !multi_selection_enabled); + + if (!multi_selection_enabled) { + clearSelected(); + } +}); + +*/ + + +/* +$(document).on('click', '[data-display]', function() { + show_list = $(this).data('display'); + loadItems(); +}); + +$(document).on('click', '[data-action]', function() { + window[$(this).data('action')]($(this).data('multiple') ? getSelectedItems() : getOneSelectedElement()); +}); + +// ========================== +// == Multiple Selection == +// ========================== +*/ + +/* +function clearSelected () { + selected = []; + + multi_selection_enabled = false; + + updateSelectedStyle(); +} + +function updateSelectedStyle() { + items.forEach(function (item, index) { + $('[data-id=' + index + ']') + .find('.square') + .toggleClass('selected', selected.indexOf(index) > -1); + }); + toggleActions(); +} + +function getOneSelectedElement(orderOfItem) { + var index = orderOfItem !== undefined ? orderOfItem : selected[0]; + return items[index]; +} +function getSelectedItems() { + return selected.reduce(function (arr_objects, id) { + arr_objects.push(getOneSelectedElement(id)); + return arr_objects + }, []); +} + +*/ + + +function getSelectedItems() { + var items = []; + + $('input.lfm-control-input').each(function () { + if($(this).prop('checked')){ + items.push(getOneSelectedElement($(this).parents('.file-item').data('id'))); + } + }); + return items; +} + +function hasSelectedItems() { + $('input.lfm-control-input').each(function () { + //console.log($(this).prop('checked')); + if($(this).prop('checked')){ + return true; + } + }); + return false; +} + +function getOneSelectedElement(orderOfItem) { + var index = orderOfItem !== undefined ? orderOfItem : lfm_selected[0]; + return lfm_items[index]; +} + +function toggleActions() { + + $('a[data-action=item_rename]').on('click', function () { + item = getOneSelectedElement($(this).parents('.file-item').data('id')); + rename(item); + }); + + $('a[data-action=item_move]').on('click', function (e) { + var items = []; + items.push(getOneSelectedElement($(this).parents('.file-item').data('id'))); + move(items); + }); + + $('a[data-action=item_color]').on('click', function (e) { + item = getOneSelectedElement($(this).parents('.file-item').data('id')); + colors(item); + }); + + $('a[data-action=item_crop]').on('click', function (e) { + item = getOneSelectedElement($(this).parents('.file-item').data('id')); + crop(item); + }); + + $('a[data-action=item_resize]').on('click', function (e) { + item = getOneSelectedElement($(this).parents('.file-item').data('id')); + resize(item); + }); + + $('a[data-action=item_trash]').on('click', function () { + var items = []; + items.push(getOneSelectedElement($(this).parents('.file-item').data('id'))); + trash(items); + }); + + $('a[data-action=item_download]').on('click', function () { + var items = []; + items.push(getOneSelectedElement($(this).parents('.file-item').data('id'))); + download(items); + }); + + + + $('a[data-action=selected_items_move]').on('click', function () { + var items = getSelectedItems(); + move(items); + }); + + $('a[data-action=selected_items_remove]').on('click', function () { + var items = getSelectedItems(); + trash(items); + }); + + $('a[data-action=selected_items_download]').on('click', function () { + var items = getSelectedItems(); + download(items); + }); + + + + + /* var one_selected = selected.length === 1; + var many_selected = selected.length >= 1; + var only_image = getSelectedItems() + + .filter(function (item) { return !item.is_image; }) + .length === 0; + var only_file = getSelectedItems() + .filter(function (item) { return !item.is_file; }) + .length === 0; + + $('[data-action=use]').toggleClass('d-none', !(many_selected && only_file)); + $('[data-action=rename]').toggleClass('d-none', !one_selected); + $('[data-action=preview]').toggleClass('d-none', !(many_selected && only_file)); + $('[data-action=move]').toggleClass('d-none', !many_selected); + $('[data-action=download]').toggleClass('d-none', !(many_selected && only_file)); + $('[data-action=resize]').toggleClass('d-none', !(one_selected && only_image)); + $('[data-action=crop]').toggleClass('d-none', !(one_selected && only_image)); + $('[data-action=trash]').toggleClass('d-none', !many_selected); + $('[data-action=open]').toggleClass('d-none', !one_selected || only_file); + $('#multi_selection_toggle').toggleClass('d-none', usingWysiwygEditor() || !many_selected); + $('#actions').toggleClass('d-none', selected.length === 0); + */ + +} + + + +// ====================== +// == Folder actions == +// ====================== + + + +function goTo(new_dir) { + if(!$('.dropdown-menu').hasClass('show')){ + $('#working_dir').val(new_dir); + loadItems(); + } +} + +function getPreviousDir() { + var working_dir = $('#working_dir').val(); + if(!working_dir){ + working_dir = "/shares"; + } + return working_dir.substring(0, working_dir.lastIndexOf('/')); +} + +// ==================== +// == Ajax actions == +// ==================== + +function performLfmRequest(url, parameter, type) { + var data = defaultParameters(); + if (parameter != null) { + $.each(parameter, function (key, value) { + data[key] = value; + }); + } + // console.log(lfm_route + '/' + url); + // console.log(type); + // console.log(data); + return $.ajax({ + type: 'GET', + beforeSend: function(request) { + var token = getUrlParam('token'); + if (token !== null) { + request.setRequestHeader("Authorization", 'Bearer ' + token); + } + }, + dataType: type || 'text', + url: lfm_route + '/' + url, + data: data, + cache: false + }).done(function (data) { + // console.log(data); + /* if(data !== "OK"){ + var response = JSON.parse(data); + console.log("done"); + console.log(response); + if(response.type === "error"){ + $.growl({ + title: "Error", + message: response.data, + location: 'tr' + }); + } + } + */ + + }).fail(function (jqXHR, textStatus, errorThrown) { + console.log(jqXHR); + console.log(textStatus); + console.log(errorThrown); + displayErrorResponse(jqXHR); + refreshFoldersAndItems(); + }); +} + +function displayErrorResponse(jqXHR) { + notify('
    ' + jqXHR.responseText + '
    '); +}; + +function isJSON(text) { + if (typeof text!=="string"){ + return false; + } + try{ + JSON.parse(text); + return true; + } + catch (error){ + return false; + } +} + +var refreshFoldersAndItems = function (data) { + loadItems(); + if(isJSON(data)){ + var response = JSON.parse(data); + //console.log("done"); + //console.log(response); + if(response.type === "error"){ + $.growl({ + title: "Error", + message: response.data, + location: 'tr' + }); + } + }else{ + if(data != 'OK') { + data = Array.isArray(data) ? data.join('
    ') : data; + notify(data); + } + + } +}; + +var hideNavAndShowEditor = function (data, callback = false) { + // $('#nav-buttons > ul').addClass('d-none'); + //console.log(data); + notify(data, callback); + +}; + +function loadItems() { + loading(true); + performLfmRequest('jsonitems', {show_list: lfm_show_list, sort_type: lfm_sort_type}, 'html') + .done(function (data) { + //console.log(data); + lfm_selected = []; + var response = JSON.parse(data); + var working_dir = response.working_dir; + lfm_items = response.items; + var hasItems = lfm_items.length !== 0; + $('#lfm_empty').toggleClass('d-none', hasItems); + //$(lfm_content).html(''); //.removeAttr('class'); + var toprev = $('
    '); + $(lfm_content).html('').append(toprev); + + if (hasItems) { + + $(lfm_content).addClass(response.display).addClass('preserve_actions_space'); + + lfm_items.forEach(function (item, index) { + var template = $('#lfm_item-template').clone() + .removeAttr('id').removeClass('d-none') + .attr('data-id', index) + //.click(toggleSelected) + .click(function (e) { + //console.log($(e.target)); + if(!$(e.target).hasClass('lfm-click-disable') && !$(e.target).hasClass('dropdown-item')){ + if (item.is_file) { + if($(e.target).hasClass('file-item-img') || $(e.target).hasClass('file-item-icon')){ + preview_item(item); + }else{ + if($(this).hasClass('file-item')){ + $(this).find('.lfm-control-input').click(); + } + + } + } else { + goTo(item.url); + } + } + if($(e.target).hasClass('lfm-control-input')){ + if(getSelectedItems().length > 0){ + if($('.media-multi-settings').hasClass('d-none')){ + $('.media-multi-settings').removeClass('d-none'); + } + }else{ + if(!$('.media-multi-settings').hasClass('d-none')){ + $('.media-multi-settings').addClass('d-none'); + } + } + } + + }); + if (item.thumb_url) { + var image = $('
    ').addClass('file-item-img').css('background-image', 'url("' + item.thumb_url + '?timestamp=' + item.time + '")'); + var dot = $('').addClass('badge badge-dot badge-default indicator_before').css({"background-color":item.color}); + } else { + var image = $('
    ').addClass('file-item-icon fa ' + item.icon).css({"color":item.color}); + var dot = $('').addClass('badge badge-dot badge-default indicator_before').css({"background-color":item.color}); + + + } + + if(!item.is_image){ //no image + template.find('.link-item-crop').remove(); + template.find('.link-item-resize').remove(); + }else{ + // template.find('.link-item-color').remove(); + } + + if(!item.is_file){ //dirs + template.find('.link-item-download').remove(); + } + + template.find('.file-item-name').before(image); + + var item_name = $('').addClass('file-item-name-insert').html(item.name); + template.find('.file-item-name').html(item_name); + template.find('.file-item-name-insert').before(dot); + + var str = ""; + if(item.dimension){ + str += item.dimension + " | " + } + if(item.size){ + str += item.size + " | " + } + str += (new Date(item.time * 1000)).toLocaleString(); + template.find('.file-item-changed').text(str); + $(lfm_content).append(template); + }); + } + + //$('#nav-buttons > ul').removeClass('d-none'); + + $('#working_dir').val(working_dir); + // console.log('Current working_dir : ' + working_dir); + var breadcrumbs = []; + var validSegments = working_dir.split('/').filter(function (e) { return e; }); + validSegments.forEach(function (segment, index) { + if (index === 0) { + // set root folder name as the first breadcrumb + breadcrumbs.push("Medien"); + //breadcrumbs.push($("[data-path='/" + segment + "']").text()); + } else { + breadcrumbs.push(segment); + } + }); + + $('#current_folder').text(breadcrumbs[breadcrumbs.length - 1]); + $('#lfm_breadcrumbs > ol').html(''); + breadcrumbs.forEach(function (breadcrumb, index) { + var li = $('
  • ').addClass('breadcrumb-item').text(breadcrumb); + + if (index === breadcrumbs.length - 1) { + li.addClass('active').attr('aria-current', 'page'); + } else { + li.click(function () { + // go to corresponding path + goTo('/' + validSegments.slice(0, 1 + index).join('/')); + }); + } + + $('#lfm_breadcrumbs > ol').append(li); + }); + var atRootFolder = getPreviousDir() == ''; + $('#to-previous').toggleClass('d-none', atRootFolder); + $('#to-previous').click(function () { + var previous_dir = getPreviousDir(); + if (previous_dir == '') return; + goTo(previous_dir); + }); + + loading(false); + toggleActions(); + }); +} + +function loading(show_loading) { + $('#lfm_loading').toggleClass('d-none', !show_loading); +} + +function createFolder(folder_name) { + performLfmRequest('newfolder', {name: folder_name}) + .done(refreshFoldersAndItems); +} + + +// ================================== +// == File Actions == +// ================================== + +function rename(item) { + dialog(lang['message-rename'], item.name, function (new_name) { + performLfmRequest('rename', { + file: item.name, + new_name: new_name + }).done(refreshFoldersAndItems); + }); +} + +function colors(item) { + performLfmRequest('colorhue', {color: item.color}) + .done(function (data) { + hideNavAndShowEditor(data, function () { + performLfmRequest('docolorhue', { + file: item.name, + new_color: $('#notify').find('input').val(), + }).done(refreshFoldersAndItems); + }); + }); +} + +function trash(items) { + notify(lang['message-delete'], function () { + var d = performLfmRequest('delete', { + items: items.map(function (item) { return item.name; }) + }).done(refreshFoldersAndItems); + // console.log(d); + + }); +} + +function crop(item) { + performLfmRequest('crop', {img: item.name}) + .done(hideNavAndShowEditor); +} + +function resize(item) { + performLfmRequest('resize', {img: item.name}) + .done(hideNavAndShowEditor); +} + +function move(items) { + performLfmRequest('move', { items: items.map(function (item) { return item.name; }) }) + .done(refreshFoldersAndItems); +} + + + +function download(items) { + items.forEach(function (item, index) { + var data = defaultParameters(); + + data['file'] = item.name; + + var token = getUrlParam('token'); + if (token) { + data['token'] = token; + } + + setTimeout(function () { + location.href = lfm_route + '/download?' + $.param(data); + }, index * 100); + }); +} + +function open(item) { + goTo(item.url); +} + +function preview_item(item) { + //var items = []; + //items.push(item); + preview(item); +} + +function preview(item) { + var media = $('#previewTemplate').clone().attr('id', 'previewMedia').removeClass('d-none'); + var item_content_id = ""; + if(item.icon == "fa-image" || item.icon == "fa-file-pdf"){ + media.find('.media-preview').attr('src', item.url + '?timestamp=' + item.time).removeClass('d-none'); + }else if(item.icon == "fab fa-youtube-square"){ + media.find('.embed-responsive-item').attr('src', 'https://www.youtube.com/embed/' +item.content.id + '?rel=0'); + media.find('.embed-responsive').removeClass('d-none'); + item_content_id = item.content.id; + + + }else{ + var icon = $('
    ').addClass('file-item-icon fa ' + item.icon).css('color', item.color); + media.find('.file-manager-col-view').html(icon).removeClass('d-none'); + } + + + if(item.content){ + media.find('.media-content-title').val(item.content.title); + media.find('.media-content-description').val(item.content.description); + } + media.find('.media-content-title').parent().removeClass('d-none'); + media.find('.media-content-description').parent().removeClass('d-none'); + + media.find('.media-name').html(item.name); + media.find('.media-url').val(item.url); + media.find('.media-download').attr('target', '_blank').attr('href', item.url); + + + callback = function () { + performLfmRequest('file-content', { + file: item.name, + content_id: item_content_id, + content_title: media.find('.media-content-title').val(), + content_description: media.find('.media-content-description').val(), + }).done(refreshFoldersAndItems); + }; + + + /* if (item.thumb_url) { + media.find('.carousel-image').css('background-image', 'url(\'' + item.url + '?timestamp=' + item.time + '\')'); + } else { + media.find('.carousel-image').css('width', '50vh').append($('
    ').addClass('mime-icon ico-' + item.icon)); + } + + media.find('.carousel-label') + + .append($('')); +*/ + + notify(media, callback); +} + +/*function preview(items) { + var carousel = $('#carouselTemplate').clone().attr('id', 'previewCarousel').removeClass('d-none'); + var imageTemplate = carousel.find('.carousel-item').clone().removeClass('active'); + var indicatorTemplate = carousel.find('.carousel-indicators > li').clone().removeClass('active'); + carousel.children('.carousel-inner').html(''); + carousel.children('.carousel-indicators').html(''); + carousel.children('.carousel-indicators,.carousel-control-prev,.carousel-control-next').toggle(items.length > 1); + + items.forEach(function (item, index) { + var carouselItem = imageTemplate.clone() + .addClass(index === 0 ? 'active' : ''); + + if (item.thumb_url) { + carouselItem.find('.carousel-image').css('background-image', 'url(\'' + item.url + '?timestamp=' + item.time + '\')'); + } else { + carouselItem.find('.carousel-image').css('width', '50vh').append($('
    ').addClass('mime-icon ico-' + item.icon)); + } + + carouselItem.find('.carousel-label').attr('target', '_blank').attr('href', item.url) + .append(item.name) + .append($('')); + + carousel.children('.carousel-inner').append(carouselItem); + + var carouselIndicator = indicatorTemplate.clone() + .addClass(index === 0 ? 'active' : '') + .attr('data-slide-to', index); + carousel.children('.carousel-indicators').append(carouselIndicator); + }); + + + // carousel swipe control + var touchStartX = null; + + carousel.on('touchstart', function (event) { + var e = event.originalEvent; + if (e.touches.length == 1) { + var touch = e.touches[0]; + touchStartX = touch.pageX; + } + }).on('touchmove', function (event) { + var e = event.originalEvent; + if (touchStartX != null) { + var touchCurrentX = e.changedTouches[0].pageX; + if ((touchCurrentX - touchStartX) > 60) { + touchStartX = null; + carousel.carousel('prev'); + } else if ((touchStartX - touchCurrentX) > 60) { + touchStartX = null; + carousel.carousel('next'); + } + } + }).on('touchend', function () { + touchStartX = null; + }); + // end carousel swipe control + + notify(carousel); +}*/ + + +/* +function use(items) { + function useTinymce3(url) { + if (!usingTinymce3()) { return; } + + var win = tinyMCEPopup.getWindowArg("window"); + win.document.getElementById(tinyMCEPopup.getWindowArg("input")).value = url; + if (typeof(win.ImageDialog) != "undefined") { + // Update image dimensions + if (win.ImageDialog.getImageData) { + win.ImageDialog.getImageData(); + } + + // Preview if necessary + if (win.ImageDialog.showPreviewImage) { + win.ImageDialog.showPreviewImage(url); + } + } + tinyMCEPopup.close(); + } + + function useTinymce4AndColorbox(url) { + if (!usingTinymce4AndColorbox()) { return; } + + parent.document.getElementById(getUrlParam('field_name')).value = url; + + if(typeof parent.tinyMCE !== "undefined") { + parent.tinyMCE.activeEditor.windowManager.close(); + } + if(typeof parent.$.fn.colorbox !== "undefined") { + parent.$.fn.colorbox.close(); + } + } + + function useCkeditor3(url) { + if (!usingCkeditor3()) { return; } + + if (window.opener) { + // Popup + window.opener.CKEDITOR.tools.callFunction(getUrlParam('CKEditorFuncNum'), url); + } else { + // Modal (in iframe) + parent.CKEDITOR.tools.callFunction(getUrlParam('CKEditorFuncNum'), url); + parent.CKEDITOR.tools.callFunction(getUrlParam('CKEditorCleanUpFuncNum')); + } + } + + function useFckeditor2(url) { + if (!usingFckeditor2()) { return; } + + var p = url; + var w = data['Properties']['Width']; + var h = data['Properties']['Height']; + window.opener.SetUrl(p,w,h); + } + + var url = items[0].url; + var callback = getUrlParam('callback'); + var useFileSucceeded = true; + + if (usingWysiwygEditor()) { + useTinymce3(url); + + useTinymce4AndColorbox(url); + + useCkeditor3(url); + + useFckeditor2(url); + } else if (callback && window[callback]) { + window[callback](getSelectedItems()); + } else if (callback && parent[callback]) { + parent[callback](getSelecteditems()); + } else if (window.opener) { // standalone button or other situations + window.opener.SetUrl(getSelectedItems()); + } else { + useFileSucceeded = false; + } + + if (useFileSucceeded) { + if (window.opener) { + window.close(); + } + } else { + console.log('window.opener not found'); + // No editor found, open/download file using browser's default method + window.open(url); + } +} +//end useFile + +// ================================== +// == WYSIWYG Editors Check == +// ================================== + +function usingTinymce3() { + return !!window.tinyMCEPopup; +} + +function usingTinymce4AndColorbox() { + return !!getUrlParam('field_name'); +} + +function usingCkeditor3() { + return !!getUrlParam('CKEditor') || !!getUrlParam('CKEditorCleanUpFuncNum'); +} + +function usingFckeditor2() { + return window.opener && typeof data != 'undefined' && data['Properties']['Width'] != ''; +} + +function usingWysiwygEditor() { + return usingTinymce3() || usingTinymce4AndColorbox() || usingCkeditor3() || usingFckeditor2(); +} +*/ +// ================================== +// == Others == +// ================================== + +function getUrlParam(paramName) { + var reParam = new RegExp('(?:[\?&]|&)' + paramName + '=([^&]+)', 'i'); + var match = window.location.search.match(reParam); + return ( match && match.length > 1 ) ? match[1] : null; +} + +function defaultParameters() { + return { + working_dir: $('#working_dir').val(), + type: $('#type').val() + }; +} + +function notImp() { + notify('Not yet implemented!'); +} + +function notify(body, callback) { + + $('#notify').find('.btn-primary').toggle(callback !== undefined); + if(callback !== 'success'){ + $('#notify').find('.btn-primary').unbind().click(callback); + }else{ + $('#notify').find('.btn-primary').unbind(); + } + $('#notify').modal('show').find('.modal-body').html(body); +} + +function dialog(title, value, callback) { + $('#dialog').find('input').val(value); + $('#dialog').on('shown.bs.modal', function () { + $('#dialog').find('input').focus(); + }); + $('#dialog').find('.btn-primary').unbind('click').click(function (e) { + callback($('#dialog').find('input').val()); + }); + $('#dialog').find('input').unbind('keypress.key13').bind('keypress.key13', function (e) { + if (e.which === 13) { + $('#dialog').find('.btn-primary').click(); + } + }); + $('#dialog').modal('show').find('.modal-title').text(title); +} \ No newline at end of file diff --git a/public/js/_bak_filemanager.js b/public/js/_bak_filemanager.js new file mode 100644 index 0000000..6b3bcf7 --- /dev/null +++ b/public/js/_bak_filemanager.js @@ -0,0 +1,720 @@ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jquery')) : + typeof define === 'function' && define.amd ? define(['exports', 'jquery'], factory) : + (global = global || self, factory(global.fileManager = {}, global.jQuery)); +}(this, function (exports, $) { 'use strict'; + + $ = $ && $.hasOwnProperty('default') ? $['default'] : $; + + function _extends() { + _extends = Object.assign || function (target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } + } + return target; + }; + return _extends.apply(this, arguments); + } + + var lfm_route = location.origin + '/laravel-filemanager'; + var lfm_show_list; + var lfm_sort_type = 'alphabetic'; + var lfm_selected = []; + var lfm_items = []; + var LFM_CONTENT = '#file-manager-content'; + var LFM_CONTAINER = '.file-manager-container'; + var NAME = 'filemanager'; + var VERSION = '1.0.0'; + var DATA_KEY = 'fileManager'; + var Default = { + toggle: true, + preventDefault: true, + triggerElement: 'a', + parentTrigger: 'li', + subMenu: 'ul' + }; + + + + var FileManager = + /*#__PURE__*/ + function () { + + function FileManager(element, config) { + this._element = element; + this.config = _extends({}, Default, config); + + }// Getters + + var _proto = FileManager.prototype; + + _proto.test = function test(){ + console.log("test"); + }; + _proto.init = function init() { + console.log("int"); + + if (!this._editor) { + var _self = this; + $(document).on('click', '#lfm_add-file', function () { + _self._performLfmRequest('add-file', {}) + .done(function (data) { + _self._hideNavAndShowEditor(data, function () { + _self._performLfmRequest('add-dofile', { + working_dir: $("#working_dir").val(), + file_type: $("#from_file_type").val(), + // file_name: $("#form_file_name").val(), + file_content: $("#form_file_content").val(), + }).done(_self._refreshFoldersAndItems(_self)); + }); + }); + }); + + $(document).on('click', '#lfm_add-folder', function () { + _self._dialog(lang['message-name'], '', _self._createFolder()); + }); + $(document).on('click', '#lfm_upload', function () { + $('#uploadModal').modal('show'); + }); + $('#uploadModal').on('hidden.bs.modal', function (e) { + $('#uploadForm')[0].dropzone.removeAllFiles(); + }); + $('#uploadClearButton').on('click', function () { + $('#uploadForm')[0].dropzone.removeAllFiles(); + }); + } + + if ($(LFM_CONTENT).length) { + this._loadItems(); + this._performLfmRequest('errors') + .done(function (response) { + JSON.parse(response).forEach(function (message) { + $('#alerts').append( + $('
    ').addClass('alert alert-warning') + .append($('').addClass('fas fa-exclamation-circle')) + .append(' ' + message) + ); + }); + }); + + $(LFM_CONTENT).on('dragenter', function () { + $('#uploadModal').modal('show'); + }); + + + } + + if ($(LFM_CONTAINER).length) { + // Checkboxes + $(LFM_CONTAINER).on('change', '.file-item-checkbox input', function () { + $(this).parents('.file-item')[this.checked ? 'addClass' : 'removeClass']('selected border-primary'); + }); + + // Focus + $(LFM_CONTAINER).on('focusin', '.file-item', function () { + $(this).addClass('focused'); + }); + + $(LFM_CONTAINER).on('focusout', '.file-item', function () { + if ($('.file-item-actions.show').length) return; + $(this).removeClass('focused'); + }); + + $(LFM_CONTAINER).on('hide.bs.dropdown', '.file-item-actions', function () { + if ($(this).parents('.file-item').find(':focus').length) return; + $(this).parents('.file-item').removeClass('focused'); + }); + + } + + // Change view + $('[name="file-manager-view"]').on('change', function () { + $('.file-manager-container') + .removeClass('file-manager-col-view file-manager-row-view') + .addClass(this.value); + }); + + return this; + + }; + + // ====================== + // == Folder actions == + // ====================== + + _proto._getSelectedItems = function() { + var items = []; + $('input.lfm-control-input').each(function () { + if ($(this).prop('checked')) { + items.push(this._getOneSelectedElement($(this).parents('.file-item').data('id'))); + } + }); + return items; + }; + + _proto._hasSelectedItems = function() { + $('input.lfm-control-input').each(function () { + //console.log($(this).prop('checked')); + if ($(this).prop('checked')) { + return true; + } + }); + return false; + }; + + _proto._getOneSelectedElement = function(orderOfItem) { + var index = orderOfItem !== undefined ? orderOfItem : lfm_selected[0]; + return lfm_items[index]; + }; + + _proto._toggleActions = function() { + var _self = this; + + $('a[data-action=item_rename]').on('click', function () { + item = this._getOneSelectedElement($(this).parents('.file-item').data('id')); + _self._rename(item); + }); + + $('a[data-action=item_move]').on('click', function (e) { + var items = []; + items.push(_self._getOneSelectedElement($(this).parents('.file-item').data('id'))); + _self._move(items); + }); + + $('a[data-action=item_color]').on('click', function (e) { + item = _self._getOneSelectedElement($(this).parents('.file-item').data('id')); + _self._colors(item); + }); + + $('a[data-action=item_crop]').on('click', function (e) { + item = _self._getOneSelectedElement($(this).parents('.file-item').data('id')); + _self._crop(item); + }); + + $('a[data-action=item_resize]').on('click', function (e) { + item = _self._getOneSelectedElement($(this).parents('.file-item').data('id')); + _self._resize(item); + }); + + $('a[data-action=item_trash]').on('click', function () { + var items = []; + items.push(_self._getOneSelectedElement($(this).parents('.file-item').data('id'))); + _self._trash(items); + }); + + $('a[data-action=item_download]').on('click', function () { + var items = []; + items.push(_self._getOneSelectedElement($(this).parents('.file-item').data('id'))); + _self._download(items); + }); + + + $('a[data-action=selected_items_move]').on('click', function () { + var items = _self._getSelectedItems(); + _self._move(items); + }); + + $('a[data-action=selected_items_remove]').on('click', function () { + var items = _self._getSelectedItems(); + _self._trash(items); + }); + + $('a[data-action=selected_items_download]').on('click', function () { + var items = _self._getSelectedItems(); + _self._download(items); + }); + + }; + + _proto._goTo = function(new_dir) { + if (!$('.dropdown-menu').hasClass('show')) { + $('#working_dir').val(new_dir); + this._loadItems(); + } + }; + + _proto._getPreviousDir = function() { + var working_dir = $('#working_dir').val(); + if (!working_dir) { + working_dir = "/shares"; + } + return working_dir.substring(0, working_dir.lastIndexOf('/')); + }; + + // ==================== + // == Ajax actions == + // ==================== + + _proto._performLfmRequest = function(url, parameter, type) { + + var data = this._defaultParameters(); + if (parameter != null) { + $.each(parameter, function (key, value) { + data[key] = value; + }); + } + // console.log(lfm_route + '/' + url); + // console.log(type); + // console.log(data); + var _self = this; + return $.ajax({ + type: 'GET', + beforeSend: function (request) { + var token = _self.getUrlParam('token'); + if (token !== null) { + request.setRequestHeader("Authorization", 'Bearer ' + token); + } + }, + dataType: type || 'text', + url: lfm_route + '/' + url, + data: data, + cache: false + }).done(function (data) { + // console.log(data); + /* if(data !== "OK"){ + var response = JSON.parse(data); + console.log("done"); + console.log(response); + if(response.type === "error"){ + $.growl({ + title: "Error", + message: response.data, + location: 'tr' + }); + } + } + */ + + }).fail(function (jqXHR, textStatus, errorThrown) { + console.log(jqXHR); + console.log(textStatus); + console.log(errorThrown); + _self._displayErrorResponse(jqXHR); + _self._refreshFoldersAndItems(_self); + }); + }; + + _proto._displayErrorResponse = function(jqXHR) { + this._notify('
    ' + jqXHR.responseText + '
    '); + }; + + _proto._isJSON = function(text) { + if (typeof text !== "string") { + return false; + } + try { + JSON.parse(text); + return true; + } catch (error) { + return false; + } + }; + + _proto._refreshFoldersAndItems = function(_self, data) { + _self._loadItems(); + if (_self._isJSON(data)) { + var response = JSON.parse(data); + //console.log("done"); + //console.log(response); + if (response.type === "error") { + $.growl({ + title: "Error", + message: response.data, + location: 'tr' + }); + } + } else { + if (data !== 'OK') { + data = Array.isArray(data) ? data.join('
    ') : data; + this._notify(data); + } + + } + }; + + _proto._hideNavAndShowEditor = function(data, callback = false) { + // $('#nav-buttons > ul').addClass('d-none'); + //console.log(data); + this._notify(data, callback); + + }; + + _proto._loadItems = function() { + this._loading(true); + var _self = this; + this._performLfmRequest('jsonitems', {show_list: lfm_show_list, sort_type: lfm_sort_type}, + 'html') + .done(function (data) { + //console.log(data); + lfm_selected = []; + var response = JSON.parse(data); + var working_dir = response.working_dir; + lfm_items = response.items; + var hasItems = lfm_items.length !== 0; + $('#lfm_empty').toggleClass('d-none', hasItems); + //$(LFM_CONTENT).html(''); //.removeAttr('class'); + var top_rev = $(''); + $(LFM_CONTENT).html('').append(top_rev); + + if (hasItems) { + $(LFM_CONTENT).addClass(response.display).addClass('preserve_actions_space'); + lfm_items.forEach(function (item, index) { + var template = $('#lfm_item-template').clone() + .removeAttr('id').removeClass('d-none') + .attr('data-id', index) + //.click(toggleSelected) + .click(function (e) { + //console.log($(e.target)); + if (!$(e.target).hasClass('lfm-click-disable') && !$(e.target).hasClass('dropdown-item')) { + if (item.is_file) { + if ($(e.target).hasClass('file-item-img') || $(e.target).hasClass('file-item-icon')) { + _self._preview_item(item); + } else { + if ($(this).hasClass('file-item')) { + $(this).find('.lfm-control-input').click(); + } + + } + } else { + _self._goTo(item.url); + } + } + if ($(e.target).hasClass('lfm-control-input')) { + if (this._getSelectedItems().length > 0) { + if ($('.media-multi-settings').hasClass('d-none')) { + $('.media-multi-settings').removeClass('d-none'); + } + } else { + if (!$('.media-multi-settings').hasClass('d-none')) { + $('.media-multi-settings').addClass('d-none'); + } + } + } + + }); + if (item.thumb_url) { + var image = $('
    ').addClass('file-item-img').css('background-image', 'url("' + item.thumb_url + '?timestamp=' + item.time + '")'); + var dot = $('').addClass('badge badge-dot badge-default indicator_before').css({"background-color": item.color}); + } else { + var image = $('
    ').addClass('file-item-icon fa ' + item.icon).css({"color": item.color}); + var dot = $('').addClass('badge badge-dot badge-default indicator_before').css({"background-color": item.color}); + + + } + + if (!item.is_image) { //no image + template.find('.link-item-crop').remove(); + template.find('.link-item-resize').remove(); + } else { + // template.find('.link-item-color').remove(); + } + + if (!item.is_file) { //dirs + template.find('.link-item-download').remove(); + } + + template.find('.file-item-name').before(image); + + var item_name = $('').addClass('file-item-name-insert').html(item.name); + template.find('.file-item-name').html(item_name); + template.find('.file-item-name-insert').before(dot); + + var str = ""; + if (item.dimension) { + str += item.dimension + " | " + } + if (item.size) { + str += item.size + " | " + } + str += (new Date(item.time * 1000)).toLocaleString(); + template.find('.file-item-changed').text(str); + $(LFM_CONTENT).append(template); + }); + } + + //$('#nav-buttons > ul').removeClass('d-none'); + + $('#working_dir').val(working_dir); + // console.log('Current working_dir : ' + working_dir); + var breadcrumbs = []; + var validSegments = working_dir.split('/').filter(function (e) { + return e; + }); + validSegments.forEach(function (segment, index) { + if (index === 0) { + // set root folder name as the first breadcrumb + breadcrumbs.push("Medien"); + //breadcrumbs.push($("[data-path='/" + segment + "']").text()); + } else { + breadcrumbs.push(segment); + } + }); + + $('#current_folder').text(breadcrumbs[breadcrumbs.length - 1]); + $('#lfm_breadcrumbs > ol').html(''); + breadcrumbs.forEach(function (breadcrumb, index) { + var li = $('
  • ').addClass('breadcrumb-item').text(breadcrumb); + + if (index === breadcrumbs.length - 1) { + li.addClass('active').attr('aria-current', 'page'); + } else { + li.click(function () { + // go to corresponding path + this._goTo('/' + validSegments.slice(0, 1 + index).join('/')); + }); + } + + $('#lfm_breadcrumbs > ol').append(li); + }); + var atRootFolder = _self._getPreviousDir() == ''; + $('#to-previous').toggleClass('d-none', atRootFolder); + $('#to-previous').click(function () { + var previous_dir = _self._getPreviousDir(); + if (previous_dir === '') return; + this._goTo(previous_dir); + }); + + _self._loading(false); + _self._toggleActions(); + }); + }; + + _proto._loading = function(show_loading) { + $('#lfm_loading').toggleClass('d-none', !show_loading); + }; + + _proto._createFolder = function(folder_name) { + var _self = this; + this._performLfmRequest('newfolder', {name: folder_name}) + .done(_self._refreshFoldersAndItems(_self)); + }; + + + // ================================== + // == File Actions == + // ================================== + + _proto._rename = function(item) { + var _self = this; + this._dialog(lang['message-rename'], item.name, function (new_name) { + _self._performLfmRequest('rename', { + file: item.name, + new_name: new_name + }).done(_self._refreshFoldersAndItems(_self)); + }); + }; + + _proto._colors = function(item) { + var _self = this; + this._performLfmRequest('colorhue', {color: item.color}) + .done(function (data) { + _self._hideNavAndShowEditor(data, function () { + _self._performLfmRequest('docolorhue', { + file: item.name, + new_color: $('#notify').find('input').val(), + }).done(_self._refreshFoldersAndItems(_self)); + }); + }); + }; + + _proto._trash = function(items) { + var _self = this; + this._notify(lang['message-delete'], function () { + var d = _self._performLfmRequest('delete', { + items: items.map(function (item) { + return item.name; + }) + }).done(r_self._efreshFoldersAndItems); + // console.log(d); + + }); + }; + + _proto._crop = function(item) { + var _self = this; + this._performLfmRequest('crop', {img: item.name}) + .done(_self._hideNavAndShowEditor()); + }; + + _proto._resize = function(item) { + var _self = this; + this._performLfmRequest('resize', {img: item.name}) + .done(_self._hideNavAndShowEditor()); + }; + + _proto._move = function(items) { + var _self = this; + this._performLfmRequest('move', { + items: items.map(function (item) { + return item.name; + }) + }) + .done(_self._refreshFoldersAndItems(_self)); + }; + + + + _proto._download = function(items) { + items.forEach(function (item, index) { + var data = this._defaultParameters(); + data['file'] = item.name; + var token = this.getUrlParam('token'); + if (token) { + data['token'] = token; + } + setTimeout(function () { + location.href = lfm_route + '/download?' + $.param(data); + }, + index * 100); + }); + }; + + _proto._open = function(item) { + this._goTo(item.url); + }; + + _proto._preview_item = function(item) { + //var items = []; + //items.push(item); + this._preview(item); + }; + + _proto._preview = function(item) { + var media = $('#previewTemplate').clone().attr('id', 'previewMedia').removeClass('d-none'); + var item_content_id = ""; + if (item.icon === "fa-image" || item.icon === "fa-file-pdf") { + media.find('.media-preview').attr('src', item.url + '?timestamp=' + item.time).removeClass('d-none'); + } else if (item.icon === "fab fa-youtube-square") { + media.find('.embed-responsive-item').attr('src', 'https://www.youtube.com/embed/' + item.content.id + '?rel=0'); + media.find('.embed-responsive').removeClass('d-none'); + item_content_id = item.content.id; + + + } else { + var icon = $('
    ').addClass('file-item-icon fa ' + item.icon).css('color', item.color); + media.find('.file-manager-col-view').html(icon).removeClass('d-none'); + } + + + if (item.content) { + media.find('.media-content-title').val(item.content.title); + media.find('.media-content-description').val(item.content.description); + } + media.find('.media-content-title').parent().removeClass('d-none'); + media.find('.media-content-description').parent().removeClass('d-none'); + + media.find('.media-name').html(item.name); + media.find('.media-url').val(item.url); + media.find('.media-download').attr('target', '_blank').attr('href', item.url); + + var _self = this; + var callback = function () { + _self._performLfmRequest('file-content', { + file: item.name, + content_id: item_content_id, + content_title: media.find('.media-content-title').val(), + content_description: media.find('.media-content-description').val(), + }).done(_self._refreshFoldersAndItems(_self)); + }; + + this._notify(media, callback); + }; + + + // ================================== + // == Others == + // ================================== + + _proto.getUrlParam = function(paramName) { + var reParam = new RegExp('(?:[\?&]|&)' + paramName + '=([^&]+)', 'i'); + var match = window.location.search.match(reParam); + return (match && match.length > 1) ? match[1] : null; + }; + + _proto._defaultParameters = function() { + return { + working_dir: $('#working_dir').val(), + type: $('#type').val() + }; + }; + + _proto._notImp = function() { + this._notify('Not yet implemented!'); + }; + + _proto._notify = function(body, callback) { + + $('#notify').find('.btn-primary').toggle(callback !== undefined); + if(callback !== 'success'){ + $('#notify').find('.btn-primary').unbind().click(callback); + }else{ + $('#notify').find('.btn-primary').unbind(); + } + $('#notify').modal('show').find('.modal-body').html(body); + }; + + _proto._dialog = function(title, value, callback) { + $('#dialog').find('input').val(value); + $('#dialog').on('shown.bs.modal', function () { + $('#dialog').find('input').focus(); + }); + $('#dialog').find('.btn-primary').unbind('click').click(function (e) { + callback($('#dialog').find('input').val()); + }); + $('#dialog').find('input').unbind('keypress.key13').bind('keypress.key13', function (e) { + if (e.which === 13) { + $('#dialog').find('.btn-primary').click(); + } + }); + $('#dialog').modal('show').find('.modal-title').text(title); + }; + + FileManager.jQueryInterface = function jQueryInterface(config) { + // eslint-disable-next-line func-names + return this.each(function () { + var $this = $(this); + var data = $this.data(DATA_KEY); + + var conf = _extends({}, Default, $this.data(), typeof config === 'object' && config ? config : {}); + + if (!data) { + data = new FileManager(this, conf); + $this.data(DATA_KEY, data); + } + + if (typeof config === 'string') { + if (data[config] === undefined) { + throw new Error("No method named \"" + config + "\""); + } + + data[config](); + } + }); + }; + + + return FileManager; + +}(); + + $.fn[NAME] = FileManager.jQueryInterface; // eslint-disable-line no-param-reassign + $.fn[NAME].Constructor = FileManager; // eslint-disable-line no-param-reassign + $.fn[NAME].noConflict = function () { + // eslint-disable-line no-param-reassign + $.fn[NAME] = JQUERY_NO_CONFLICT; // eslint-disable-line no-param-reassign + return FileManager.jQueryInterface; +}; + + exports.FileManager = FileManager; + + Object.defineProperty(exports, '__esModule', { value: true }); + + //return FileManager; + +})); \ No newline at end of file diff --git a/public/js/custom.js b/public/js/custom.js index 3458f8e..21b4656 100644 --- a/public/js/custom.js +++ b/public/js/custom.js @@ -308,11 +308,27 @@ jQuery(document).ready(function() { e.preventDefault(); iq_update_data_load(e, $(this)); }); + + $(document).on('show.bs.modal', '.modal', function (event) { + var zIndex = 2040 + (10 * $('.modal:visible').length); + $(this).css('z-index', zIndex); + setTimeout(function() { + $('.modal-backdrop').not('.modal-stack').css('z-index', zIndex - 1).addClass('modal-stack'); + }, 0); + }); +}); + +jQuery.each(jQuery('textarea.autoExpand'), function() { + var offset = this.offsetHeight - this.clientHeight; + var resizeTextarea = function(el) { + jQuery(el).css('height', 'auto').css('height', el.scrollHeight + offset); + }; + jQuery(this).on('keyup input', function() { resizeTextarea(this); }).removeClass('autoExpand'); + resizeTextarea(this); }); $(function() { - $('.datepicker-range').datepicker({ calendarWeeks: true, orientation: 'auto left', diff --git a/public/js/filemanager.js b/public/js/filemanager.js index 5f807f8..adaa6a7 100644 --- a/public/js/filemanager.js +++ b/public/js/filemanager.js @@ -1,316 +1,263 @@ -var lfm_route = location.origin + '/laravel-filemanager'; -var lfm_show_list; -var lfm_sort_type = 'alphabetic'; -var lfm_selected = []; -var lfm_items = []; -var lfm_content = '#file-manager-content'; - -$(document).ready(function () { - /* - actions.reverse().forEach(function (action) { - $('#nav-buttons > ul').prepend( - $('
  • ').addClass('nav-item').append( - $('').addClass('nav-link d-none') - .attr('data-action', action.name) - .attr('data-multiple', action.multiple) - .append($('').addClass('fas fa-fw fa-' + action.icon)) - .append($('').text(action.label)) - ) - ); - }); - sortings.forEach(function (sort) { - $('#nav-buttons .dropdown-menu').append( - $('').addClass('dropdown-item').attr('data-sortby', sort.by) - .append($('').addClass('fas fa-fw fa-' + sort.icon)) - .append($('').text(sort.label)) - .click(function() { - sort_type = sort.by; - loadItems(); - }) - ); - }); - */ +var LFileManager = { + lfm_route : location.origin + '/laravel-filemanager', + lfm_show_list : '', + lfm_sort_type : 'alphabetic', + lfm_selected : {}, + lfm_items : {}, + lfm_content : '#file-manager-content', + lfm_config : {}, - if($(lfm_content).length) { - loadItems(); - performLfmRequest('errors') - .done(function (response) { - JSON.parse(response).forEach(function (message) { - $('#alerts').append( - $('
    ').addClass('alert alert-warning') - .append($('').addClass('fas fa-exclamation-circle')) - .append(' ' + message) - ); + initFileManager : function($editor = false) { + var _self = this; + //if(!$editor){ + this.initDropzone(); + $(document).on('click', '#lfm_add-file', function () { + _self.performLfmRequest('add-file', {}) + .done(function (data) { + _self.hideNavAndShowEditor(data, function () { + _self.performLfmRequest('add-dofile', { + working_dir: $("#working_dir").val(), + file_type: $("#from_file_type").val(), + // file_name: $("#form_file_name").val(), + file_content: $("#form_file_content").val(), + }).done(_self.refreshFoldersAndItems); + }); + }); + }); + + $(document).on('click', '#lfm_add-folder', function () { + _self.dialog(_self.lfm_config['lfm_lang']['message-name'], '', _self.createFolder); + }); + $(document).on('click', '#lfm_upload', function () { + $('#uploadModal').modal('show'); + }); + $('#uploadModal').on('hidden.bs.modal', function(e) { + $('#uploadForm')[0].dropzone.removeAllFiles(); + }); + $('#uploadClearButton').on('click', function () { + $('#uploadForm')[0].dropzone.removeAllFiles(); + }); + // } + + + if($(this.lfm_content).length) { + _self.loadItems(); + _self.performLfmRequest('errors') + .done(function (response) { + JSON.parse(response).forEach(function (message) { + $('#alerts').append( + $('
    ').addClass('alert alert-warning') + .append($('').addClass('fas fa-exclamation-circle')) + .append(' ' + message) + ); + }); }); + + $(_self.lfm_content).on('dragenter', function () { + $('#uploadModal').modal('show'); }); - - $(lfm_content).on('dragenter', function () { - $('#uploadModal').modal('show'); - }); - - - - } - /* if (usingWysiwygEditor()) { - $('#multi_selection_toggle').hide(); - }*/ -}); - -// ====================== -// == Navbar actions == -// ====================== -/* -$('#multi_selection_toggle').click(function () { - multi_selection_enabled = !multi_selection_enabled; - - $('#multi_selection_toggle i') - .toggleClass('fa-times', multi_selection_enabled) - .toggleClass('fa-check-double', !multi_selection_enabled); - - if (!multi_selection_enabled) { - clearSelected(); - } -}); - -*/ -$(document).on('click', '#lfm_add-file', function () { - performLfmRequest('add-file', {}) - .done(function (data) { - hideNavAndShowEditor(data, function () { - performLfmRequest('add-dofile', { - working_dir: $("#working_dir").val(), - file_type: $("#from_file_type").val(), - // file_name: $("#form_file_name").val(), - file_content: $("#form_file_content").val(), - }).done(refreshFoldersAndItems); - }); - }); -}); - -$(document).on('click', '#lfm_add-folder', function () { - dialog(lang['message-name'], '', createFolder); -}); - - - -$(document).on('click', '#lfm_upload', function () { - $('#uploadModal').modal('show'); -}); -/* -$(document).on('click', '[data-display]', function() { - show_list = $(this).data('display'); - loadItems(); -}); - -$(document).on('click', '[data-action]', function() { - window[$(this).data('action')]($(this).data('multiple') ? getSelectedItems() : getOneSelectedElement()); -}); - -// ========================== -// == Multiple Selection == -// ========================== -*/ - -/* -function clearSelected () { - selected = []; - - multi_selection_enabled = false; - - updateSelectedStyle(); -} - -function updateSelectedStyle() { - items.forEach(function (item, index) { - $('[data-id=' + index + ']') - .find('.square') - .toggleClass('selected', selected.indexOf(index) > -1); - }); - toggleActions(); -} - -function getOneSelectedElement(orderOfItem) { - var index = orderOfItem !== undefined ? orderOfItem : selected[0]; - return items[index]; -} -function getSelectedItems() { - return selected.reduce(function (arr_objects, id) { - arr_objects.push(getOneSelectedElement(id)); - return arr_objects - }, []); -} - -*/ - - -function getSelectedItems() { - var items = []; - - $('input.lfm-control-input').each(function () { - if($(this).prop('checked')){ - items.push(getOneSelectedElement($(this).parents('.file-item').data('id'))); } - }); - return items; -} -function hasSelectedItems() { - $('input.lfm-control-input').each(function () { - //console.log($(this).prop('checked')); - if($(this).prop('checked')){ - return true; - } - }); - return false; -} - -function getOneSelectedElement(orderOfItem) { - var index = orderOfItem !== undefined ? orderOfItem : lfm_selected[0]; - return lfm_items[index]; -} - -function toggleActions() { - - $('a[data-action=item_rename]').on('click', function () { - item = getOneSelectedElement($(this).parents('.file-item').data('id')); - rename(item); - }); - - $('a[data-action=item_move]').on('click', function (e) { - var items = []; - items.push(getOneSelectedElement($(this).parents('.file-item').data('id'))); - move(items); - }); - - $('a[data-action=item_color]').on('click', function (e) { - item = getOneSelectedElement($(this).parents('.file-item').data('id')); - colors(item); - }); - - $('a[data-action=item_crop]').on('click', function (e) { - item = getOneSelectedElement($(this).parents('.file-item').data('id')); - crop(item); - }); - - $('a[data-action=item_resize]').on('click', function (e) { - item = getOneSelectedElement($(this).parents('.file-item').data('id')); - resize(item); - }); - - $('a[data-action=item_trash]').on('click', function () { - var items = []; - items.push(getOneSelectedElement($(this).parents('.file-item').data('id'))); - trash(items); - }); - - $('a[data-action=item_download]').on('click', function () { - var items = []; - items.push(getOneSelectedElement($(this).parents('.file-item').data('id'))); - download(items); - }); - - - - $('a[data-action=selected_items_move]').on('click', function () { - var items = getSelectedItems(); - move(items); - }); - - $('a[data-action=selected_items_remove]').on('click', function () { - var items = getSelectedItems(); - trash(items); - }); - - $('a[data-action=selected_items_download]').on('click', function () { - var items = getSelectedItems(); - download(items); - }); - - - - - /* var one_selected = selected.length === 1; - var many_selected = selected.length >= 1; - var only_image = getSelectedItems() - - .filter(function (item) { return !item.is_image; }) - .length === 0; - var only_file = getSelectedItems() - .filter(function (item) { return !item.is_file; }) - .length === 0; - - $('[data-action=use]').toggleClass('d-none', !(many_selected && only_file)); - $('[data-action=rename]').toggleClass('d-none', !one_selected); - $('[data-action=preview]').toggleClass('d-none', !(many_selected && only_file)); - $('[data-action=move]').toggleClass('d-none', !many_selected); - $('[data-action=download]').toggleClass('d-none', !(many_selected && only_file)); - $('[data-action=resize]').toggleClass('d-none', !(one_selected && only_image)); - $('[data-action=crop]').toggleClass('d-none', !(one_selected && only_image)); - $('[data-action=trash]').toggleClass('d-none', !many_selected); - $('[data-action=open]').toggleClass('d-none', !one_selected || only_file); - $('#multi_selection_toggle').toggleClass('d-none', usingWysiwygEditor() || !many_selected); - $('#actions').toggleClass('d-none', selected.length === 0); - */ - -} - - - -// ====================== -// == Folder actions == -// ====================== - - - -function goTo(new_dir) { - if(!$('.dropdown-menu').hasClass('show')){ - $('#working_dir').val(new_dir); - loadItems(); - } -} - -function getPreviousDir() { - var working_dir = $('#working_dir').val(); - return working_dir.substring(0, working_dir.lastIndexOf('/')); -} - - -// ==================== -// == Ajax actions == -// ==================== - -function performLfmRequest(url, parameter, type) { - var data = defaultParameters(); - if (parameter != null) { - $.each(parameter, function (key, value) { - data[key] = value; + // Checkboxes + $('.file-manager-container').on('change', '.file-item-checkbox input', function() { + $(this).parents('.file-item')[this.checked ? 'addClass': 'removeClass']('selected border-primary'); }); - } - // console.log(lfm_route + '/' + url); - // console.log(type); - // console.log(data); - return $.ajax({ - type: 'GET', - beforeSend: function(request) { - var token = getUrlParam('token'); - if (token !== null) { - request.setRequestHeader("Authorization", 'Bearer ' + token); + + // Focus + $('.file-manager-container').on('focusin', '.file-item', function() { + $(this).addClass('focused'); + }); + + $('.file-manager-container').on('focusout', '.file-item', function() { + if ($('.file-item-actions.show').length) return; + $(this).removeClass('focused'); + }); + + $('.file-manager-container').on('hide.bs.dropdown', '.file-item-actions', function() { + if ($(this).parents('.file-item').find(':focus').length) return; + $(this).parents('.file-item').removeClass('focused'); + }); + + // Change view + + $('[name="file-manager-view"]').on('change', function() { + $('.file-manager-container') + .removeClass('file-manager-col-view file-manager-row-view') + .addClass(this.value); + }); + + }, + initDropzone : function(){ + _self = this; + + }, + setConfig : function(key, value) { + LFileManager.lfm_config[key] = value; + }, + getConfig : function(key) { + return this.lfm_config[key] + + }, + getSelectedItems : function() { + var _self = this; + var items = []; + $('input.lfm-control-input').each(function () { + if($(this).prop('checked')){ + items.push(_self.getOneSelectedElement($(this).parents('.file-item').data('id'))); } - }, - dataType: type || 'text', - url: lfm_route + '/' + url, - data: data, - cache: false - }).done(function (data) { - // console.log(data); - /* if(data !== "OK"){ + }); + return items; + }, + hasSelectedItems: function() { + $('input.lfm-control-input').each(function () { + if($(this).prop('checked')){ + return true; + } + }); + return false; + }, + getOneSelectedElement : function(orderOfItem) { + var index = orderOfItem !== undefined ? orderOfItem : this.lfm_selected[0]; + return this.lfm_items[index]; + }, + toggleActions : function() { + var _self = this; + $('a[data-action=item_rename]').on('click', function () { + item = _self.getOneSelectedElement($(this).parents('.file-item').data('id')); + _self.rename(item); + }); + $('a[data-action=item_move]').on('click', function (e) { + var items = []; + items.push(_self.getOneSelectedElement($(this).parents('.file-item').data('id'))); + _self.move(items); + }); + $('a[data-action=item_color]').on('click', function (e) { + item = _self.getOneSelectedElement($(this).parents('.file-item').data('id')); + _self.colors(item); + }); + $('a[data-action=item_crop]').on('click', function (e) { + item = _self.getOneSelectedElement($(this).parents('.file-item').data('id')); + _self.crop(item); + }); + $('a[data-action=item_resize]').on('click', function (e) { + item = _self.getOneSelectedElement($(this).parents('.file-item').data('id')); + _self.resize(item); + }); + $('a[data-action=item_trash]').on('click', function () { + var items = []; + items.push(_self.getOneSelectedElement($(this).parents('.file-item').data('id'))); + _self.trash(items); + }); + $('a[data-action=item_download]').on('click', function () { + var items = []; + items.push(_self.getOneSelectedElement($(this).parents('.file-item').data('id'))); + _self.download(items); + }); + $('a[data-action=selected_items_move]').on('click', function () { + var items = _self.getSelectedItems(); + _self.move(items); + }); + + $('a[data-action=selected_items_remove]').on('click', function () { + var items = _self.getSelectedItems(); + _self.trash(items); + }); + $('a[data-action=selected_items_download]').on('click', function () { + var items = _self.getSelectedItems(); + _self.download(items); + }); + }, + // ====================== + // == Folder actions == + // ====================== + + goTo : function(new_dir) { + var _self = this; + if(!$('.dropdown-menu').hasClass('show')){ + $('#working_dir').val(new_dir); + _self.loadItems(); + } + }, + getPreviousDir : function() { + var working_dir = $('#working_dir').val(); + if(!working_dir){ + working_dir = "/shares"; + } + return working_dir.substring(0, working_dir.lastIndexOf('/')); + }, + performLfmRequest : function(url, parameter, type) { + var _self = this; + var data = this.defaultParameters(); + if (parameter != null) { + $.each(parameter, function (key, value) { + data[key] = value; + }); + } + // console.log(lfm_route + '/' + url); + // console.log(type); + // console.log(data); + return $.ajax({ + type: 'GET', + beforeSend: function(request) { + var token = _self.getUrlParam('token'); + if (token !== null) { + request.setRequestHeader("Authorization", 'Bearer ' + token); + } + }, + dataType: type || 'text', + url: _self.lfm_route + '/' + url, + data: data, + cache: false + }).done(function (data) { + // console.log(data); + /* if(data !== "OK"){ + var response = JSON.parse(data); + console.log("done"); + console.log(response); + if(response.type === "error"){ + $.growl({ + title: "Error", + message: response.data, + location: 'tr' + }); + } + } + */ + + }).fail(function (jqXHR, textStatus, errorThrown) { + console.log(jqXHR); + console.log(textStatus); + console.log(errorThrown); + _self.displayErrorResponse(jqXHR); + _self.refreshFoldersAndItems(); + }); + }, + displayErrorResponse : function(jqXHR) { + this.notify('
    ' + jqXHR.responseText + '
    '); + }, + isJSON : function(text) { + if (typeof text!=="string"){ + return false; + } + try{ + JSON.parse(text); + return true; + } + catch (error){ + return false; + } + }, + refreshFoldersAndItems : function (data) { + var _self = LFileManager; + _self.loadItems(); + if(_self.isJSON(data)){ var response = JSON.parse(data); - console.log("done"); - console.log(response); + //console.log("done"); + //console.log(response); if(response.type === "error"){ $.growl({ title: "Error", @@ -318,558 +265,405 @@ function performLfmRequest(url, parameter, type) { location: 'tr' }); } - } - */ - - }).fail(function (jqXHR, textStatus, errorThrown) { - console.log(jqXHR); - console.log(textStatus); - console.log(errorThrown); - displayErrorResponse(jqXHR); - refreshFoldersAndItems(); - }); -} - -function displayErrorResponse(jqXHR) { - notify('
    ' + jqXHR.responseText + '
    '); -}; - -function isJSON(text) { - if (typeof text!=="string"){ - return false; - } - try{ - JSON.parse(text); - return true; - } - catch (error){ - return false; - } -} - -var refreshFoldersAndItems = function (data) { - loadItems(); - if(isJSON(data)){ - var response = JSON.parse(data); - //console.log("done"); - //console.log(response); - if(response.type === "error"){ - $.growl({ - title: "Error", - message: response.data, - location: 'tr' - }); - } - }else{ - if(data != 'OK') { - data = Array.isArray(data) ? data.join('
    ') : data; - notify(data); - } - - } -}; - -var hideNavAndShowEditor = function (data, callback = false) { - // $('#nav-buttons > ul').addClass('d-none'); - //console.log(data); - notify(data, callback); - -}; - -function loadItems() { - loading(true); - performLfmRequest('jsonitems', {show_list: lfm_show_list, sort_type: lfm_sort_type}, 'html') - .done(function (data) { - //console.log(data); - lfm_selected = []; - var response = JSON.parse(data); - var working_dir = response.working_dir; - lfm_items = response.items; - var hasItems = lfm_items.length !== 0; - $('#lfm_empty').toggleClass('d-none', hasItems); - //$(lfm_content).html(''); //.removeAttr('class'); - var toprev = $('
    '); - $(lfm_content).html('').append(toprev); - - if (hasItems) { - - $(lfm_content).addClass(response.display).addClass('preserve_actions_space'); - - lfm_items.forEach(function (item, index) { - var template = $('#lfm_item-template').clone() - .removeAttr('id').removeClass('d-none') - .attr('data-id', index) - //.click(toggleSelected) - .click(function (e) { - //console.log($(e.target)); - if(!$(e.target).hasClass('lfm-click-disable') && !$(e.target).hasClass('dropdown-item')){ - if (item.is_file) { - if($(e.target).hasClass('file-item-img') || $(e.target).hasClass('file-item-icon')){ - preview_item(item); - }else{ - if($(this).hasClass('file-item')){ - $(this).find('.lfm-control-input').click(); - } - - } - } else { - goTo(item.url); - } - } - if($(e.target).hasClass('lfm-control-input')){ - if(getSelectedItems().length > 0){ - if($('.media-multi-settings').hasClass('d-none')){ - $('.media-multi-settings').removeClass('d-none'); - } - }else{ - if(!$('.media-multi-settings').hasClass('d-none')){ - $('.media-multi-settings').addClass('d-none'); - } - } - } - - }); - if (item.thumb_url) { - var image = $('
    ').addClass('file-item-img').css('background-image', 'url("' + item.thumb_url + '?timestamp=' + item.time + '")'); - var dot = $('').addClass('badge badge-dot badge-default indicator').css({"background-color":item.color}); - } else { - var image = $('
    ').addClass('file-item-icon fa ' + item.icon).css({"color":item.color}); - var dot = $('').addClass('badge badge-dot badge-default indicator').css({"background-color":item.color}); - - - } - - if(!item.is_image){ //no image - template.find('.link-item-crop').remove(); - template.find('.link-item-resize').remove(); - }else{ - // template.find('.link-item-color').remove(); - } - - if(!item.is_file){ //dirs - template.find('.link-item-download').remove(); - } - - template.find('.file-item-name').before(image); - template.find('.file-item-name').text(item.name); - template.find('.file-item-name').append(dot); - var str = ""; - if(item.dimension){ - str += item.dimension + " | " - } - if(item.size){ - str += item.size + " | " - } - str += (new Date(item.time * 1000)).toLocaleString(); - template.find('.file-item-changed').text(str); - $(lfm_content).append(template); - }); + }else{ + if(data !== 'OK') { + data = Array.isArray(data) ? data.join('
    ') : data; + _self.notify(data); } - //$('#nav-buttons > ul').removeClass('d-none'); + } + }, + hideNavAndShowEditor : function (data, callback = false) { + _self = LFileManager; + // $('#nav-buttons > ul').addClass('d-none'); + //console.log(data); + _self.notify(data, callback); - $('#working_dir').val(working_dir); - // console.log('Current working_dir : ' + working_dir); - var breadcrumbs = []; - var validSegments = working_dir.split('/').filter(function (e) { return e; }); - validSegments.forEach(function (segment, index) { - if (index === 0) { - // set root folder name as the first breadcrumb - breadcrumbs.push("Medien"); - //breadcrumbs.push($("[data-path='/" + segment + "']").text()); - } else { - breadcrumbs.push(segment); - } - }); + }, + loadItems : function() { + var _self = this; + this.loading(true); + this.performLfmRequest('jsonitems', {show_list: this.lfm_show_list, sort_type: this.lfm_sort_type}, 'html') + .done(function (data) { + //console.log(data); + _self.lfm_selected = []; + var response = JSON.parse(data); + var working_dir = response.working_dir; + _self.lfm_items = response.items; + var hasItems = _self.lfm_items.length !== 0; + $('#lfm_empty').toggleClass('d-none', hasItems); + //$(lfm_content).html(''); //.removeAttr('class'); + var to_prev = $(''); + $(_self.lfm_content).html('').append(to_prev); - $('#current_folder').text(breadcrumbs[breadcrumbs.length - 1]); - $('#lfm_breadcrumbs > ol').html(''); - breadcrumbs.forEach(function (breadcrumb, index) { - var li = $('
  • ').addClass('breadcrumb-item').text(breadcrumb); + if (hasItems) { - if (index === breadcrumbs.length - 1) { - li.addClass('active').attr('aria-current', 'page'); - } else { - li.click(function () { - // go to corresponding path - goTo('/' + validSegments.slice(0, 1 + index).join('/')); + $(_self.lfm_content).addClass(response.display).addClass('preserve_actions_space'); + + _self.lfm_items.forEach(function (item, index) { + var template = $('#lfm_item-template').clone() + .removeAttr('id').removeClass('d-none') + .attr('data-id', index) + //.click(toggleSelected) + .click(function (e) { + //console.log($(e.target)); + if(!$(e.target).hasClass('lfm-click-disable') && !$(e.target).hasClass('dropdown-item')){ + if (item.is_file) { + if($(e.target).hasClass('file-item-img') || $(e.target).hasClass('file-item-icon')){ + _self.preview_item(item); + }else{ + if($(this).hasClass('file-item')){ + $(this).find('.lfm-control-input').click(); + } + } + } else { + _self.goTo(item.url); + } + } + if($(e.target).hasClass('lfm-control-input')){ + if(_self.getSelectedItems().length > 0){ + if($('.media-multi-settings').hasClass('d-none')){ + $('.media-multi-settings').removeClass('d-none'); + } + }else{ + if(!$('.media-multi-settings').hasClass('d-none')){ + $('.media-multi-settings').addClass('d-none'); + } + } + } + + }); + if (item.thumb_url) { + var image = $('
    ').addClass('file-item-img').css('background-image', 'url("' + item.thumb_url + '?timestamp=' + item.time + '")'); + var dot = $('').addClass('badge badge-dot badge-default indicator_before').css({"background-color":item.color}); + } else { + var image = $('
    ').addClass('file-item-icon fa ' + item.icon).css({"color":item.color}); + var dot = $('').addClass('badge badge-dot badge-default indicator_before').css({"background-color":item.color}); + + + } + + if(!item.is_image){ //no image + template.find('.link-item-crop').remove(); + template.find('.link-item-resize').remove(); + }else{ + // template.find('.link-item-color').remove(); + } + + if(!item.is_file){ //dirs + template.find('.link-item-download').remove(); + } + + template.find('.file-item-name').before(image); + + var item_name = $('').addClass('file-item-name-insert').html(item.name); + template.find('.file-item-name').html(item_name); + template.find('.file-item-name-insert').before(dot); + + var str = ""; + if(item.dimension){ + str += item.dimension + " | " + } + if(item.size){ + str += item.size + " | " + } + str += (new Date(item.time * 1000)).toLocaleString(); + template.find('.file-item-changed').text(str); + $(_self.lfm_content).append(template); }); } - $('#lfm_breadcrumbs > ol').append(li); + //$('#nav-buttons > ul').removeClass('d-none'); + + $('#working_dir').val(working_dir); + // console.log('Current working_dir : ' + working_dir); + var breadcrumbs = []; + var validSegments = working_dir.split('/').filter(function (e) { return e; }); + validSegments.forEach(function (segment, index) { + if (index === 0) { + // set root folder name as the first breadcrumb + breadcrumbs.push("Medien"); + //breadcrumbs.push($("[data-path='/" + segment + "']").text()); + } else { + breadcrumbs.push(segment); + } + }); + + $('#current_folder').text(breadcrumbs[breadcrumbs.length - 1]); + $('#lfm_breadcrumbs > ol').html(''); + breadcrumbs.forEach(function (breadcrumb, index) { + var li = $('
  • ').addClass('breadcrumb-item').text(breadcrumb); + + if (index === breadcrumbs.length - 1) { + li.addClass('active').attr('aria-current', 'page'); + } else { + li.click(function () { + // go to corresponding path + _self.goTo('/' + validSegments.slice(0, 1 + index).join('/')); + }); + } + + $('#lfm_breadcrumbs > ol').append(li); + }); + var atRootFolder = _self.getPreviousDir() === ''; + $('#to-previous').toggleClass('d-none', atRootFolder); + $('#to-previous').click(function () { + var previous_dir = _self.getPreviousDir(); + if (previous_dir === '') return; + _self.goTo(previous_dir); + }); + + _self.loading(false); + _self.toggleActions(); }); - var atRootFolder = getPreviousDir() == ''; - $('#to-previous').toggleClass('d-none', atRootFolder); - $('#to-previous').click(function () { - var previous_dir = getPreviousDir(); - if (previous_dir == '') return; - goTo(previous_dir); - }); - - loading(false); - toggleActions(); - }); -} - -function loading(show_loading) { - $('#lfm_loading').toggleClass('d-none', !show_loading); -} - -function createFolder(folder_name) { - performLfmRequest('newfolder', {name: folder_name}) - .done(refreshFoldersAndItems); -} - - -// ================================== -// == File Actions == -// ================================== - -function rename(item) { - dialog(lang['message-rename'], item.name, function (new_name) { - performLfmRequest('rename', { - file: item.name, - new_name: new_name - }).done(refreshFoldersAndItems); - }); -} - -function colors(item) { - performLfmRequest('colorhue', {color: item.color}) - .done(function (data) { - hideNavAndShowEditor(data, function () { - performLfmRequest('docolorhue', { - file: item.name, - new_color: $('#notify').find('input').val(), - }).done(refreshFoldersAndItems); - }); - }); -} - -function trash(items) { - notify(lang['message-delete'], function () { - var d = performLfmRequest('delete', { - items: items.map(function (item) { return item.name; }) - }).done(refreshFoldersAndItems); - // console.log(d); - - }); -} - -function crop(item) { - performLfmRequest('crop', {img: item.name}) - .done(hideNavAndShowEditor); -} - -function resize(item) { - performLfmRequest('resize', {img: item.name}) - .done(hideNavAndShowEditor); -} - -function move(items) { - performLfmRequest('move', { items: items.map(function (item) { return item.name; }) }) - .done(refreshFoldersAndItems); -} - - - -function download(items) { - items.forEach(function (item, index) { - var data = defaultParameters(); - - data['file'] = item.name; - - var token = getUrlParam('token'); - if (token) { - data['token'] = token; - } - - setTimeout(function () { - location.href = lfm_route + '/download?' + $.param(data); - }, index * 100); - }); -} - -function open(item) { - goTo(item.url); -} - -function preview_item(item) { - //var items = []; - //items.push(item); - preview(item); -} - -function preview(item) { - var media = $('#previewTemplate').clone().attr('id', 'previewMedia').removeClass('d-none'); - var item_content_id = ""; - if(item.icon == "fa-image" || item.icon == "fa-file-pdf"){ - media.find('.media-preview').attr('src', item.url + '?timestamp=' + item.time).removeClass('d-none'); - }else if(item.icon == "fab fa-youtube-square"){ - media.find('.embed-responsive-item').attr('src', 'https://www.youtube.com/embed/' +item.content.id + '?rel=0'); - media.find('.embed-responsive').removeClass('d-none'); - item_content_id = item.content.id; - - - }else{ - var icon = $('
    ').addClass('file-item-icon fa ' + item.icon).css('color', item.color); - media.find('.file-manager-col-view').html(icon).removeClass('d-none'); - } - - - if(item.content){ - media.find('.media-content-title').val(item.content.title); - media.find('.media-content-description').val(item.content.description); - } - media.find('.media-content-title').parent().removeClass('d-none'); - media.find('.media-content-description').parent().removeClass('d-none'); - - media.find('.media-name').html(item.name); - media.find('.media-url').val(item.url); - media.find('.media-download').attr('target', '_blank').attr('href', item.url); - - - callback = function () { - performLfmRequest('file-content', { - file: item.name, - content_id: item_content_id, - content_title: media.find('.media-content-title').val(), - content_description: media.find('.media-content-description').val(), - }).done(refreshFoldersAndItems); - }; - /* if (item.thumb_url) { - media.find('.carousel-image').css('background-image', 'url(\'' + item.url + '?timestamp=' + item.time + '\')'); - } else { - media.find('.carousel-image').css('width', '50vh').append($('
    ').addClass('mime-icon ico-' + item.icon)); - } - - media.find('.carousel-label') - - .append($('')); -*/ - - notify(media, callback); -} - -/*function preview(items) { - var carousel = $('#carouselTemplate').clone().attr('id', 'previewCarousel').removeClass('d-none'); - var imageTemplate = carousel.find('.carousel-item').clone().removeClass('active'); - var indicatorTemplate = carousel.find('.carousel-indicators > li').clone().removeClass('active'); - carousel.children('.carousel-inner').html(''); - carousel.children('.carousel-indicators').html(''); - carousel.children('.carousel-indicators,.carousel-control-prev,.carousel-control-next').toggle(items.length > 1); - - items.forEach(function (item, index) { - var carouselItem = imageTemplate.clone() - .addClass(index === 0 ? 'active' : ''); - - if (item.thumb_url) { - carouselItem.find('.carousel-image').css('background-image', 'url(\'' + item.url + '?timestamp=' + item.time + '\')'); - } else { - carouselItem.find('.carousel-image').css('width', '50vh').append($('
    ').addClass('mime-icon ico-' + item.icon)); - } - - carouselItem.find('.carousel-label').attr('target', '_blank').attr('href', item.url) - .append(item.name) - .append($('')); - - carousel.children('.carousel-inner').append(carouselItem); - - var carouselIndicator = indicatorTemplate.clone() - .addClass(index === 0 ? 'active' : '') - .attr('data-slide-to', index); - carousel.children('.carousel-indicators').append(carouselIndicator); - }); - - - // carousel swipe control - var touchStartX = null; - - carousel.on('touchstart', function (event) { - var e = event.originalEvent; - if (e.touches.length == 1) { - var touch = e.touches[0]; - touchStartX = touch.pageX; - } - }).on('touchmove', function (event) { - var e = event.originalEvent; - if (touchStartX != null) { - var touchCurrentX = e.changedTouches[0].pageX; - if ((touchCurrentX - touchStartX) > 60) { - touchStartX = null; - carousel.carousel('prev'); - } else if ((touchStartX - touchCurrentX) > 60) { - touchStartX = null; - carousel.carousel('next'); + }, + loading : function(show_loading) { + $('#lfm_loading').toggleClass('d-none', !show_loading); + if(!show_loading){ + if(!$('.media-multi-settings').hasClass('d-none')){ + $('.media-multi-settings').addClass('d-none'); } } - }).on('touchend', function () { - touchStartX = null; - }); - // end carousel swipe control + }, - notify(carousel); -}*/ + createFolder : function(folder_name) { + var _self = LFileManager; + _self.performLfmRequest('newfolder', {name: folder_name}) + .done(_self.refreshFoldersAndItems); + }, + // ================================== + // == File Actions == + // ================================== -/* -function use(items) { - function useTinymce3(url) { - if (!usingTinymce3()) { return; } + rename : function(item) { + var _self = this; + _self.dialog(_self.lfm_config['lfm_lang']['message-rename'], item.name, function (new_name) { + _self.performLfmRequest('rename', { + file: item.name, + new_name: new_name + }).done(_self.refreshFoldersAndItems); + }); + }, + colors : function(item) { + var _self = this; + _self.performLfmRequest('colorhue', {color: item.color}) + .done(function (data) { + _self.hideNavAndShowEditor(data, function () { + _self.performLfmRequest('docolorhue', { + file: item.name, + new_color: $('#notify').find('input').val(), + }).done(_self.refreshFoldersAndItems); + }); + }); + }, + trash : function(items) { + var _self = this; + _self.notify(_self.lfm_config['lfm_lang']['message-delete'], function () { + var d = _self.performLfmRequest('delete', { + items: items.map(function (item) { return item.name; }) + }).done(_self.refreshFoldersAndItems); + // console.log(d); + }); + }, + crop : function(item) { + var _self = this; + _self.performLfmRequest('crop', {img: item.name}) + .done(_self.hideNavAndShowEditor); + }, + resize : function(item) { + var _self = this; + _self.performLfmRequest('resize', {img: item.name}) + .done(_self.hideNavAndShowEditor); + }, + move : function(items) { + var _self = this; + _self.performLfmRequest('move', { items: items.map(function (item) { return item.name; }) }) + .done(_self.refreshFoldersAndItems); + }, + download : function(items) { + var _self = this; + items.forEach(function (item, index) { + var data = _self.defaultParameters(); - var win = tinyMCEPopup.getWindowArg("window"); - win.document.getElementById(tinyMCEPopup.getWindowArg("input")).value = url; - if (typeof(win.ImageDialog) != "undefined") { - // Update image dimensions - if (win.ImageDialog.getImageData) { - win.ImageDialog.getImageData(); - } + data['file'] = item.name; - // Preview if necessary - if (win.ImageDialog.showPreviewImage) { - win.ImageDialog.showPreviewImage(url); - } - } - tinyMCEPopup.close(); - } + var token = _self.getUrlParam('token'); + if (token) { + data['token'] = token; + } + setTimeout(function () { + location.href = lfm_route + '/download?' + $.param(data); + }, index * 100); + }); + }, + open : function(item) { + this.goTo(item.url); + }, + preview_item : function(item) { + //var items = []; + //items.push(item); + this.preview(item); + }, + preview : function(item) { + var _self = this; + var media = $('#previewTemplate').clone().attr('id', 'previewMedia').removeClass('d-none'); + var item_content_id = ""; - function useTinymce4AndColorbox(url) { - if (!usingTinymce4AndColorbox()) { return; } - - parent.document.getElementById(getUrlParam('field_name')).value = url; - - if(typeof parent.tinyMCE !== "undefined") { - parent.tinyMCE.activeEditor.windowManager.close(); - } - if(typeof parent.$.fn.colorbox !== "undefined") { - parent.$.fn.colorbox.close(); - } - } - - function useCkeditor3(url) { - if (!usingCkeditor3()) { return; } - - if (window.opener) { - // Popup - window.opener.CKEDITOR.tools.callFunction(getUrlParam('CKEditorFuncNum'), url); - } else { - // Modal (in iframe) - parent.CKEDITOR.tools.callFunction(getUrlParam('CKEditorFuncNum'), url); - parent.CKEDITOR.tools.callFunction(getUrlParam('CKEditorCleanUpFuncNum')); - } - } - - function useFckeditor2(url) { - if (!usingFckeditor2()) { return; } - - var p = url; - var w = data['Properties']['Width']; - var h = data['Properties']['Height']; - window.opener.SetUrl(p,w,h); - } - - var url = items[0].url; - var callback = getUrlParam('callback'); - var useFileSucceeded = true; - - if (usingWysiwygEditor()) { - useTinymce3(url); - - useTinymce4AndColorbox(url); - - useCkeditor3(url); - - useFckeditor2(url); - } else if (callback && window[callback]) { - window[callback](getSelectedItems()); - } else if (callback && parent[callback]) { - parent[callback](getSelecteditems()); - } else if (window.opener) { // standalone button or other situations - window.opener.SetUrl(getSelectedItems()); - } else { - useFileSucceeded = false; - } - - if (useFileSucceeded) { - if (window.opener) { - window.close(); - } - } else { - console.log('window.opener not found'); - // No editor found, open/download file using browser's default method - window.open(url); - } -} -//end useFile - -// ================================== -// == WYSIWYG Editors Check == -// ================================== - -function usingTinymce3() { - return !!window.tinyMCEPopup; -} - -function usingTinymce4AndColorbox() { - return !!getUrlParam('field_name'); -} - -function usingCkeditor3() { - return !!getUrlParam('CKEditor') || !!getUrlParam('CKEditorCleanUpFuncNum'); -} - -function usingFckeditor2() { - return window.opener && typeof data != 'undefined' && data['Properties']['Width'] != ''; -} - -function usingWysiwygEditor() { - return usingTinymce3() || usingTinymce4AndColorbox() || usingCkeditor3() || usingFckeditor2(); -} -*/ -// ================================== -// == Others == -// ================================== - -function getUrlParam(paramName) { - var reParam = new RegExp('(?:[\?&]|&)' + paramName + '=([^&]+)', 'i'); - var match = window.location.search.match(reParam); - return ( match && match.length > 1 ) ? match[1] : null; -} - -function defaultParameters() { - return { - working_dir: $('#working_dir').val(), - type: $('#type').val() - }; -} - -function notImp() { - notify('Not yet implemented!'); -} - -function notify(body, callback) { - - $('#notify').find('.btn-primary').toggle(callback !== undefined); - if(callback !== 'success'){ - $('#notify').find('.btn-primary').unbind().click(callback); - }else{ - $('#notify').find('.btn-primary').unbind(); - } - $('#notify').modal('show').find('.modal-body').html(body); -} - -function dialog(title, value, callback) { - $('#dialog').find('input').val(value); - $('#dialog').on('shown.bs.modal', function () { - $('#dialog').find('input').focus(); - }); - $('#dialog').find('.btn-primary').unbind('click').click(function (e) { - callback($('#dialog').find('input').val()); - }); - $('#dialog').find('input').unbind('keypress.key13').bind('keypress.key13', function (e) { - if (e.which === 13) { - $('#dialog').find('.btn-primary').click(); + if(item.icon === "fa-image" || item.icon === "fa-file-pdf"){ + media.find('.media-preview').attr('src', item.url + '?timestamp=' + item.time).removeClass('d-none'); + }else if(item.icon === "fab fa-youtube-square"){ + media.find('.embed-responsive-item').attr('src', 'https://www.youtube.com/embed/' +item.content.id + '?rel=0'); + media.find('.embed-responsive').removeClass('d-none'); + item_content_id = item.content.id; + }else{ + var icon = $('
    ').addClass('file-item-icon fa ' + item.icon).css('color', item.color); + media.find('.file-manager-col-view').html(icon).removeClass('d-none'); } - }); - $('#dialog').modal('show').find('.modal-title').text(title); -} \ No newline at end of file + + if(item.content) { + media.find('.media-content-title').val(item.content.title); + if(item.is_image){ + media.find('.media-content-author').val(item.content.author); + }else{ + media.find('.media-content-description').val(item.content.description); + } + + + } + media.find('.media-content-title').parent().removeClass('d-none'); + if(item.is_image) { + media.find('.media-content-author').parent().removeClass('d-none'); + }else{ + media.find('.media-content-description').parent().removeClass('d-none'); + } + + media.find('.media-name').html(item.name); + media.find('.media-url').val(item.url); + media.find('.media-download').attr('target', '_blank').attr('href', item.url); + + var callback = function () { + _self.performLfmRequest('file-content', { + file: item.name, + content_id: item_content_id, + content_title: media.find('.media-content-title').val(), + content_description: media.find('.media-content-description').val(), + content_author: media.find('.media-content-author').val(), + }).done(_self.refreshFoldersAndItems); + }; + _self.notify(media, callback); + }, + getUrlParam : function(paramName) { + var reParam = new RegExp('(?:[\?&]|&)' + paramName + '=([^&]+)', 'i'); + var match = window.location.search.match(reParam); + return ( match && match.length > 1 ) ? match[1] : null; + }, + defaultParameters : function() { + return { + working_dir: $('#working_dir').val(), + type: $('#type').val() + }; + }, + insertHTML : function(item){ + var title = ''; + if(item.content !== null && item.content.title){ + title = item.content.title; + } + var description = ''; + if(item.content !== null && item.content.description){ + description = ' ' + item.content.description; + } + var author_name; + if(item.content !== null && item.content.author_name){ + author_name = ' Bildquelle: ' + item.content.author_name; + } + var insert = ''; + + if(item.is_file && item.is_image){ + + insert += '
    '+ + ''+ + ''+title+'' + + ''+ + '
    \n' + + '

    ' + title + '

    \n' + + '
    \n' + + '
    '; + console.log(insert); + return insert; + } + if(item.icon === "fab fa-youtube-square"){ + + insert += '
    '+ + '
    '+ + ''+ + '
    '+ + '
    \n' + + '

    ' + title + '

    \n' + + '
    \n' + + '
    '; + return insert; + } + if(item.is_file){ + insert += ''+item.name+''; + if(description !== ''){ + insert += '

    '+description+'

    '; + } + return insert; + } + + return false; + }, + notImp : function() { + this.notify('Not yet implemented!'); + }, + notify : function(body, callback) { + + $('#notify').find('.btn-primary').toggle(callback !== undefined); + if(callback !== 'success'){ + $('#notify').find('.btn-primary').unbind().click(callback); + }else{ + $('#notify').find('.btn-primary').unbind(); + } + $('#notify').modal('show').find('.modal-body').html(body); + }, + dialog : function(title, value, callback) { + $('#dialog').find('input').val(value); + $('#dialog').on('shown.bs.modal', function () { + $('#dialog').find('input').focus(); + }); + $('#dialog').find('.btn-primary').unbind('click').click(function (e) { + callback($('#dialog').find('input').val()); + }); + $('#dialog').find('input').unbind('keypress.key13').bind('keypress.key13', function (e) { + if (e.which === 13) { + $('#dialog').find('.btn-primary').click(); + } + }); + $('#dialog').modal('show').find('.modal-title').text(title); + }, + +}; + + + +$(document).ready(function () { + LFileManager.initFileManager(); +}); + + + + + + + + + + + +// ==================== +// == Ajax actions == +// ==================== + + + diff --git a/public/js/pages_file-manager.js b/public/js/pages_file-manager.js index a2a2585..8b13789 100644 --- a/public/js/pages_file-manager.js +++ b/public/js/pages_file-manager.js @@ -1,33 +1 @@ -$(function() { - // Checkboxes - - $('.file-manager-container').on('change', '.file-item-checkbox input', function() { - $(this).parents('.file-item')[this.checked ? 'addClass': 'removeClass']('selected border-primary'); - }); - - // Focus - - $('.file-manager-container').on('focusin', '.file-item', function() { - $(this).addClass('focused'); - }); - - $('.file-manager-container').on('focusout', '.file-item', function() { - if ($('.file-item-actions.show').length) return; - $(this).removeClass('focused'); - }); - - $('.file-manager-container').on('hide.bs.dropdown', '.file-item-actions', function() { - if ($(this).parents('.file-item').find(':focus').length) return; - $(this).parents('.file-item').removeClass('focused'); - }); - - // Change view - - $('[name="file-manager-view"]').on('change', function() { - $('.file-manager-container') - .removeClass('file-manager-col-view file-manager-row-view') - .addClass(this.value); - }); - -}); diff --git a/public/js/summernote-image-title.js b/public/js/summernote-image-title.js new file mode 100644 index 0000000..f3ea540 --- /dev/null +++ b/public/js/summernote-image-title.js @@ -0,0 +1,171 @@ +(function (factory) { + /* global define */ + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['jquery'], factory); + } else if (typeof module === 'object' && module.exports) { + // Node/CommonJS + module.exports = factory(require('jquery')); + } else { + // Browser globals + factory(window.jQuery); + } +}(function ($) { + $.extend(true, $.summernote.lang, { + 'en-US': { + imageTitle: { + edit: 'Edit title', + titleLabel: 'Title', + altLabel: 'Alternative Text' + } + }, + 'de-DE': { + imageTitle: { + edit: 'Titel bearbeiten', + titleLabel: 'Titel | weiterführende Infos nicht für SEO', + altLabel: 'ALT-Tag | beschreibt das Bild' + } + }, + }); + + $.extend($.summernote.plugins, { + 'imageTitle': function (context) { + var self = this; + + var ui = $.summernote.ui; + var $note = context.layoutInfo.note; + var $editor = context.layoutInfo.editor; + var $editable = context.layoutInfo.editable; + + if (typeof context.options.imageTitle === 'undefined') { + context.options.imageTitle = {}; + } + + if (typeof context.options.imageTitle.specificAltField === 'undefined') { + context.options.imageTitle.specificAltField = false; + } + + var options = context.options; + var lang = options.langInfo; + + context.memo('button.imageTitle', function () { + var button = ui.button({ + contents: ui.icon(options.icons.pencil), + tooltip: lang.imageTitle.edit, + container: false, + click: function (e) { + context.invoke('imageTitle.show'); + } + }); + + return button.render(); + }); + + this.initialize = function () { + var $container = options.dialogsInBody ? $(document.body) : $editor; + + var body = '
    ' + + '' + + '' + + '
    '; + + if (options.imageTitle.specificAltField) { + body += '
    ' + + '' + + '' + + '
    '; + } + + var footer = ''; + + this.$dialog = ui.dialog({ + title: lang.imageTitle.edit, + body: body, + footer: footer + }).render().appendTo($container); + }; + + this.destroy = function () { + ui.hideDialog(this.$dialog); + this.$dialog.remove(); + }; + + this.bindEnterKey = function ($input, $btn) { + $input.on('keypress', function (event) { + if (event.keyCode === 13) { + $btn.trigger('click'); + } + }); + }; + + this.show = function () { + var $img = $($editable.data('target')); + var imgInfo = { + imgDom: $img, + title: $img.attr('title'), + alt: $img.attr('alt'), + }; + this.showLinkDialog(imgInfo).then(function (imgInfo) { + ui.hideDialog(self.$dialog); + var $img = imgInfo.imgDom; + + if (imgInfo.alt) { + $img.attr('alt', imgInfo.alt); + } + else { + $img.removeAttr('alt'); + } + + if (imgInfo.title) { + $img.attr('title', imgInfo.title); + } + else { + $img.removeAttr('title'); + } + + $note.val(context.invoke('code')); + $note.change(); + }); + }; + + this.showLinkDialog = function (imgInfo) { + return $.Deferred(function (deferred) { + var $imageTitle = self.$dialog.find('.note-image-title-text'), + $imageAlt = (options.imageTitle.specificAltField) ? self.$dialog.find('.note-image-alt-text') : null, + $editBtn = self.$dialog.find('.note-image-title-btn'); + + ui.onDialogShown(self.$dialog, function () { + context.triggerEvent('dialog.shown'); + + $editBtn.click(function (event) { + event.preventDefault(); + deferred.resolve({ + imgDom: imgInfo.imgDom, + title: $imageTitle.val(), + alt: (options.imageTitle.specificAltField) ? $imageAlt.val() : $imageTitle.val(), + }); + }); + + $imageTitle.val(imgInfo.title).trigger('focus'); + self.bindEnterKey($imageTitle, $editBtn); + + if (options.imageTitle.specificAltField) { + $imageAlt.val(imgInfo.alt); + self.bindEnterKey($imageAlt, $editBtn); + } + }); + + ui.onDialogHidden(self.$dialog, function () { + $editBtn.off('click'); + + if (deferred.state() === 'pending') { + deferred.reject(); + } + }); + + ui.showDialog(self.$dialog); + }); + }; + } + }); +})); diff --git a/public/js/summernote-iq-content-extension.js b/public/js/summernote-iq-content-extension.js new file mode 100644 index 0000000..cbcc892 --- /dev/null +++ b/public/js/summernote-iq-content-extension.js @@ -0,0 +1,202 @@ +(function(factory) +{ + /* global define */ + if (typeof define === 'function' && define.amd) + { + // AMD. Register as an anonymous module. + define(['jquery'], factory); + } + else if (typeof module === 'object' && module.exports) + { + // Node/CommonJS + module.exports = factory(require('jquery')); + } + else + { + // Browser globals + factory(window.jQuery); + } +}(function($) +{ + + // Extends plugins for adding gallery. + // - plugin is external module for customizing. + $.extend($.summernote.plugins, + { + /** + * @param {Object} context - context object has status of editor. + */ + 'gallery': function(context) + { + var self = this; + + // ui has renders to build ui elements. + // - you can create a button with `ui.button` + var ui = $.summernote.ui; + + // add gallery button + context.memo('button.gallery', function() + { + // create button + var button = ui.button( + { + contents: '', + tooltip: 'Medien', + click: function() + { + self.fillModal(); + self.$modal.modal(); + } + }); + + // create jQuery object from button instance. + $gallery = button.render(); + return $gallery; + }); + + // This events will be attached when editor is initialized. + this.events = { + // This will be called after modules are initialized. + 'summernote.init': function(we, e) + { + self.editable = context.layoutInfo.editable; //contentEditable element + self.editor = this; + // get summernote onInit set parameters + self.image_dialog_images_url = $(this).data('image_dialog_images_url'); + self.image_dialog_images_html = $(this).data('image_dialog_images_html'); + self.image_dialog_title = $(this).data('image_dialog_title'); + self.image_dialog_close_btn_text = $(this).data('image_dialog_close_btn_text'); + self.image_dialog_ok_btn_text = $(this).data('image_dialog_ok_btn_text'); + + self.fillModal = function() + { + //fill modal with images whether from url or given html + if (typeof self.image_dialog_images_html !== "undefined") + { + self.setModalHtml(self.image_dialog_images_html) + self.setEvents(); + } + else if (typeof self.image_dialog_images_url !== "undefined") + { + var next = self.setEvents; + self.getImagesFromUrl(next); + } + else + { + console.error("options image_dialog_images_html or image_dialog_images_url must be set"); + } + + }; + self.setModalHtml = function(html) + { // set variabl parts to modal html + var title = self.image_dialog_title; + var close = self.image_dialog_close_btn_text; + var ok = self.image_dialog_ok_btn_text; + + if (self.image_dialog_title !== "undefined") self.$modal.find('.modal-title').html(title); + if (self.image_dialog_close_btn_text !== "undefined") self.$modal.find('#modal_iq_close').html(close); + if (self.image_dialog_ok_btn_text !== "undefined") self.$modal.find('#modal_iq_save').html(ok); + + self.$modal.find('.modal-body').html(html); + LFileManager.initFileManager(true); + + }; + self.getImagesFromUrl = function(callback) + { + // get images html from url + $.get(self.image_dialog_images_url, function(html) + { + self.setModalHtml(html); + callback(); + + }).fail(function() + { + console.error("error loading from "+self.image_dialog_images_url); + }) + }; + self.setEvents = function() + { + // images click event to select image + /*self.$modal.find('img').click(function(event) + { + // $(this).toggleClass(self.select_class); + });*/ + }; + // set the focus to the last focused element in the editor + self.recoverEditorFocus = function () + { + var last_focused_el = $(self.editor).data('last_focused_element'); + if(typeof last_focused_el !== "undefined") + { + var editor = self.editable; + var range = document.createRange(); + var sel = window.getSelection(); + var cursor_position = last_focused_el.length; + + range.setStart(last_focused_el, cursor_position); + range.collapse(true); + sel.removeAllRanges(); + sel.addRange(range); + editor.focus(); + } + }; + self.saveLastFocusedElement = function() + { + var focused_element = window.getSelection().focusNode; + var parent = $(self.editable).get(0); + if ($.contains(parent, focused_element)) + { + $(self.editor).data('last_focused_element', focused_element) + }; + }; + self.editorEvents = function () { + $(self.editable).on('keypress, mousemove', function() + { + self.saveLastFocusedElement(); + }) + }; + self.editorEvents(); + self.fillModal(); + }, + // This will be called when user releases a key on editable. + 'summernote.keyup': function(we, e) + { + self.saveLastFocusedElement(); + } + }; + + // This method will be called when editor is initialized by $('..').summernote(); + // You can create elements for plugin + this.initialize = function() + { + var $modal = this.$modal = $('#modal_iq_assets').hide(); + // add selected images to summernote editor + $modal.find("button#modal_iq_save").click(function(event) + { + var items = LFileManager.getSelectedItems(); + + $modal.modal('hide'); + + self.recoverEditorFocus(); + + items.forEach(function (item, index) { + var insert = LFileManager.insertHTML(item); + if(insert){ + context.invoke('editor.pasteHTML', insert); + } + }); + }); + + }; + + // This methods will be called when editor is destroyed by $('..').summernote('destroy'); + // You should remove elements on `initialize`. + this.destroy = function() + { + console.log("destroy"); + // this.$panel.remove(); + // this.$panel = null; + }; + } + }); +})); diff --git a/resources/views/asset/js.blade.php b/resources/views/asset/js.blade.php new file mode 100644 index 0000000..92fa98c --- /dev/null +++ b/resources/views/asset/js.blade.php @@ -0,0 +1,7 @@ + diff --git a/resources/views/cms/content/author/index.blade.php b/resources/views/cms/content/author/index.blade.php new file mode 100755 index 0000000..47d6d2c --- /dev/null +++ b/resources/views/cms/content/author/index.blade.php @@ -0,0 +1,135 @@ +@extends('layouts.layout-2') + +@section('content') + +

    + {{ __('Authoren') }} +

    + + @if ($errors->any()) +
    +
    +
    +
      + @foreach ($errors->all() as $error) +
    • {{ $error }}
    • + @endforeach +
    +
    +
    +
    + @endif + +
    +
    +
    + +
    + + + + + + + + + + + @foreach($contents as $value) + + + + + + + @endforeach + +
     {{__('Name')}}
    + + {{ $value->name }}
    +
    + +
    +
    + +
    + + + + + + +@endsection \ No newline at end of file diff --git a/resources/views/cms/content/author/modal.blade.php b/resources/views/cms/content/author/modal.blade.php new file mode 100755 index 0000000..b00ed7e --- /dev/null +++ b/resources/views/cms/content/author/modal.blade.php @@ -0,0 +1,29 @@ + +{!! Form::open(['url' => route('cms_content_author_store'), 'class' => 'modal-content']) !!} + + + + + + + +{!! Form::close() !!} diff --git a/resources/views/cms/travel_guide/detail.blade.php b/resources/views/cms/travel_guide/detail.blade.php index 5e37b11..d7ca4ec 100755 --- a/resources/views/cms/travel_guide/detail.blade.php +++ b/resources/views/cms/travel_guide/detail.blade.php @@ -20,7 +20,6 @@
    @endif - {!! Form::open(['url' => route('cms_travel_guide_detail', [$id]), 'class' => 'form-horizontal']) !!}

    @@ -62,7 +61,7 @@ {{__('Langer Text')}} - @if(Input::get('clean') == "true") + @if($response_clean === "true")    Clean Text on @else    Clean Text off @@ -71,6 +70,22 @@ {{ Form::textarea('full_text', $travel_guide->full_text , ['class' => 'form-control summernote']) }}

    +
    + +
    + + +
    +
    +
    + + + +
    + + +
    +
    +
    +
    + + +
    +
    +
  • + + +
    + + + +
    +
    +
    +
    + + {{ trans('laravel-filemanager::lfm.message-empty') }} +
    + + +
    +
    + + + + +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    + +
    + +
    + +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/resources/views/iq/content/assets/index.blade.php b/resources/views/iq/content/assets/index.blade.php index 267a00c..7ca3ff2 100755 --- a/resources/views/iq/content/assets/index.blade.php +++ b/resources/views/iq/content/assets/index.blade.php @@ -1,265 +1,12 @@ -@extends('layouts.layout-2') + + @extends('layouts.layout-2') + @section('content') - -

    - Medien -

    -
    - -
    -
    - - -
    -
    -
    - - - -
    - - -
    -
    -
    -
    - - -
    -
    -
    - - -
    - - - -
    -
    -
    -
    - - {{ trans('laravel-filemanager::lfm.message-empty') }} -
    - - -
    -
    -
    -
    -
    - - - - - - - - - -
    -
    - -
    -
    - -
    -
    -
    -
    - -
    -
    - -
    -
    -
    - -
    - -
    - -
    -
    -
    -
    -
    - - - @endsection + + diff --git a/resources/views/iq/content/assets/modals.blade.php b/resources/views/iq/content/assets/modals.blade.php new file mode 100755 index 0000000..e0f8089 --- /dev/null +++ b/resources/views/iq/content/assets/modals.blade.php @@ -0,0 +1,86 @@ + + +@if(isset($lfm_helper)) + + + + + + + +@endif \ No newline at end of file diff --git a/resources/views/layouts/application.blade.php b/resources/views/layouts/application.blade.php index aee07ad..3c85b47 100755 --- a/resources/views/layouts/application.blade.php +++ b/resources/views/layouts/application.blade.php @@ -31,8 +31,8 @@ - @if(isset($helper)) - + @if(isset($lfm_helper)) + @else @endif @@ -49,7 +49,7 @@ --> - + @@ -68,6 +68,7 @@ @yield('styles') + @@ -103,11 +104,8 @@ @yield('layout-content') - +@include('iq.content.assets.modals') @@ -116,7 +114,7 @@ -@if(isset($helper)) +@if(isset($lfm_helper)) @else @@ -137,11 +135,16 @@ - + + - - - + + + +@if(isset($lfm_helper)) + + +@endif @@ -151,34 +154,12 @@ - - - Dropzone.options.uploadForm = { - paramName: "upload[]", // The name that will be used to transfer the file - uploadMultiple: false, - parallelUploads: 10, - clickable: '#upload-button', - //dictDefaultMessage: lang['message-drop'], - init: function() { - var _this = this; // For the closure - this.on('success', function(file, response) { - console.log(response); - if (response == 'OK') { - loadItems(); - } else { - this.defaultOptions.error(file, response); //response.join('\n') - } - }); - }, - headers: { - 'Authorization': 'Bearer ' + getUrlParam('token') - }, - // acceptedFiles: "{{ implode(',', $helper->availableMimeTypes()) }}", - maxFilesize: ({{ $helper->maxUploadSize() }} / 1000), - }; - @endif + +@include('asset.js') + + diff --git a/resources/views/layouts/includes/layout-sidenav.blade.php b/resources/views/layouts/includes/layout-sidenav.blade.php index 4e57987..2a33ee5 100755 --- a/resources/views/layouts/includes/layout-sidenav.blade.php +++ b/resources/views/layouts/includes/layout-sidenav.blade.php @@ -164,16 +164,26 @@
    Inhalte
      + @if(Auth::user()->isPermission('cms-cn-in'))
    • Infos
    • - + @endif + @if(Auth::user()->isPermission('cms-cn-co'))
    • Reiseländer
    • + @endif + @if(Auth::user()->isPermission('cms-cn-al'))
    • Allgemein
    • + @endif + @if(Auth::user()->isPermission('cms-cn-au')) +
    • +
      Autoren
      +
    • + @endif
    @@ -208,6 +218,11 @@
    {{ __('Nationalitäten') }}
    @endif + @if(Auth::user()->isPermission('sua-st-ke')) +
  • +
    {{ __('Keywords') }}
    +
  • + @endif @endif diff --git a/resources/views/request/index.blade.php b/resources/views/request/index.blade.php index ce0595f..485842b 100755 --- a/resources/views/request/index.blade.php +++ b/resources/views/request/index.blade.php @@ -118,6 +118,7 @@ {{__('BookingID')}} {{__('Reiseland')}} {{__('Programm')}} + {{--{{__('Kategorie')}}--}} {{__('Anreise')}} {{__('Abreise')}} {{__('Reiseunterlage')}} diff --git a/resources/views/settings/keywords/index.blade.php b/resources/views/settings/keywords/index.blade.php new file mode 100755 index 0000000..1d99ee7 --- /dev/null +++ b/resources/views/settings/keywords/index.blade.php @@ -0,0 +1,92 @@ +@extends('layouts.layout-2') + +@section('content') +

    + Keywords +

    +
    +
    + + + + + + + + + + @foreach($keywords as $value) + + + + + + @endforeach + +
     {{__('Name')}}
    + + {{ $value->name }}
    +
    + +
    +
    +
    + + + + + + + + +@endsection \ No newline at end of file diff --git a/resources/views/travel/program/detail.blade.php b/resources/views/travel/program/detail.blade.php index d696875..76f6c7e 100755 --- a/resources/views/travel/program/detail.blade.php +++ b/resources/views/travel/program/detail.blade.php @@ -24,7 +24,6 @@ {!! Form::checkbox('status', 1, $program->status, ['class'=>'custom-control-input']) !!} {{__('aktiv')}} - {{ Form::text('title', $program->title, array('placeholder'=>__('Title'), 'class'=>'form-control', 'id'=>'program_title', 'required'=>true)) }} @@ -47,6 +46,15 @@ + {{-- +
    +
    + generate Keywords + + {{ Form::text('keywords', $program->keywords, array('placeholder'=>__('Keyword,Keyword'), 'class'=>'form-control', 'id'=>'keywords')) }} +
    +
    + --}} diff --git a/resources/views/travel/program/index.blade.php b/resources/views/travel/program/index.blade.php index e8a118f..48654c5 100755 --- a/resources/views/travel/program/index.blade.php +++ b/resources/views/travel/program/index.blade.php @@ -27,6 +27,8 @@   {{__('Programm')}} {{__('Code')}} + {{-- {{__('Keywords')}} --}} + {{__('Vorlage')}} {{__('Status')}} @@ -42,6 +44,17 @@ {{ $value->program_code }} + {{-- + + {{ $value->program_code }} + + --}} + + @if($value->hasTravelProgramDrafts()) + + @else + + @endif @if($value->status) diff --git a/routes/web.php b/routes/web.php index 5b3a625..55ff292 100755 --- a/routes/web.php +++ b/routes/web.php @@ -140,6 +140,7 @@ Route::group(['middleware' => ['admin']], function() Route::get('/iq/content/tree/detail/{id}/{node_id?}/{area_section_id?}', 'IQ\ContentTreeController@detail')->name('iq_content_tree_detail'); Route::post('/iq/content/tree/detail/{id}/{node_id?}/{area_section_id?}', 'IQ\ContentTreeController@store')->name('iq_content_tree_detail'); Route::get('/iq/content/tree/detail/remove_site/{id}/{node_id}/{travel_guide_id}/{r?}', 'IQ\ContentTreeController@removeSite')->name('iq_content_tree_detail_remove_site'); + Route::get('/iq/content/tree/delete/{id}/{node_id?}/{area_section_id?}', 'IQ\ContentTreeController@delete')->name('iq_content_tree_delete'); Route::get('/iq/content/tree/repair/{id}', 'IQ\ContentTreeController@repair')->name('iq_content_tree_repair'); @@ -147,6 +148,8 @@ Route::group(['middleware' => ['admin']], function() Route::group(['middleware' => ['auth.permission:cms-iq-assets']], function() { //assets Route::get('/iq/content/assets', 'IQ\ContentAssetController@index')->name('iq_content_assets'); + Route::get('/iq/content/assets/modal', 'IQ\ContentAssetController@modal')->name('iq_content_assets_modal'); + }); @@ -156,6 +159,8 @@ Route::group(['middleware' => ['admin']], function() Route::get('/travel/program/detail/{id}', 'TravelProgramController@detail')->name('travel_program_detail'); Route::post('/travel/program/detail/{id}', 'TravelProgramController@store')->name('travel_program_detail'); + Route::get('/travel/program/generate_keywords/{id}', 'TravelProgramController@generateKeywords')->name('travel_program_generate_keywords'); + Route::post('/travel/program/class/update', 'TravelProgramController@classUpdate')->name('travel_program_class_update'); Route::get('/travel/program/class/delete/{id}', 'TravelProgramController@classDelete')->name('travel_program_class_delete'); @@ -216,26 +221,33 @@ Route::group(['middleware' => ['admin']], function() Route::post('/travel_user_booking_fewo/detail/{id}', 'TravelUserBookingFewoController@store')->name('travel_user_booking_fewo_detail'); Route::get('/travel_user_booking_fewo/delete/{id}', 'TravelUserBookingFewoController@delete')->name('travel_user_booking_fewo_delete'); }); - Route::group(['middleware' => ['auth.permission:cms-cn']], function() { - + Route::group(['middleware' => ['auth.permission:cms-cn-in']], function() { //CMS Infos Route::get('/cms/content/infos', 'CMS\CMSContentInfoController@index')->name('cms_content_infos'); Route::post('/cms/content/infos', 'CMS\CMSContentInfoController@store')->name('cms_content_infos'); Route::get('/cms/content/infos/delete/{model}/{id}', 'CMS\CMSContentInfoController@delete')->name('cms_content_infos_delete'); - + }); + Route::group(['middleware' => ['auth.permission:cms-cn-al']], function() { // CMS Inhalte Route::get('/cms/content/all', 'CMS\CMSContentController@index')->name('cms_content_all'); Route::post('/cms/content/all/store', 'CMS\CMSContentController@store')->name('cms_content_all_store'); Route::post('/cms/content/all/load/modal', 'CMS\CMSContentController@loadModal')->name('cms_content_all_load_modal'); Route::get('/cms/content/all/delete/{id}', 'CMS\CMSContentController@delete')->name('cms_content_all_delete'); - + }); + Route::group(['middleware' => ['auth.permission:cms-cn-co']], function() { //CMS Länder Route::get('/cms/content/country', 'CMS\CMSContentCountryController@index')->name('cms_content_country'); Route::get('/cms/content/country/detail/{id}/{step?}', 'CMS\CMSContentCountryController@detail')->name('cms_content_country_detail'); Route::post('/cms/content/country/store/{id}', 'CMS\CMSContentCountryController@store')->name('cms_content_country_store'); - - }); + Route::group(['middleware' => ['auth.permission:cms-cn-au']], function() { + //CMS Author + Route::get('/cms/content/author', 'CMS\CMSContentAuthorController@index')->name('cms_content_author'); + Route::post('/cms/content/author/store', 'CMS\CMSContentAuthorController@store')->name('cms_content_author_store'); + Route::post('/cms/content/author/load/modal', 'CMS\CMSContentAuthorController@loadModal')->name('cms_content_author_load_modal'); + Route::get('/cms/content/author/delete/{id}', 'CMS\CMSContentAuthorController@delete')->name('cms_content_author_delete'); + }); + Route::group(['middleware' => ['auth.permission:cms-tg']], function() { // CMS Reiseführer Route::get('/cms/travel_guide/content', 'CMS\CMSTravelGuideController@index')->name('cms_travel_guide_content'); @@ -301,6 +313,13 @@ Route::group(['middleware' => ['superadmin']], function() { Route::get('/admin/settings/travel/nationality/delete/{id}', 'Settings\TravelNationalityController@delete')->name('admin_settings_travel_nationality_delete'); }); + Route::group(['middleware' => ['auth.permission:sua-st-ke']], function() { + //SUPERADMIN > Einstellungen > Keywords + Route::get('/admin/settings/keyword', 'Settings\KeywordController@index')->name('admin_settings_keyword'); + Route::post('/admin/settings/keyword/update', 'Settings\KeywordController@update')->name('admin_settings_keyword_update'); + Route::get('/admin/settings/keyword/delete/{id}', 'Settings\KeywordController@delete')->name('admin_settings_keyword_delete'); + }); + Route::group(['middleware' => ['auth.permission:sua-re-bo']], function() { //SUPERADMIN > report > Buchungen Route::get('/admin/report/bookings', 'Admin\ReportController@bookings')->name('admin_report_bookings'); diff --git a/storage/app/public/files/shares/Muscat-Sultan-Qaboos-Moschee-h1-Kopie-2.JPG b/storage/app/public/files/shares/Muscat-Sultan-Qaboos-Moschee-h1-Kopie-2.JPG new file mode 100644 index 0000000..bd8e291 Binary files /dev/null and b/storage/app/public/files/shares/Muscat-Sultan-Qaboos-Moschee-h1-Kopie-2.JPG differ diff --git a/storage/app/public/files/shares/Muscat-Sultan-Qaboos-Moschee-h1-Kopie-3.JPG b/storage/app/public/files/shares/Muscat-Sultan-Qaboos-Moschee-h1-Kopie-3.JPG new file mode 100644 index 0000000..bd8e291 Binary files /dev/null and b/storage/app/public/files/shares/Muscat-Sultan-Qaboos-Moschee-h1-Kopie-3.JPG differ diff --git a/storage/app/public/files/shares/Muscat-Sultan-Qaboos-Moschee-h1-Kopie.JPG b/storage/app/public/files/shares/Muscat-Sultan-Qaboos-Moschee-h1-Kopie.JPG new file mode 100644 index 0000000..bd8e291 Binary files /dev/null and b/storage/app/public/files/shares/Muscat-Sultan-Qaboos-Moschee-h1-Kopie.JPG differ diff --git a/storage/app/public/files/shares/Muscat-Sultan-Qaboos-Moschee-h1.JPG b/storage/app/public/files/shares/Muscat-Sultan-Qaboos-Moschee-h1.JPG new file mode 100644 index 0000000..bd8e291 Binary files /dev/null and b/storage/app/public/files/shares/Muscat-Sultan-Qaboos-Moschee-h1.JPG differ diff --git a/storage/app/public/files/shares/Muscat-Sultan-Qaboos-Moschee-h1_cropped_1582804461.JPG b/storage/app/public/files/shares/Muscat-Sultan-Qaboos-Moschee-h1_cropped_1582804461.JPG new file mode 100644 index 0000000..d3f7be4 Binary files /dev/null and b/storage/app/public/files/shares/Muscat-Sultan-Qaboos-Moschee-h1_cropped_1582804461.JPG differ diff --git a/storage/app/public/files/shares/Tempel-Nefertari-und-Ramses-am-Nassersee-in-Abu-Simbel.youtube b/storage/app/public/files/shares/Tempel-Nefertari-und-Ramses-am-Nassersee-in-Abu-Simbel.youtube new file mode 100644 index 0000000..d75fe8e --- /dev/null +++ b/storage/app/public/files/shares/Tempel-Nefertari-und-Ramses-am-Nassersee-in-Abu-Simbel.youtube @@ -0,0 +1 @@ +{"id":"JzB9Zb5kT7s","title":"Tempel Nefertari und Ramses am Nassersee in Abu Simbel","description":"Unter http:\/\/www.aegypten-online.de\/abu-simbel.htm erfahren Sie mehr \u00fcber Abu Simbel. Die beiden Tempel Nefertari und Ramses am Nassersee in Abu Simbel. (taped by STERN TOURS)"} \ No newline at end of file diff --git a/storage/app/public/files/shares/VHJACKODURUmkehrdachbegruentDE.pdf b/storage/app/public/files/shares/VHJACKODURUmkehrdachbegruentDE.pdf deleted file mode 100644 index 9413379..0000000 Binary files a/storage/app/public/files/shares/VHJACKODURUmkehrdachbegruentDE.pdf and /dev/null differ diff --git a/storage/app/public/files/shares/root/Bilder/Bilder-in/Muscat-Sultan-Qaboos-Moschee-h1.JPG b/storage/app/public/files/shares/root/Bilder/Bilder-in/Muscat-Sultan-Qaboos-Moschee-h1.JPG new file mode 100644 index 0000000..bd8e291 Binary files /dev/null and b/storage/app/public/files/shares/root/Bilder/Bilder-in/Muscat-Sultan-Qaboos-Moschee-h1.JPG differ diff --git a/storage/app/public/files/shares/root/Bilder/Bilder-in/thumbs/Muscat-Sultan-Qaboos-Moschee-h1.JPG b/storage/app/public/files/shares/root/Bilder/Bilder-in/thumbs/Muscat-Sultan-Qaboos-Moschee-h1.JPG new file mode 100644 index 0000000..269af03 Binary files /dev/null and b/storage/app/public/files/shares/root/Bilder/Bilder-in/thumbs/Muscat-Sultan-Qaboos-Moschee-h1.JPG differ diff --git a/storage/app/public/files/shares/root/Bilder/Muscat-Sultan-Qaboos-Moschee-h1-Kopie-2.JPG b/storage/app/public/files/shares/root/Bilder/Muscat-Sultan-Qaboos-Moschee-h1-Kopie-2.JPG new file mode 100644 index 0000000..bd8e291 Binary files /dev/null and b/storage/app/public/files/shares/root/Bilder/Muscat-Sultan-Qaboos-Moschee-h1-Kopie-2.JPG differ diff --git a/storage/app/public/files/shares/root/Bilder/Muscat-Sultan-Qaboos-Moschee-h1-Kopie-3.JPG b/storage/app/public/files/shares/root/Bilder/Muscat-Sultan-Qaboos-Moschee-h1-Kopie-3.JPG new file mode 100644 index 0000000..bd8e291 Binary files /dev/null and b/storage/app/public/files/shares/root/Bilder/Muscat-Sultan-Qaboos-Moschee-h1-Kopie-3.JPG differ diff --git a/storage/app/public/files/shares/root/Bilder/Muscat-Sultan-Qaboos-Moschee-h1-Kopie.JPG b/storage/app/public/files/shares/root/Bilder/Muscat-Sultan-Qaboos-Moschee-h1-Kopie.JPG new file mode 100644 index 0000000..bd8e291 Binary files /dev/null and b/storage/app/public/files/shares/root/Bilder/Muscat-Sultan-Qaboos-Moschee-h1-Kopie.JPG differ diff --git a/storage/app/public/files/shares/root/Bilder/Muscat-Sultan-Qaboos-Moschee-h1.JPG b/storage/app/public/files/shares/root/Bilder/Muscat-Sultan-Qaboos-Moschee-h1.JPG new file mode 100644 index 0000000..bd8e291 Binary files /dev/null and b/storage/app/public/files/shares/root/Bilder/Muscat-Sultan-Qaboos-Moschee-h1.JPG differ diff --git a/storage/app/public/files/shares/root/logo.png b/storage/app/public/files/shares/root/Bilder/logo.png similarity index 100% rename from storage/app/public/files/shares/root/logo.png rename to storage/app/public/files/shares/root/Bilder/logo.png diff --git a/storage/app/public/files/shares/root/Bilder/thumbs/Muscat-Sultan-Qaboos-Moschee-h1-Kopie-2.JPG b/storage/app/public/files/shares/root/Bilder/thumbs/Muscat-Sultan-Qaboos-Moschee-h1-Kopie-2.JPG new file mode 100644 index 0000000..269af03 Binary files /dev/null and b/storage/app/public/files/shares/root/Bilder/thumbs/Muscat-Sultan-Qaboos-Moschee-h1-Kopie-2.JPG differ diff --git a/storage/app/public/files/shares/root/Bilder/thumbs/Muscat-Sultan-Qaboos-Moschee-h1-Kopie-3.JPG b/storage/app/public/files/shares/root/Bilder/thumbs/Muscat-Sultan-Qaboos-Moschee-h1-Kopie-3.JPG new file mode 100644 index 0000000..269af03 Binary files /dev/null and b/storage/app/public/files/shares/root/Bilder/thumbs/Muscat-Sultan-Qaboos-Moschee-h1-Kopie-3.JPG differ diff --git a/storage/app/public/files/shares/root/Bilder/thumbs/Muscat-Sultan-Qaboos-Moschee-h1-Kopie.JPG b/storage/app/public/files/shares/root/Bilder/thumbs/Muscat-Sultan-Qaboos-Moschee-h1-Kopie.JPG new file mode 100644 index 0000000..269af03 Binary files /dev/null and b/storage/app/public/files/shares/root/Bilder/thumbs/Muscat-Sultan-Qaboos-Moschee-h1-Kopie.JPG differ diff --git a/storage/app/public/files/shares/root/Bilder/thumbs/Muscat-Sultan-Qaboos-Moschee-h1.JPG b/storage/app/public/files/shares/root/Bilder/thumbs/Muscat-Sultan-Qaboos-Moschee-h1.JPG new file mode 100644 index 0000000..269af03 Binary files /dev/null and b/storage/app/public/files/shares/root/Bilder/thumbs/Muscat-Sultan-Qaboos-Moschee-h1.JPG differ diff --git a/storage/app/public/files/shares/root/chartsflot.js b/storage/app/public/files/shares/root/chartsflot.js deleted file mode 100644 index 68d3a87..0000000 --- a/storage/app/public/files/shares/root/chartsflot.js +++ /dev/null @@ -1,181 +0,0 @@ -$(function() { - var gridColor = '#aaaaaa'; - var gridBorder = '#eeeeee'; - - $.plot($('#flot-graph'), [ - { - label: 'Visits', - data: [ - [ 6, 196 ], [ 7, 175 ], [ 8, 212 ], [ 9, 247 ], [ 10, 152 ], [ 11, 225 ], [ 12, 155 ], [ 13, 203 ], [ 14, 166 ], [ 15, 151 ] - ] - }, - { - label: 'Returning visits', - data: [ - [ 6, 49 ], [ 7, 56 ], [ 8, 30 ], [ 9, 29 ], [ 10, 66 ], [ 11, 2 ], [ 12, 2 ], [ 13, 8 ], [ 14, 34 ], [ 15, 63 ] - ] - } - ], { - series: { - lines: { - show: true, - lineWidth: 2 - }, - points: { - show: true, - radius: 4 - } - }, - - grid: { - color: gridColor, - borderColor: gridBorder, - borderWidth: 1, - hoverable: true, - clickable: true - }, - - xaxis: { tickColor: gridBorder, }, - yaxis: { tickColor: gridBorder, }, - legend: { - show: true, - position: 'ne' - }, - tooltip: { show: true }, - colors: ["#607D8B", "#4CAF50"] - }); - - $.plot($('#flot-bars'), [ - { - label: 'Visits', - data: [ - [ 6, 156 ], [ 7, 195 ], [ 8, 171 ], [ 9, 211 ], [ 10, 150 ], [ 11, 169 ], [ 12, 173 ], [ 13, 200 ], [ 14, 233 ], [ 15, 161 ] - ] - }, - { - label: 'Returning visits', - data: [ - [ 6, 24 ], [ 7, 20 ], [ 8, 31 ], [ 9, 4 ], [ 10, 92 ], [ 11, 87 ], [ 12, 28 ], [ 13, 21 ], [ 14, 80 ], [ 15, 76 ] - ] - } - ], { - series: { - bars: { - show: true, - barWidth: .6, - align: 'center', - lineWidth: 1, - fill: 0.25 - } - }, - - grid: { - color: gridColor, - borderColor: gridBorder, - borderWidth: 1, - hoverable: true, - clickable: true - }, - - xaxis: { tickDecimals: 2, tickColor: gridBorder }, - yaxis: { tickColor: gridBorder }, - legend: { - show: true, - position: 'ne' - }, - - tooltip: { show: true }, - colors: ['#FF5722', '#0288D1'] - }); - - $.plot($('#flot-categories'), [ - { - label: 'iPhone', - data: [ - [ "2010.Q1", 35 ], [ '2010.Q2', 67 ], [ '2010.Q3', 13 ], [ '2010.Q4', 75 ] - ] - }, - { - label: 'iPad', - data: [ - [ "2010.Q1", 18 ], [ '2010.Q2', 80 ], [ '2010.Q3', 72 ], [ '2010.Q4', 33 ] - ] - }, - { - label: 'iTouch', - data: [ - [ '2010.Q1', 32 ], [ '2010.Q2', 49 ], [ '2010.Q3', 25 ], [ '2010.Q4', 87 ] - ] - } - ], { - series: { - lines: { - show: true, - fill: 0.1, - lineWidth: 1 - } - }, - - grid: { - color: gridColor, - borderColor: gridBorder, - borderWidth: 1, - hoverable: true, - clickable: true - }, - - xaxis: { mode: 'categories', tickColor: gridBorder }, - yaxis: { tickColor: gridBorder }, - legend: { - show: true, - position: 'ne' - }, - - tooltip: { - show: true, - content: '%s: %y' - }, - - colors: ['#E040FB', '#E91E63', '#00BCD4'] - }); - - $.plot($('#flot-pie'), [ - { label: 'Series1', data: 77 }, - { label: 'Series2', data: 81 }, - { label: 'Series3', data: 46 }, - { label: 'Series4', data: 35 }, - { label: 'Series5', data: 79 }, - { label: 'Series6', data: 84 }, - { label: 'Series7', data: 51 } - ], { - series: { - pie: { - show: true, - radius: 1, - innerRadius: 0.5, - - label: { - show: true, - radius: 3 / 4, - background: { opacity: 0 }, - - formatter: function(label, series) { - return '
    ' + Math.round(series.percent) + '%
    '; - } - } - } - }, - - grid: { - color: gridColor, - borderColor: gridBorder, - borderWidth: 1, - hoverable: true, - clickable: true - }, - - xaxis: { tickColor: gridBorder }, - yaxis: { tickColor: gridBorder }, - colors: ['#4CAF50', '#FF5722', '#607D8B', '#009688', '#E91E63', '#795548', '#0288D1'] - }); -}); diff --git a/storage/app/public/files/shares/root/Bilder/5_cropped_1574182410.jpg b/storage/app/public/files/shares/root/youtube/5_cropped_1574182410.jpg similarity index 100% rename from storage/app/public/files/shares/root/Bilder/5_cropped_1574182410.jpg rename to storage/app/public/files/shares/root/youtube/5_cropped_1574182410.jpg diff --git a/storage/app/public/files/shares/root/Bilder/thumbs/5_cropped_1574182410.jpg b/storage/app/public/files/shares/root/youtube/thumbs/5_cropped_1574182410.jpg similarity index 100% rename from storage/app/public/files/shares/root/Bilder/thumbs/5_cropped_1574182410.jpg rename to storage/app/public/files/shares/root/youtube/thumbs/5_cropped_1574182410.jpg diff --git a/storage/app/public/files/shares/root2/4_cropped_1574181421.jpg b/storage/app/public/files/shares/root2/4cropped1574181421212.jpg similarity index 100% rename from storage/app/public/files/shares/root2/4_cropped_1574181421.jpg rename to storage/app/public/files/shares/root2/4cropped1574181421212.jpg diff --git a/storage/app/public/files/shares/test/Muscat-Sultan-Qaboos-Moschee-h1-Kopie-2.JPG b/storage/app/public/files/shares/test/Muscat-Sultan-Qaboos-Moschee-h1-Kopie-2.JPG new file mode 100644 index 0000000..bd8e291 Binary files /dev/null and b/storage/app/public/files/shares/test/Muscat-Sultan-Qaboos-Moschee-h1-Kopie-2.JPG differ diff --git a/storage/app/public/files/shares/test/Muscat-Sultan-Qaboos-Moschee-h1.JPG b/storage/app/public/files/shares/test/Muscat-Sultan-Qaboos-Moschee-h1.JPG new file mode 100644 index 0000000..bd8e291 Binary files /dev/null and b/storage/app/public/files/shares/test/Muscat-Sultan-Qaboos-Moschee-h1.JPG differ diff --git a/storage/app/public/files/shares/test/thumbs/Muscat-Sultan-Qaboos-Moschee-h1-Kopie-2.JPG b/storage/app/public/files/shares/test/thumbs/Muscat-Sultan-Qaboos-Moschee-h1-Kopie-2.JPG new file mode 100644 index 0000000..269af03 Binary files /dev/null and b/storage/app/public/files/shares/test/thumbs/Muscat-Sultan-Qaboos-Moschee-h1-Kopie-2.JPG differ diff --git a/storage/app/public/files/shares/test/thumbs/Muscat-Sultan-Qaboos-Moschee-h1.JPG b/storage/app/public/files/shares/test/thumbs/Muscat-Sultan-Qaboos-Moschee-h1.JPG new file mode 100644 index 0000000..269af03 Binary files /dev/null and b/storage/app/public/files/shares/test/thumbs/Muscat-Sultan-Qaboos-Moschee-h1.JPG differ diff --git a/storage/app/public/files/shares/thumbs/Muscat-Sultan-Qaboos-Moschee-h1-Kopie-2.JPG b/storage/app/public/files/shares/thumbs/Muscat-Sultan-Qaboos-Moschee-h1-Kopie-2.JPG new file mode 100644 index 0000000..269af03 Binary files /dev/null and b/storage/app/public/files/shares/thumbs/Muscat-Sultan-Qaboos-Moschee-h1-Kopie-2.JPG differ diff --git a/storage/app/public/files/shares/thumbs/Muscat-Sultan-Qaboos-Moschee-h1-Kopie-3.JPG b/storage/app/public/files/shares/thumbs/Muscat-Sultan-Qaboos-Moschee-h1-Kopie-3.JPG new file mode 100644 index 0000000..269af03 Binary files /dev/null and b/storage/app/public/files/shares/thumbs/Muscat-Sultan-Qaboos-Moschee-h1-Kopie-3.JPG differ diff --git a/storage/app/public/files/shares/thumbs/Muscat-Sultan-Qaboos-Moschee-h1-Kopie.JPG b/storage/app/public/files/shares/thumbs/Muscat-Sultan-Qaboos-Moschee-h1-Kopie.JPG new file mode 100644 index 0000000..269af03 Binary files /dev/null and b/storage/app/public/files/shares/thumbs/Muscat-Sultan-Qaboos-Moschee-h1-Kopie.JPG differ diff --git a/storage/app/public/files/shares/thumbs/Muscat-Sultan-Qaboos-Moschee-h1.JPG b/storage/app/public/files/shares/thumbs/Muscat-Sultan-Qaboos-Moschee-h1.JPG new file mode 100644 index 0000000..269af03 Binary files /dev/null and b/storage/app/public/files/shares/thumbs/Muscat-Sultan-Qaboos-Moschee-h1.JPG differ diff --git a/storage/app/public/files/shares/thumbs/Muscat-Sultan-Qaboos-Moschee-h1_cropped_1582804461.JPG b/storage/app/public/files/shares/thumbs/Muscat-Sultan-Qaboos-Moschee-h1_cropped_1582804461.JPG new file mode 100644 index 0000000..c36b90a Binary files /dev/null and b/storage/app/public/files/shares/thumbs/Muscat-Sultan-Qaboos-Moschee-h1_cropped_1582804461.JPG differ diff --git a/storage/app/public/files/shares/thumbs/Tempel-Nefertari-und-Ramses-am-Nassersee-in-Abu-Simbel.jpg b/storage/app/public/files/shares/thumbs/Tempel-Nefertari-und-Ramses-am-Nassersee-in-Abu-Simbel.jpg new file mode 100644 index 0000000..1d914a1 Binary files /dev/null and b/storage/app/public/files/shares/thumbs/Tempel-Nefertari-und-Ramses-am-Nassersee-in-Abu-Simbel.jpg differ diff --git a/vendor.tar.gz b/vendor.tar.gz new file mode 100644 index 0000000..913bfd1 Binary files /dev/null and b/vendor.tar.gz differ