Booking, QI Content, Trees, Media

This commit is contained in:
Kevin Adametz 2019-10-02 20:03:55 +02:00
parent 1f340e96fa
commit 7fbac395a9
260 changed files with 27160 additions and 3773 deletions

3
.idea/.gitignore generated vendored Normal file
View file

@ -0,0 +1,3 @@
# Datasource local storage ignored files
/dataSources/

View file

@ -9,7 +9,11 @@
<case-sensitivity plain-identifiers="mixed" quoted-identifiers="mixed" />
<secret-storage>master_key</secret-storage>
<user-name>cmssso_1</user-name>
<introspection-schemas>*:@</introspection-schemas>
<schema-mapping>
<introspection-scope>
<node kind="schema" qname="@" />
</introspection-scope>
</schema-mapping>
</data-source>
<data-source name="sterntours@localhost" uuid="09ce12d1-7f68-4ce4-9ab1-0229d6366fdb">
<database-info product="MySQL" version="5.7.25" jdbc-version="4.0" driver-name="MySQL Connector Java" driver-version="mysql-connector-java-5.1.46 ( Revision: 9cc87a48e75c2d2e87c1a293b2862ce651cb256e )" dbms="MYSQL" exact-version="5.7.25" exact-driver-version="5.1">
@ -19,7 +23,11 @@
<case-sensitivity plain-identifiers="mixed" quoted-identifiers="mixed" />
<secret-storage>master_key</secret-storage>
<user-name>root</user-name>
<introspection-schemas>*:@</introspection-schemas>
<schema-mapping>
<introspection-scope>
<node kind="schema" qname="@" />
</introspection-scope>
</schema-mapping>
</data-source>
</component>
</project>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<dataSource name="sterntours@localhost">
<database-model serializer="dbm" dbms="MYSQL" family-id="MYSQL" format-version="4.14">
<database-model serializer="dbm" dbms="MYSQL" family-id="MYSQL" format-version="4.15">
<root id="1">
<ServerVersion>5.7.25</ServerVersion>
<DefaultEngine>InnoDB</DefaultEngine>
@ -24,6 +24,7 @@
</schema>
<schema id="7" parent="1" name="information_schema">
<Collation>utf8_general_ci</Collation>
<Substituted>1</Substituted>
</schema>
<schema id="8" parent="1" name="inno-economic">
<Collation>utf8_general_ci</Collation>
@ -60,8 +61,8 @@
</schema>
<schema id="19" parent="1" name="sterntours">
<Current>1</Current>
<Visible>1</Visible>
<Collation>utf8_general_ci</Collation>
<Visible>1</Visible>
</schema>
<schema id="20" parent="1" name="sunbird2">
<Collation>utf8_general_ci</Collation>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<dataSource name="cmssso_db1@192.168.1.7">
<database-model serializer="dbm" dbms="MYSQL" family-id="MYSQL" format-version="4.14">
<database-model serializer="dbm" dbms="MYSQL" family-id="MYSQL" format-version="4.15">
<root id="1">
<ServerVersion>5.6.39</ServerVersion>
<DefaultEngine>InnoDB</DefaultEngine>
@ -9,11 +9,12 @@
</root>
<schema id="2" parent="1" name="cmssso_db1">
<Current>1</Current>
<Visible>1</Visible>
<Collation>latin1_swedish_ci</Collation>
<Visible>1</Visible>
</schema>
<schema id="3" parent="1" name="information_schema">
<Collation>utf8_general_ci</Collation>
<Substituted>1</Substituted>
</schema>
<schema id="4" parent="1" name="jugenr_db1">
<Collation>latin1_swedish_ci</Collation>

View file

@ -13,13 +13,18 @@
<excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/event-manager" />
<excludeFolder url="file://$MODULE_DIR$/vendor/dompdf/dompdf" />
<excludeFolder url="file://$MODULE_DIR$/vendor/firebase/php-jwt" />
<excludeFolder url="file://$MODULE_DIR$/vendor/kylekatarnls/update-helper" />
<excludeFolder url="file://$MODULE_DIR$/vendor/iqcontent/laravel-filemanager" />
<excludeFolder url="file://$MODULE_DIR$/vendor/laravel/passport" />
<excludeFolder url="file://$MODULE_DIR$/vendor/lcobucci/jwt" />
<excludeFolder url="file://$MODULE_DIR$/vendor/league/event" />
<excludeFolder url="file://$MODULE_DIR$/vendor/league/oauth2-server" />
<excludeFolder url="file://$MODULE_DIR$/vendor/markbaker/complex" />
<excludeFolder url="file://$MODULE_DIR$/vendor/markbaker/matrix" />
<excludeFolder url="file://$MODULE_DIR$/vendor/opis/closure" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phenx/php-font-lib" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phenx/php-svg-lib" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpoffice/phpspreadsheet" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpoption/phpoption" />
<excludeFolder url="file://$MODULE_DIR$/vendor/phpseclib/phpseclib" />
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/http-factory" />
<excludeFolder url="file://$MODULE_DIR$/vendor/ralouphie/getallheaders" />

12
.idea/php.xml generated
View file

@ -80,15 +80,10 @@
<path value="$PROJECT_DIR$/vendor/symfony/filesystem" />
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-ctype" />
<path value="$PROJECT_DIR$/vendor/psr/http-message" />
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-php56" />
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-util" />
<path value="$PROJECT_DIR$/vendor/yajra/laravel-datatables-oracle" />
<path value="$PROJECT_DIR$/vendor/phpoffice/phpexcel" />
<path value="$PROJECT_DIR$/vendor/guzzlehttp/guzzle" />
<path value="$PROJECT_DIR$/vendor/vladrub/laravel-datatables-oracle" />
<path value="$PROJECT_DIR$/vendor/laracasts/flash" />
<path value="$PROJECT_DIR$/vendor/jenssegers/date" />
<path value="$PROJECT_DIR$/vendor/jeremeamia/SuperClosure" />
<path value="$PROJECT_DIR$/vendor/guzzlehttp/psr7" />
<path value="$PROJECT_DIR$/vendor/guzzlehttp/promises" />
<path value="$PROJECT_DIR$/vendor/laravelcollective/html" />
@ -114,7 +109,6 @@
<path value="$PROJECT_DIR$/vendor/phenx/php-svg-lib" />
<path value="$PROJECT_DIR$/vendor/sabberworm/php-css-parser" />
<path value="$PROJECT_DIR$/vendor/dompdf/dompdf" />
<path value="$PROJECT_DIR$/vendor/kylekatarnls/update-helper" />
<path value="$PROJECT_DIR$/vendor/ralouphie/getallheaders" />
<path value="$PROJECT_DIR$/vendor/symfony/service-contracts" />
<path value="$PROJECT_DIR$/vendor/symfony/mime" />
@ -124,6 +118,12 @@
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-intl-idn" />
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-iconv" />
<path value="$PROJECT_DIR$/vendor/psr/http-factory" />
<path value="$PROJECT_DIR$/vendor/phpoffice/phpspreadsheet" />
<path value="$PROJECT_DIR$/vendor/opis/closure" />
<path value="$PROJECT_DIR$/vendor/phpoption/phpoption" />
<path value="$PROJECT_DIR$/vendor/markbaker/complex" />
<path value="$PROJECT_DIR$/vendor/markbaker/matrix" />
<path value="$PROJECT_DIR$/vendor/iqcontent/laravel-filemanager" />
</include_path>
</component>
<component name="PhpProjectSharedConfiguration" php_language_level="7.1" />

1
.idea/vcs.xml generated
View file

@ -2,5 +2,6 @@
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager" vcs="Git" />
</component>
</project>

1301
.idea/workspace.xml generated

File diff suppressed because it is too large Load diff

View file

@ -5,7 +5,7 @@ namespace PHPSTORM_META {
/**
* PhpStorm Meta file, to provide autocomplete information for PhpStorm
* Generated on 2019-07-19 16:17:57.
* Generated on 2019-08-14 12:31:25.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
* @see https://github.com/barryvdh/laravel-ide-helper
@ -26,6 +26,7 @@ namespace PHPSTORM_META {
'Illuminate\Contracts\Pipeline\Hub' => \Illuminate\Pipeline\Hub::class,
'Illuminate\Contracts\Queue\EntityResolver' => \Illuminate\Database\Eloquent\QueueEntityResolver::class,
'Illuminate\Contracts\Routing\ResponseFactory' => \Illuminate\Routing\ResponseFactory::class,
'Illuminate\Foundation\Mix' => \Illuminate\Foundation\Mix::class,
'Illuminate\Mail\Markdown' => \Illuminate\Mail\Markdown::class,
'Illuminate\Notifications\ChannelManager' => \Illuminate\Notifications\ChannelManager::class,
'Illuminate\Routing\Contracts\ControllerDispatcher' => \Illuminate\Routing\ControllerDispatcher::class,
@ -33,6 +34,10 @@ namespace PHPSTORM_META {
'Laracasts\Flash\SessionStore' => \Laracasts\Flash\LaravelSessionStore::class,
'League\OAuth2\Server\AuthorizationServer' => \League\OAuth2\Server\AuthorizationServer::class,
'League\OAuth2\Server\ResourceServer' => \League\OAuth2\Server\ResourceServer::class,
'Maatwebsite\Excel\Files\Filesystem' => \Maatwebsite\Excel\Files\Filesystem::class,
'Maatwebsite\Excel\Files\TemporaryFileFactory' => \Maatwebsite\Excel\Files\TemporaryFileFactory::class,
'Maatwebsite\Excel\Transactions\TransactionHandler' => \Maatwebsite\Excel\Transactions\DbTransactionHandler::class,
'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,
@ -59,7 +64,10 @@ namespace PHPSTORM_META {
'command.controller.make' => \Illuminate\Routing\Console\ControllerMakeCommand::class,
'command.down' => \Illuminate\Foundation\Console\DownCommand::class,
'command.environment' => \Illuminate\Foundation\Console\EnvironmentCommand::class,
'command.event.cache' => \Illuminate\Foundation\Console\EventCacheCommand::class,
'command.event.clear' => \Illuminate\Foundation\Console\EventClearCommand::class,
'command.event.generate' => \Illuminate\Foundation\Console\EventGenerateCommand::class,
'command.event.list' => \Illuminate\Foundation\Console\EventListCommand::class,
'command.event.make' => \Illuminate\Foundation\Console\EventMakeCommand::class,
'command.exception.make' => \Illuminate\Foundation\Console\ExceptionMakeCommand::class,
'command.factory.make' => \Illuminate\Database\Console\Factories\FactoryMakeCommand::class,
@ -84,6 +92,8 @@ namespace PHPSTORM_META {
'command.notification.make' => \Illuminate\Foundation\Console\NotificationMakeCommand::class,
'command.notification.table' => \Illuminate\Notifications\Console\NotificationTableCommand::class,
'command.observer.make' => \Illuminate\Foundation\Console\ObserverMakeCommand::class,
'command.optimize' => \Illuminate\Foundation\Console\OptimizeCommand::class,
'command.optimize.clear' => \Illuminate\Foundation\Console\OptimizeClearCommand::class,
'command.package.discover' => \Illuminate\Foundation\Console\PackageDiscoverCommand::class,
'command.policy.make' => \Illuminate\Foundation\Console\PolicyMakeCommand::class,
'command.preset' => \Illuminate\Foundation\Console\PresetCommand::class,
@ -127,12 +137,6 @@ namespace PHPSTORM_META {
'encrypter' => \Illuminate\Encryption\Encrypter::class,
'events' => \Illuminate\Events\Dispatcher::class,
'excel' => \Maatwebsite\Excel\Excel::class,
'excel.identifier' => \Maatwebsite\Excel\Classes\FormatIdentifier::class,
'excel.parsers.css' => \Maatwebsite\Excel\Parsers\CssParser::class,
'excel.parsers.view' => \Maatwebsite\Excel\Parsers\ViewParser::class,
'excel.reader' => \Maatwebsite\Excel\Readers\LaravelExcelReader::class,
'excel.readers.html' => \Maatwebsite\Excel\Readers\Html::class,
'excel.writer' => \Maatwebsite\Excel\Writers\LaravelExcelWriter::class,
'files' => \Illuminate\Filesystem\Filesystem::class,
'filesystem' => \Illuminate\Filesystem\FilesystemManager::class,
'filesystem.disk' => \Illuminate\Filesystem\FilesystemAdapter::class,
@ -148,7 +152,6 @@ namespace PHPSTORM_META {
'migration.creator' => \Illuminate\Database\Migrations\MigrationCreator::class,
'migration.repository' => \Illuminate\Database\Migrations\DatabaseMigrationRepository::class,
'migrator' => \Illuminate\Database\Migrations\Migrator::class,
'phpexcel' => \Maatwebsite\Excel\Classes\PHPExcel::class,
'queue' => \Illuminate\Queue\QueueManager::class,
'queue.connection' => \Illuminate\Queue\SyncQueue::class,
'queue.failer' => \Illuminate\Queue\Failed\DatabaseFailedJobProvider::class,
@ -185,6 +188,7 @@ namespace PHPSTORM_META {
'Illuminate\Contracts\Pipeline\Hub' => \Illuminate\Pipeline\Hub::class,
'Illuminate\Contracts\Queue\EntityResolver' => \Illuminate\Database\Eloquent\QueueEntityResolver::class,
'Illuminate\Contracts\Routing\ResponseFactory' => \Illuminate\Routing\ResponseFactory::class,
'Illuminate\Foundation\Mix' => \Illuminate\Foundation\Mix::class,
'Illuminate\Mail\Markdown' => \Illuminate\Mail\Markdown::class,
'Illuminate\Notifications\ChannelManager' => \Illuminate\Notifications\ChannelManager::class,
'Illuminate\Routing\Contracts\ControllerDispatcher' => \Illuminate\Routing\ControllerDispatcher::class,
@ -192,6 +196,10 @@ namespace PHPSTORM_META {
'Laracasts\Flash\SessionStore' => \Laracasts\Flash\LaravelSessionStore::class,
'League\OAuth2\Server\AuthorizationServer' => \League\OAuth2\Server\AuthorizationServer::class,
'League\OAuth2\Server\ResourceServer' => \League\OAuth2\Server\ResourceServer::class,
'Maatwebsite\Excel\Files\Filesystem' => \Maatwebsite\Excel\Files\Filesystem::class,
'Maatwebsite\Excel\Files\TemporaryFileFactory' => \Maatwebsite\Excel\Files\TemporaryFileFactory::class,
'Maatwebsite\Excel\Transactions\TransactionHandler' => \Maatwebsite\Excel\Transactions\DbTransactionHandler::class,
'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,
@ -218,7 +226,10 @@ namespace PHPSTORM_META {
'command.controller.make' => \Illuminate\Routing\Console\ControllerMakeCommand::class,
'command.down' => \Illuminate\Foundation\Console\DownCommand::class,
'command.environment' => \Illuminate\Foundation\Console\EnvironmentCommand::class,
'command.event.cache' => \Illuminate\Foundation\Console\EventCacheCommand::class,
'command.event.clear' => \Illuminate\Foundation\Console\EventClearCommand::class,
'command.event.generate' => \Illuminate\Foundation\Console\EventGenerateCommand::class,
'command.event.list' => \Illuminate\Foundation\Console\EventListCommand::class,
'command.event.make' => \Illuminate\Foundation\Console\EventMakeCommand::class,
'command.exception.make' => \Illuminate\Foundation\Console\ExceptionMakeCommand::class,
'command.factory.make' => \Illuminate\Database\Console\Factories\FactoryMakeCommand::class,
@ -243,6 +254,8 @@ namespace PHPSTORM_META {
'command.notification.make' => \Illuminate\Foundation\Console\NotificationMakeCommand::class,
'command.notification.table' => \Illuminate\Notifications\Console\NotificationTableCommand::class,
'command.observer.make' => \Illuminate\Foundation\Console\ObserverMakeCommand::class,
'command.optimize' => \Illuminate\Foundation\Console\OptimizeCommand::class,
'command.optimize.clear' => \Illuminate\Foundation\Console\OptimizeClearCommand::class,
'command.package.discover' => \Illuminate\Foundation\Console\PackageDiscoverCommand::class,
'command.policy.make' => \Illuminate\Foundation\Console\PolicyMakeCommand::class,
'command.preset' => \Illuminate\Foundation\Console\PresetCommand::class,
@ -286,12 +299,6 @@ namespace PHPSTORM_META {
'encrypter' => \Illuminate\Encryption\Encrypter::class,
'events' => \Illuminate\Events\Dispatcher::class,
'excel' => \Maatwebsite\Excel\Excel::class,
'excel.identifier' => \Maatwebsite\Excel\Classes\FormatIdentifier::class,
'excel.parsers.css' => \Maatwebsite\Excel\Parsers\CssParser::class,
'excel.parsers.view' => \Maatwebsite\Excel\Parsers\ViewParser::class,
'excel.reader' => \Maatwebsite\Excel\Readers\LaravelExcelReader::class,
'excel.readers.html' => \Maatwebsite\Excel\Readers\Html::class,
'excel.writer' => \Maatwebsite\Excel\Writers\LaravelExcelWriter::class,
'files' => \Illuminate\Filesystem\Filesystem::class,
'filesystem' => \Illuminate\Filesystem\FilesystemManager::class,
'filesystem.disk' => \Illuminate\Filesystem\FilesystemAdapter::class,
@ -307,7 +314,6 @@ namespace PHPSTORM_META {
'migration.creator' => \Illuminate\Database\Migrations\MigrationCreator::class,
'migration.repository' => \Illuminate\Database\Migrations\DatabaseMigrationRepository::class,
'migrator' => \Illuminate\Database\Migrations\Migrator::class,
'phpexcel' => \Maatwebsite\Excel\Classes\PHPExcel::class,
'queue' => \Illuminate\Queue\QueueManager::class,
'queue.connection' => \Illuminate\Queue\SyncQueue::class,
'queue.failer' => \Illuminate\Queue\Failed\DatabaseFailedJobProvider::class,
@ -344,6 +350,7 @@ namespace PHPSTORM_META {
'Illuminate\Contracts\Pipeline\Hub' => \Illuminate\Pipeline\Hub::class,
'Illuminate\Contracts\Queue\EntityResolver' => \Illuminate\Database\Eloquent\QueueEntityResolver::class,
'Illuminate\Contracts\Routing\ResponseFactory' => \Illuminate\Routing\ResponseFactory::class,
'Illuminate\Foundation\Mix' => \Illuminate\Foundation\Mix::class,
'Illuminate\Mail\Markdown' => \Illuminate\Mail\Markdown::class,
'Illuminate\Notifications\ChannelManager' => \Illuminate\Notifications\ChannelManager::class,
'Illuminate\Routing\Contracts\ControllerDispatcher' => \Illuminate\Routing\ControllerDispatcher::class,
@ -351,6 +358,10 @@ namespace PHPSTORM_META {
'Laracasts\Flash\SessionStore' => \Laracasts\Flash\LaravelSessionStore::class,
'League\OAuth2\Server\AuthorizationServer' => \League\OAuth2\Server\AuthorizationServer::class,
'League\OAuth2\Server\ResourceServer' => \League\OAuth2\Server\ResourceServer::class,
'Maatwebsite\Excel\Files\Filesystem' => \Maatwebsite\Excel\Files\Filesystem::class,
'Maatwebsite\Excel\Files\TemporaryFileFactory' => \Maatwebsite\Excel\Files\TemporaryFileFactory::class,
'Maatwebsite\Excel\Transactions\TransactionHandler' => \Maatwebsite\Excel\Transactions\DbTransactionHandler::class,
'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,
@ -377,7 +388,10 @@ namespace PHPSTORM_META {
'command.controller.make' => \Illuminate\Routing\Console\ControllerMakeCommand::class,
'command.down' => \Illuminate\Foundation\Console\DownCommand::class,
'command.environment' => \Illuminate\Foundation\Console\EnvironmentCommand::class,
'command.event.cache' => \Illuminate\Foundation\Console\EventCacheCommand::class,
'command.event.clear' => \Illuminate\Foundation\Console\EventClearCommand::class,
'command.event.generate' => \Illuminate\Foundation\Console\EventGenerateCommand::class,
'command.event.list' => \Illuminate\Foundation\Console\EventListCommand::class,
'command.event.make' => \Illuminate\Foundation\Console\EventMakeCommand::class,
'command.exception.make' => \Illuminate\Foundation\Console\ExceptionMakeCommand::class,
'command.factory.make' => \Illuminate\Database\Console\Factories\FactoryMakeCommand::class,
@ -402,6 +416,8 @@ namespace PHPSTORM_META {
'command.notification.make' => \Illuminate\Foundation\Console\NotificationMakeCommand::class,
'command.notification.table' => \Illuminate\Notifications\Console\NotificationTableCommand::class,
'command.observer.make' => \Illuminate\Foundation\Console\ObserverMakeCommand::class,
'command.optimize' => \Illuminate\Foundation\Console\OptimizeCommand::class,
'command.optimize.clear' => \Illuminate\Foundation\Console\OptimizeClearCommand::class,
'command.package.discover' => \Illuminate\Foundation\Console\PackageDiscoverCommand::class,
'command.policy.make' => \Illuminate\Foundation\Console\PolicyMakeCommand::class,
'command.preset' => \Illuminate\Foundation\Console\PresetCommand::class,
@ -445,12 +461,6 @@ namespace PHPSTORM_META {
'encrypter' => \Illuminate\Encryption\Encrypter::class,
'events' => \Illuminate\Events\Dispatcher::class,
'excel' => \Maatwebsite\Excel\Excel::class,
'excel.identifier' => \Maatwebsite\Excel\Classes\FormatIdentifier::class,
'excel.parsers.css' => \Maatwebsite\Excel\Parsers\CssParser::class,
'excel.parsers.view' => \Maatwebsite\Excel\Parsers\ViewParser::class,
'excel.reader' => \Maatwebsite\Excel\Readers\LaravelExcelReader::class,
'excel.readers.html' => \Maatwebsite\Excel\Readers\Html::class,
'excel.writer' => \Maatwebsite\Excel\Writers\LaravelExcelWriter::class,
'files' => \Illuminate\Filesystem\Filesystem::class,
'filesystem' => \Illuminate\Filesystem\FilesystemManager::class,
'filesystem.disk' => \Illuminate\Filesystem\FilesystemAdapter::class,
@ -466,7 +476,6 @@ namespace PHPSTORM_META {
'migration.creator' => \Illuminate\Database\Migrations\MigrationCreator::class,
'migration.repository' => \Illuminate\Database\Migrations\DatabaseMigrationRepository::class,
'migrator' => \Illuminate\Database\Migrations\Migrator::class,
'phpexcel' => \Maatwebsite\Excel\Classes\PHPExcel::class,
'queue' => \Illuminate\Queue\QueueManager::class,
'queue.connection' => \Illuminate\Queue\SyncQueue::class,
'queue.failer' => \Illuminate\Queue\Failed\DatabaseFailedJobProvider::class,
@ -503,6 +512,7 @@ namespace PHPSTORM_META {
'Illuminate\Contracts\Pipeline\Hub' => \Illuminate\Pipeline\Hub::class,
'Illuminate\Contracts\Queue\EntityResolver' => \Illuminate\Database\Eloquent\QueueEntityResolver::class,
'Illuminate\Contracts\Routing\ResponseFactory' => \Illuminate\Routing\ResponseFactory::class,
'Illuminate\Foundation\Mix' => \Illuminate\Foundation\Mix::class,
'Illuminate\Mail\Markdown' => \Illuminate\Mail\Markdown::class,
'Illuminate\Notifications\ChannelManager' => \Illuminate\Notifications\ChannelManager::class,
'Illuminate\Routing\Contracts\ControllerDispatcher' => \Illuminate\Routing\ControllerDispatcher::class,
@ -510,6 +520,10 @@ namespace PHPSTORM_META {
'Laracasts\Flash\SessionStore' => \Laracasts\Flash\LaravelSessionStore::class,
'League\OAuth2\Server\AuthorizationServer' => \League\OAuth2\Server\AuthorizationServer::class,
'League\OAuth2\Server\ResourceServer' => \League\OAuth2\Server\ResourceServer::class,
'Maatwebsite\Excel\Files\Filesystem' => \Maatwebsite\Excel\Files\Filesystem::class,
'Maatwebsite\Excel\Files\TemporaryFileFactory' => \Maatwebsite\Excel\Files\TemporaryFileFactory::class,
'Maatwebsite\Excel\Transactions\TransactionHandler' => \Maatwebsite\Excel\Transactions\DbTransactionHandler::class,
'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,
@ -536,7 +550,10 @@ namespace PHPSTORM_META {
'command.controller.make' => \Illuminate\Routing\Console\ControllerMakeCommand::class,
'command.down' => \Illuminate\Foundation\Console\DownCommand::class,
'command.environment' => \Illuminate\Foundation\Console\EnvironmentCommand::class,
'command.event.cache' => \Illuminate\Foundation\Console\EventCacheCommand::class,
'command.event.clear' => \Illuminate\Foundation\Console\EventClearCommand::class,
'command.event.generate' => \Illuminate\Foundation\Console\EventGenerateCommand::class,
'command.event.list' => \Illuminate\Foundation\Console\EventListCommand::class,
'command.event.make' => \Illuminate\Foundation\Console\EventMakeCommand::class,
'command.exception.make' => \Illuminate\Foundation\Console\ExceptionMakeCommand::class,
'command.factory.make' => \Illuminate\Database\Console\Factories\FactoryMakeCommand::class,
@ -561,6 +578,8 @@ namespace PHPSTORM_META {
'command.notification.make' => \Illuminate\Foundation\Console\NotificationMakeCommand::class,
'command.notification.table' => \Illuminate\Notifications\Console\NotificationTableCommand::class,
'command.observer.make' => \Illuminate\Foundation\Console\ObserverMakeCommand::class,
'command.optimize' => \Illuminate\Foundation\Console\OptimizeCommand::class,
'command.optimize.clear' => \Illuminate\Foundation\Console\OptimizeClearCommand::class,
'command.package.discover' => \Illuminate\Foundation\Console\PackageDiscoverCommand::class,
'command.policy.make' => \Illuminate\Foundation\Console\PolicyMakeCommand::class,
'command.preset' => \Illuminate\Foundation\Console\PresetCommand::class,
@ -604,12 +623,6 @@ namespace PHPSTORM_META {
'encrypter' => \Illuminate\Encryption\Encrypter::class,
'events' => \Illuminate\Events\Dispatcher::class,
'excel' => \Maatwebsite\Excel\Excel::class,
'excel.identifier' => \Maatwebsite\Excel\Classes\FormatIdentifier::class,
'excel.parsers.css' => \Maatwebsite\Excel\Parsers\CssParser::class,
'excel.parsers.view' => \Maatwebsite\Excel\Parsers\ViewParser::class,
'excel.reader' => \Maatwebsite\Excel\Readers\LaravelExcelReader::class,
'excel.readers.html' => \Maatwebsite\Excel\Readers\Html::class,
'excel.writer' => \Maatwebsite\Excel\Writers\LaravelExcelWriter::class,
'files' => \Illuminate\Filesystem\Filesystem::class,
'filesystem' => \Illuminate\Filesystem\FilesystemManager::class,
'filesystem.disk' => \Illuminate\Filesystem\FilesystemAdapter::class,
@ -625,7 +638,6 @@ namespace PHPSTORM_META {
'migration.creator' => \Illuminate\Database\Migrations\MigrationCreator::class,
'migration.repository' => \Illuminate\Database\Migrations\DatabaseMigrationRepository::class,
'migrator' => \Illuminate\Database\Migrations\Migrator::class,
'phpexcel' => \Maatwebsite\Excel\Classes\PHPExcel::class,
'queue' => \Illuminate\Queue\QueueManager::class,
'queue.connection' => \Illuminate\Queue\SyncQueue::class,
'queue.failer' => \Illuminate\Queue\Failed\DatabaseFailedJobProvider::class,
@ -662,6 +674,7 @@ namespace PHPSTORM_META {
'Illuminate\Contracts\Pipeline\Hub' => \Illuminate\Pipeline\Hub::class,
'Illuminate\Contracts\Queue\EntityResolver' => \Illuminate\Database\Eloquent\QueueEntityResolver::class,
'Illuminate\Contracts\Routing\ResponseFactory' => \Illuminate\Routing\ResponseFactory::class,
'Illuminate\Foundation\Mix' => \Illuminate\Foundation\Mix::class,
'Illuminate\Mail\Markdown' => \Illuminate\Mail\Markdown::class,
'Illuminate\Notifications\ChannelManager' => \Illuminate\Notifications\ChannelManager::class,
'Illuminate\Routing\Contracts\ControllerDispatcher' => \Illuminate\Routing\ControllerDispatcher::class,
@ -669,6 +682,10 @@ namespace PHPSTORM_META {
'Laracasts\Flash\SessionStore' => \Laracasts\Flash\LaravelSessionStore::class,
'League\OAuth2\Server\AuthorizationServer' => \League\OAuth2\Server\AuthorizationServer::class,
'League\OAuth2\Server\ResourceServer' => \League\OAuth2\Server\ResourceServer::class,
'Maatwebsite\Excel\Files\Filesystem' => \Maatwebsite\Excel\Files\Filesystem::class,
'Maatwebsite\Excel\Files\TemporaryFileFactory' => \Maatwebsite\Excel\Files\TemporaryFileFactory::class,
'Maatwebsite\Excel\Transactions\TransactionHandler' => \Maatwebsite\Excel\Transactions\DbTransactionHandler::class,
'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,
@ -695,7 +712,10 @@ namespace PHPSTORM_META {
'command.controller.make' => \Illuminate\Routing\Console\ControllerMakeCommand::class,
'command.down' => \Illuminate\Foundation\Console\DownCommand::class,
'command.environment' => \Illuminate\Foundation\Console\EnvironmentCommand::class,
'command.event.cache' => \Illuminate\Foundation\Console\EventCacheCommand::class,
'command.event.clear' => \Illuminate\Foundation\Console\EventClearCommand::class,
'command.event.generate' => \Illuminate\Foundation\Console\EventGenerateCommand::class,
'command.event.list' => \Illuminate\Foundation\Console\EventListCommand::class,
'command.event.make' => \Illuminate\Foundation\Console\EventMakeCommand::class,
'command.exception.make' => \Illuminate\Foundation\Console\ExceptionMakeCommand::class,
'command.factory.make' => \Illuminate\Database\Console\Factories\FactoryMakeCommand::class,
@ -720,6 +740,8 @@ namespace PHPSTORM_META {
'command.notification.make' => \Illuminate\Foundation\Console\NotificationMakeCommand::class,
'command.notification.table' => \Illuminate\Notifications\Console\NotificationTableCommand::class,
'command.observer.make' => \Illuminate\Foundation\Console\ObserverMakeCommand::class,
'command.optimize' => \Illuminate\Foundation\Console\OptimizeCommand::class,
'command.optimize.clear' => \Illuminate\Foundation\Console\OptimizeClearCommand::class,
'command.package.discover' => \Illuminate\Foundation\Console\PackageDiscoverCommand::class,
'command.policy.make' => \Illuminate\Foundation\Console\PolicyMakeCommand::class,
'command.preset' => \Illuminate\Foundation\Console\PresetCommand::class,
@ -763,12 +785,6 @@ namespace PHPSTORM_META {
'encrypter' => \Illuminate\Encryption\Encrypter::class,
'events' => \Illuminate\Events\Dispatcher::class,
'excel' => \Maatwebsite\Excel\Excel::class,
'excel.identifier' => \Maatwebsite\Excel\Classes\FormatIdentifier::class,
'excel.parsers.css' => \Maatwebsite\Excel\Parsers\CssParser::class,
'excel.parsers.view' => \Maatwebsite\Excel\Parsers\ViewParser::class,
'excel.reader' => \Maatwebsite\Excel\Readers\LaravelExcelReader::class,
'excel.readers.html' => \Maatwebsite\Excel\Readers\Html::class,
'excel.writer' => \Maatwebsite\Excel\Writers\LaravelExcelWriter::class,
'files' => \Illuminate\Filesystem\Filesystem::class,
'filesystem' => \Illuminate\Filesystem\FilesystemManager::class,
'filesystem.disk' => \Illuminate\Filesystem\FilesystemAdapter::class,
@ -784,7 +800,6 @@ namespace PHPSTORM_META {
'migration.creator' => \Illuminate\Database\Migrations\MigrationCreator::class,
'migration.repository' => \Illuminate\Database\Migrations\DatabaseMigrationRepository::class,
'migrator' => \Illuminate\Database\Migrations\Migrator::class,
'phpexcel' => \Maatwebsite\Excel\Classes\PHPExcel::class,
'queue' => \Illuminate\Queue\QueueManager::class,
'queue.connection' => \Illuminate\Queue\SyncQueue::class,
'queue.failer' => \Illuminate\Queue\Failed\DatabaseFailedJobProvider::class,
@ -821,6 +836,7 @@ namespace PHPSTORM_META {
'Illuminate\Contracts\Pipeline\Hub' => \Illuminate\Pipeline\Hub::class,
'Illuminate\Contracts\Queue\EntityResolver' => \Illuminate\Database\Eloquent\QueueEntityResolver::class,
'Illuminate\Contracts\Routing\ResponseFactory' => \Illuminate\Routing\ResponseFactory::class,
'Illuminate\Foundation\Mix' => \Illuminate\Foundation\Mix::class,
'Illuminate\Mail\Markdown' => \Illuminate\Mail\Markdown::class,
'Illuminate\Notifications\ChannelManager' => \Illuminate\Notifications\ChannelManager::class,
'Illuminate\Routing\Contracts\ControllerDispatcher' => \Illuminate\Routing\ControllerDispatcher::class,
@ -828,6 +844,10 @@ namespace PHPSTORM_META {
'Laracasts\Flash\SessionStore' => \Laracasts\Flash\LaravelSessionStore::class,
'League\OAuth2\Server\AuthorizationServer' => \League\OAuth2\Server\AuthorizationServer::class,
'League\OAuth2\Server\ResourceServer' => \League\OAuth2\Server\ResourceServer::class,
'Maatwebsite\Excel\Files\Filesystem' => \Maatwebsite\Excel\Files\Filesystem::class,
'Maatwebsite\Excel\Files\TemporaryFileFactory' => \Maatwebsite\Excel\Files\TemporaryFileFactory::class,
'Maatwebsite\Excel\Transactions\TransactionHandler' => \Maatwebsite\Excel\Transactions\DbTransactionHandler::class,
'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,
@ -854,7 +874,10 @@ namespace PHPSTORM_META {
'command.controller.make' => \Illuminate\Routing\Console\ControllerMakeCommand::class,
'command.down' => \Illuminate\Foundation\Console\DownCommand::class,
'command.environment' => \Illuminate\Foundation\Console\EnvironmentCommand::class,
'command.event.cache' => \Illuminate\Foundation\Console\EventCacheCommand::class,
'command.event.clear' => \Illuminate\Foundation\Console\EventClearCommand::class,
'command.event.generate' => \Illuminate\Foundation\Console\EventGenerateCommand::class,
'command.event.list' => \Illuminate\Foundation\Console\EventListCommand::class,
'command.event.make' => \Illuminate\Foundation\Console\EventMakeCommand::class,
'command.exception.make' => \Illuminate\Foundation\Console\ExceptionMakeCommand::class,
'command.factory.make' => \Illuminate\Database\Console\Factories\FactoryMakeCommand::class,
@ -879,6 +902,8 @@ namespace PHPSTORM_META {
'command.notification.make' => \Illuminate\Foundation\Console\NotificationMakeCommand::class,
'command.notification.table' => \Illuminate\Notifications\Console\NotificationTableCommand::class,
'command.observer.make' => \Illuminate\Foundation\Console\ObserverMakeCommand::class,
'command.optimize' => \Illuminate\Foundation\Console\OptimizeCommand::class,
'command.optimize.clear' => \Illuminate\Foundation\Console\OptimizeClearCommand::class,
'command.package.discover' => \Illuminate\Foundation\Console\PackageDiscoverCommand::class,
'command.policy.make' => \Illuminate\Foundation\Console\PolicyMakeCommand::class,
'command.preset' => \Illuminate\Foundation\Console\PresetCommand::class,
@ -922,12 +947,6 @@ namespace PHPSTORM_META {
'encrypter' => \Illuminate\Encryption\Encrypter::class,
'events' => \Illuminate\Events\Dispatcher::class,
'excel' => \Maatwebsite\Excel\Excel::class,
'excel.identifier' => \Maatwebsite\Excel\Classes\FormatIdentifier::class,
'excel.parsers.css' => \Maatwebsite\Excel\Parsers\CssParser::class,
'excel.parsers.view' => \Maatwebsite\Excel\Parsers\ViewParser::class,
'excel.reader' => \Maatwebsite\Excel\Readers\LaravelExcelReader::class,
'excel.readers.html' => \Maatwebsite\Excel\Readers\Html::class,
'excel.writer' => \Maatwebsite\Excel\Writers\LaravelExcelWriter::class,
'files' => \Illuminate\Filesystem\Filesystem::class,
'filesystem' => \Illuminate\Filesystem\FilesystemManager::class,
'filesystem.disk' => \Illuminate\Filesystem\FilesystemAdapter::class,
@ -943,7 +962,6 @@ namespace PHPSTORM_META {
'migration.creator' => \Illuminate\Database\Migrations\MigrationCreator::class,
'migration.repository' => \Illuminate\Database\Migrations\DatabaseMigrationRepository::class,
'migrator' => \Illuminate\Database\Migrations\Migrator::class,
'phpexcel' => \Maatwebsite\Excel\Classes\PHPExcel::class,
'queue' => \Illuminate\Queue\QueueManager::class,
'queue.connection' => \Illuminate\Queue\SyncQueue::class,
'queue.failer' => \Illuminate\Queue\Failed\DatabaseFailedJobProvider::class,
@ -980,6 +998,7 @@ namespace PHPSTORM_META {
'Illuminate\Contracts\Pipeline\Hub' => \Illuminate\Pipeline\Hub::class,
'Illuminate\Contracts\Queue\EntityResolver' => \Illuminate\Database\Eloquent\QueueEntityResolver::class,
'Illuminate\Contracts\Routing\ResponseFactory' => \Illuminate\Routing\ResponseFactory::class,
'Illuminate\Foundation\Mix' => \Illuminate\Foundation\Mix::class,
'Illuminate\Mail\Markdown' => \Illuminate\Mail\Markdown::class,
'Illuminate\Notifications\ChannelManager' => \Illuminate\Notifications\ChannelManager::class,
'Illuminate\Routing\Contracts\ControllerDispatcher' => \Illuminate\Routing\ControllerDispatcher::class,
@ -987,6 +1006,10 @@ namespace PHPSTORM_META {
'Laracasts\Flash\SessionStore' => \Laracasts\Flash\LaravelSessionStore::class,
'League\OAuth2\Server\AuthorizationServer' => \League\OAuth2\Server\AuthorizationServer::class,
'League\OAuth2\Server\ResourceServer' => \League\OAuth2\Server\ResourceServer::class,
'Maatwebsite\Excel\Files\Filesystem' => \Maatwebsite\Excel\Files\Filesystem::class,
'Maatwebsite\Excel\Files\TemporaryFileFactory' => \Maatwebsite\Excel\Files\TemporaryFileFactory::class,
'Maatwebsite\Excel\Transactions\TransactionHandler' => \Maatwebsite\Excel\Transactions\DbTransactionHandler::class,
'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,
@ -1013,7 +1036,10 @@ namespace PHPSTORM_META {
'command.controller.make' => \Illuminate\Routing\Console\ControllerMakeCommand::class,
'command.down' => \Illuminate\Foundation\Console\DownCommand::class,
'command.environment' => \Illuminate\Foundation\Console\EnvironmentCommand::class,
'command.event.cache' => \Illuminate\Foundation\Console\EventCacheCommand::class,
'command.event.clear' => \Illuminate\Foundation\Console\EventClearCommand::class,
'command.event.generate' => \Illuminate\Foundation\Console\EventGenerateCommand::class,
'command.event.list' => \Illuminate\Foundation\Console\EventListCommand::class,
'command.event.make' => \Illuminate\Foundation\Console\EventMakeCommand::class,
'command.exception.make' => \Illuminate\Foundation\Console\ExceptionMakeCommand::class,
'command.factory.make' => \Illuminate\Database\Console\Factories\FactoryMakeCommand::class,
@ -1038,6 +1064,8 @@ namespace PHPSTORM_META {
'command.notification.make' => \Illuminate\Foundation\Console\NotificationMakeCommand::class,
'command.notification.table' => \Illuminate\Notifications\Console\NotificationTableCommand::class,
'command.observer.make' => \Illuminate\Foundation\Console\ObserverMakeCommand::class,
'command.optimize' => \Illuminate\Foundation\Console\OptimizeCommand::class,
'command.optimize.clear' => \Illuminate\Foundation\Console\OptimizeClearCommand::class,
'command.package.discover' => \Illuminate\Foundation\Console\PackageDiscoverCommand::class,
'command.policy.make' => \Illuminate\Foundation\Console\PolicyMakeCommand::class,
'command.preset' => \Illuminate\Foundation\Console\PresetCommand::class,
@ -1081,12 +1109,6 @@ namespace PHPSTORM_META {
'encrypter' => \Illuminate\Encryption\Encrypter::class,
'events' => \Illuminate\Events\Dispatcher::class,
'excel' => \Maatwebsite\Excel\Excel::class,
'excel.identifier' => \Maatwebsite\Excel\Classes\FormatIdentifier::class,
'excel.parsers.css' => \Maatwebsite\Excel\Parsers\CssParser::class,
'excel.parsers.view' => \Maatwebsite\Excel\Parsers\ViewParser::class,
'excel.reader' => \Maatwebsite\Excel\Readers\LaravelExcelReader::class,
'excel.readers.html' => \Maatwebsite\Excel\Readers\Html::class,
'excel.writer' => \Maatwebsite\Excel\Writers\LaravelExcelWriter::class,
'files' => \Illuminate\Filesystem\Filesystem::class,
'filesystem' => \Illuminate\Filesystem\FilesystemManager::class,
'filesystem.disk' => \Illuminate\Filesystem\FilesystemAdapter::class,
@ -1102,7 +1124,6 @@ namespace PHPSTORM_META {
'migration.creator' => \Illuminate\Database\Migrations\MigrationCreator::class,
'migration.repository' => \Illuminate\Database\Migrations\DatabaseMigrationRepository::class,
'migrator' => \Illuminate\Database\Migrations\Migrator::class,
'phpexcel' => \Maatwebsite\Excel\Classes\PHPExcel::class,
'queue' => \Illuminate\Queue\QueueManager::class,
'queue.connection' => \Illuminate\Queue\SyncQueue::class,
'queue.failer' => \Illuminate\Queue\Failed\DatabaseFailedJobProvider::class,

File diff suppressed because it is too large Load diff

View file

@ -447,6 +447,7 @@ namespace App\Models{
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereTravelProgram($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereTreeRoot($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereUpdatedAt($value)
* @mixin \Eloquent
*/
class TravelPageGuide extends \Eloquent {}
}
@ -495,6 +496,9 @@ namespace App\Models{
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTreeNode whereUpdatedAt($value)
* @method static \Illuminate\Database\Query\Builder|\App\Models\IQContentTreeNode withTrashed()
* @method static \Illuminate\Database\Query\Builder|\App\Models\IQContentTreeNode withoutTrashed()
* @mixin \Eloquent
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\IQContentSite[] $iq_content_site
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\IQContentSite[] $iq_content_sites
*/
class IQContentTreeNode extends \Eloquent {}
}
@ -886,6 +890,14 @@ namespace App\Models{
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelGuide newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelGuide newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelGuide query()
* @property string|null $keyword
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\IQContentSite[] $iq_content_site
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelGuide whereKeyword($value)
* @property int|null $country_id
* @property string|null $box_image_url
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\IQContentSite[] $iq_content_sites
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelGuide whereBoxImageUrl($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelGuide whereCountryId($value)
*/
class TravelGuide extends \Eloquent {}
}
@ -930,6 +942,30 @@ namespace App\Models{
class Status extends \Eloquent {}
}
namespace App\Models{
/**
* App\Models\IQContentSite
*
* @property int $id
* @property int $tree_node_id
* @property int $travel_guide_id
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \App\Models\IQContentTreeNode $iq_content_tree_node
* @property-read \App\Models\TravelGuide $travel_guide
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentSite newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentSite newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentSite query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentSite whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentSite whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentSite whereTravelGuideId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentSite whereTreeNodeId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentSite whereUpdatedAt($value)
* @mixin \Eloquent
*/
class IQContentSite extends \Eloquent {}
}
namespace App\Models{
/**
* Class FewoPrice
@ -1692,6 +1728,11 @@ namespace App\Models{
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTree whereUpdatedAt($value)
* @method static \Illuminate\Database\Query\Builder|\App\Models\IQContentTree withTrashed()
* @method static \Illuminate\Database\Query\Builder|\App\Models\IQContentTree withoutTrashed()
* @mixin \Eloquent
* @property int|null $page_id
* @property int|null $root_id
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTree wherePageId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTree whereRootId($value)
*/
class IQContentTree extends \Eloquent {}
}

View file

@ -0,0 +1,171 @@
<?php
namespace App\Http\Controllers\API;
use App\Http\Controllers\Controller;
use App\Models\IQContentTree;
use App\Models\IQContentTreeNode;
use App\Models\TravelGuide;
class CMSContentController extends Controller
{
public $successStatus = 200;
public function search()
{
$request = \Request::all();
if(!isset($request['url']) || !isset($request['key'])){
return response()->json(['error' => "request no found"], $this->successStatus);
}
if($request['key'] != 'f6077389c9ce710e554763a5de02c8ec'){
return response()->json(['error' => "key"], 401);
}
$urlArray = explode('/', $request['url']);
$ret = [];
if(is_array($urlArray)){
//tree
$tree_identifier = array_shift($urlArray);
$tree = IQContentTree::whereIdentifier($tree_identifier)->first();
$travel_guide = null;
$url = "";
if($tree){
$lvl = 0;
$ret['tree'] = $tree->toArray();
$ret['navi'] = $this->makeNaviTree($tree, $urlArray, "", 0, false);
$url = "/".$tree->identifier;
$ret['bread_crumb'][$lvl] = [
'title' => $tree->name,
'url' => $url,
];
while (!empty($urlArray))
{
$tree_node_identifier = array_shift($urlArray);
$tree_node = IQContentTreeNode::whereTreeId($tree->id)->whereIdentifier($tree_node_identifier)->whereLvl($lvl)->whereActive(true)->first();
if($tree_node){
$url = $url."/".$tree_node->identifier;
$ret['bread_crumb'][$lvl] = [
'title' => $tree_node->name,
'url' => $url,
];
$ret['nodes'][$lvl] = $tree_node->toArray();
$lvl ++;
}else{
return response()->json(['error' => 'no-node'], $this->successStatus);
}
}
if(isset($ret['nodes']) && is_array($ret['nodes'])){
//sites
if($tree_node->iq_content_sites->count()){
foreach ($tree_node->iq_content_sites as $iq_content_site){
if(isset($iq_content_site->travel_guide) && $iq_content_site->travel_guide && $iq_content_site->travel_guide->active){
$ret['sites'][] = $iq_content_site->travel_guide->toArray();
/*if(!$travel_guide){
//$travel_guide = $iq_content_site->travel_guide;
}*/
}
}
}
//children
if($tree_node->iq_content_tree_node_childs->count()){
foreach ($tree_node->iq_content_tree_node_childs as $iq_content_tree_node_child){
if($iq_content_tree_node_child->active){
$travel_guide = $iq_content_tree_node_child->iq_content_site_first();
$ret['children'][] = [
'name' => $iq_content_tree_node_child->name,
'identifier' => $iq_content_tree_node_child->identifier,
'url' => "/".$iq_content_tree_node_child->getUri(),
'box_image_url' => $travel_guide ? $travel_guide->box_image_url : '',
'description' => $travel_guide ? $travel_guide->meta_description : '',
'active' => $travel_guide ? $travel_guide->active : false,
];
}
}
}
return response()->json(['success' => "node", "ret"=>$ret], $this->successStatus);
}else{
return response()->json(['error' => 'no-node'], $this->successStatus);
}
}else{
return response()->json(['error' => 'no-tree'], $this->successStatus);
}
}
return response()->json(['error' => "not-found"], $this->successStatus);
}
public function keywords(){
$request = \Request::all();
if(!isset($request['key'])){
return response()->json(['error' => "request no found"], $this->successStatus);
}
if($request['key'] != 'f6077389c9ce710e554763a5de02c8ec'){
return response()->json(['error' => "key"], 401);
}
$ret = [];
$travel_guides = TravelGuide::whereNotNull('keyword')->where('active', true)->get();
foreach ($travel_guides as $travel_guide){
$tree_node = $travel_guide->iq_content_tree_node_first();
if($tree_node){
$ret[$travel_guide->keyword] = $tree_node->getUri();
}
}
return response()->json(['success' => "node", "ret"=>$ret], $this->successStatus);
}
public function makeNaviTree(IQContentTree $iq_content_tree, $urlArray = [], $url = "", $lvl = 0, $parent_id = false)
{
$link = false;
if (!empty($urlArray[$lvl])) {
$link = ($urlArray[$lvl]);
}
if ($parent_id) {
$tree_nodes = IQContentTreeNode::where('tree_id', $iq_content_tree->id)->where('lvl', $lvl)->where('active', true)->where('parent_id', $parent_id)->orderBy('pos', 'ASC')->get();
} else {
$url = "/" . $iq_content_tree->identifier . "/";
$tree_nodes = IQContentTreeNode::where('tree_id', $iq_content_tree->id)->where('lvl', $lvl)->where('active', true)->orderBy('pos', 'ASC')->get();
}
$out = [];
foreach ($tree_nodes as $node) {
$children = IQContentTreeNode::where('tree_id', $iq_content_tree->id)->where('lvl', $lvl + 1)->where('active', true)->where('parent_id', $node->id)->count();
$out[] = [
'lvl' => $lvl,
'name' => $node->name,
'url' => $url . $node->identifier,
'active' => $link == $node->identifier ? true : false,
// 'children' => $this->makeNaviTree($iq_content_tree, $urlArray, $url . $node->identifier . "/", $lvl + 1, $node->id),
];
$tmp = [];
if ($children) {
$tmp = $this->makeNaviTree($iq_content_tree, $urlArray, $url . $node->identifier . "/", $lvl + 1, $node->id);
$out = array_merge($out, $tmp);
}
}
return $out;
}
}

View file

@ -348,13 +348,18 @@ class DraftController extends Controller
$this->option = $travel_option['name'];
$service = $this->replaceService($service);
/*
* if($travel_option['children'] < 1){
$travel_option['price_children'] = 0;
}
*/
$price_info_travel_options[] = [
'booking_id' => $data['booking_id'],
'travel_program_id' => $data['travel_program_id'],
'fewo_lodging_id' => null,
'travel_class_id' => null,
'draft_item_id' => null,
'draft_type_id' => 34,
'draft_type_id' => 41,
'request_date' => $data['request_date'],
'days_start' => null,
'days_duration' => null,

View file

@ -12,6 +12,7 @@ use App\User;
use Illuminate\Support\Facades\Mail;
use Input;
use Request;
use UniSharp\LaravelFilemanager\LaravelFilemanagerServiceProvider;
use Validator;
use DataTables;
@ -168,7 +169,7 @@ class AdminUserController extends Controller
return '<a href="' . route('admin_user_edit', [$user->id]) . '" class="btn icon-btn btn-sm btn-primary"><span class="far fa-edit"></span></a>';
})
->addColumn('admin', function (User $user) {
return '<a href="#" data-url="'.route('admin_user_load_modal', $user->id).'" data-data="'.$user->id.'" class="update_modal_data_show">'.HTMLHelper::getRoleLabel($user->admin).'</a>';
return '<a href="#" data-url="'.route('admin_user_load_modal', $user->id).'" data-data="'.$user->id.'" class="update_modal_data_show">'.HTMLHelper::getRoleLabel($user->admin, '<i class="fa fa-edit"></i> Rechte + ','').'</a>';
})
->addColumn('confirmed', function (User $user) {
return $user->confirmed ? '<span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>' : '<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>';

View file

@ -101,20 +101,21 @@ class BookingController extends Controller
if(isset($data['draft_item'])){
foreach ($data['draft_item'] as $booking_draft_item_id => $draft_item){
$di = BookingDraftItem::findOrFail($booking_draft_item_id);
$di->draft_type_id = $draft_item['draft_type_id'];
$di->start_date = $draft_item['start_date'];
$di->end_date = $draft_item['end_date'];
if(isset($draft_item['days_duration'])){
$di->days_duration = $draft_item['days_duration'];
}
if(isset($draft_item['price'])){
$di->price = $draft_item['price'];
}
$di->service = $draft_item['service'];
$di->in_pdf = isset($draft_item['in_pdf']) ? true : false;
$di->pos = $i++;
$di->save();
$BookingDraftItem = BookingDraftItem::findOrFail($booking_draft_item_id);
$draft_item['price_adult'] = isset($draft_item['price_adult']) ? $draft_item['price_adult'] : null;
$draft_item['adult'] = isset($draft_item['adult']) ? $draft_item['adult'] : null;
$draft_item['price_children'] = isset($draft_item['price_children']) ? $draft_item['price_children'] : null;
$draft_item['children'] = isset($draft_item['children']) ? $draft_item['children'] : null;
$draft_item['price'] = isset($draft_item['price']) ? $draft_item['price'] : null;
$draft_item['pos'] = $i++;
$draft_item['in_pdf'] = isset($draft_item['in_pdf']) ? true : false;
$BookingDraftItem->fill($draft_item);
$BookingDraftItem->save();
}
}
@ -151,6 +152,9 @@ class BookingController extends Controller
'comfort' => $comfort
]);
}
$booking->calculate_price_total();
if(strpos($data['action'], 'up_') !== false) {
$reId = intval(str_replace('up_', '', $data['action']));
$d_from = BookingDraftItem::findOrFail($reId);
@ -182,10 +186,12 @@ class BookingController extends Controller
public function draftItemDelete($id){
$boking_draft_item = BookingDraftItem::findOrFail($id);
$booking_id = $boking_draft_item->booking_id;
$booking = $boking_draft_item->booking;
$boking_draft_item->delete();
$booking->calculate_price_total();
\Session()->flash('alert-success', __('Eintrag gelöscht'));
return redirect(route('booking_detail', [$booking_id]));
return redirect(route('booking_detail', [$booking->id]));
}

View file

@ -32,7 +32,7 @@ class CMSContentController extends Controller
$data = [
'contents' => CMSContent::all()->sortByDesc('id')
];
return view('cms.content.index', $data);
return view('cms.content.all.index', $data);
}
@ -58,7 +58,7 @@ class CMSContentController extends Controller
$model->save();
}
\Session()->flash('alert-save', '1');
return redirect(route('cms_content'));
return redirect(route('cms_content_all'));
}
@ -74,7 +74,7 @@ class CMSContentController extends Controller
}else {
$value = CMSContent::find($data['id']);
}
$returnHTML = view("cms.content.modal", compact('data','value') )->render();
$returnHTML = view("cms.content.all.modal", compact('data','value') )->render();
}
}
@ -88,7 +88,7 @@ class CMSContentController extends Controller
$content = CMSContent::findOrFail($id);
$content->delete();
\Session()->flash('alert-success', __('Content gelöscht'));
return redirect(route('cms_content'));
return redirect(route('cms_content_all'));
}

View file

@ -0,0 +1,80 @@
<?php
namespace App\Http\Controllers\CMS;
use App\Http\Controllers\Controller;
use App\Models\CMSContent;
use App\Models\TravelCountry;
use App\Models\TravelNationality;
use Input;
use Request;
use Validator;
class CMSContentCountryController extends Controller
{
/*
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('admin');
}
public function index($step = false)
{
$data = [
'travel_countries' => TravelCountry::all(),
];
return view('cms.content.country.index', $data);
}
public function detail($id, $step = false)
{
$model = TravelCountry::findOrFail($id);
$id = $model->id;
$data = [
'model' => $model,
'id' => $id,
'step' => $step,
'travel_nationalities' => TravelNationality::where('active', true)->get(),
];
return view('cms.content.country.detail', $data);
}
public function store($id)
{
$data = Input::all();
$model = TravelCountry::findOrFail($id);
$model->fill($data);
$model->save();
//travel_nationality_requirement
if (isset($data['travel_nationality_requirement'])) {
foreach ($data['travel_nationality_requirement'] as $travel_nationality_id => $text) {
$model->setNationalityRequirement($travel_nationality_id, $text);
}
}
//TODO for this time
if ($data['action'] == 'contact') {
//we need an update in the old CRM v1 system DB
$tc = \App\Models\Sym\TravelCountry::findOrFail($model->crm_id);
$tc->fill($data);
$tc->save();
}
\Session()->flash('alert-save', '1');
return redirect(route('cms_content_country_detail', [$model->id, $data['action']]));
}
}

View file

@ -72,7 +72,7 @@ class CMSTravelGuideController extends Controller
}
if(Input::get('clean') == "true"){
$model->full_text = $this->cleanHTML($model->full_text);
$model->full_text = \App\Services\Util::cleanHTML($model->full_text);
}
@ -84,52 +84,8 @@ class CMSTravelGuideController extends Controller
}
public function cleanHTML($html)
{
$html = str_replace('font-size: 14px;', ' ', $html);
$html = str_replace('font-weight: lighter; ', ' ', $html);
$html = str_replace('font-family: Helvetica, Arial, sans-serif; ', ' ', $html);
$html = str_replace('font-family: Verdana, sans-serif; ', ' ', $html);
$html = str_replace('color: rgb(60, 60, 60); ', ' ', $html);
$html = str_replace(' style=" padding: 0px; margin-right: 0px; margin-left: 0px; margin-bottom: 20px !important; line-height: 20px !important;"', ' ', $html);
$html = str_replace('property="article"', ' ', $html);
$html = str_replace('&nbsp;', ' ', $html);
$html = str_replace('https://www.aegypten-online.de', 'https://www.sterntours.de', $html);
$dom = new \DOMDocument('1.0', 'utf-8');
@$dom->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'));
$removeFullTags = ['span', 'a'];
foreach ($removeFullTags as $removeFullTag){
$domElemsToRemove = [];
$elements = $dom->getElementsByTagName($removeFullTag);
foreach ($elements as $element) {
$domElemsToRemove[] = $element;
}
foreach ($domElemsToRemove as $domElem) {
if($removeFullTag == 'span' && strpos($domElem->getAttribute('style'), 'font-weight: 700') !== false){
$new_node = $dom->createTextNode("<strong>".$domElem->nodeValue."</strong>");
}else{
$new_node = $dom->createTextNode($domElem->nodeValue);
}
$domElem->parentNode->replaceChild($new_node, $domElem);
}
}
$removeStyleTags = ['ul', 'li', 'h1', 'h2', 'br'];
foreach ($removeStyleTags as $removeStyleTag){
$elements = $dom->getElementsByTagName($removeStyleTag);
foreach ($elements as $element) {
$element->removeAttribute('style');
}
}
$html = $dom->saveHTML();
return $html;
}
public function pageDetail($id)
{
if($id == "new") {

View file

@ -0,0 +1,20 @@
<?php
namespace App\Http\Controllers\IQ;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use IqContent\LaravelFilemanager\Controllers\LfmController;
class ContentAssetController extends LfmController
{
public function index()
{
$data = [
'models' => [],
];
return view('iq.content.assets.index', $data)->withHelper($this->helper);
}
}

View file

@ -51,6 +51,10 @@ class ContentModalController extends Controller
case 'tree' :
$ret = $this->loadModal($data);
break;
case 'guide' :
$ret = $this->loadModal($data);
break;
}
}
return response()->json(['response' => $data, 'html'=>$ret]);
@ -89,6 +93,10 @@ class ContentModalController extends Controller
return $this->actionTreeSiteContent($data);
break;
case 'guide-tree-site' :
return $this->actionGuideTreeSite($data);
break;
}
}
@ -271,4 +279,38 @@ class ContentModalController extends Controller
return view("iq.modal.site", compact('data','value', 'url') )->render();
}
private function actionGuideTreeSite($data)
{
if(!isset($data['tree_id'])){
$value = new Collection();
$value->active = true;
$value->id = 'add';
$data['travel_guide_id'] = $data['request']['travel_guide_id'];
$data['title'] = "Tree zuordnen";
$url = route('cms_travel_guide_detail', [$data['request']['travel_guide_id']]);
}else {
$value = new Collection();
$value->active = true;
$value->id = $data['id'];
$data['title'] = "Tree zuordnen";
if(isset($data['tree_id'])){
}
$url = route('iq_content_tree_detail', [$data['tree_id']]);
}
$data['request'] = false;
return view("iq.modal.tree_site", compact('data','value', 'url') )->render();
}
}

View file

@ -4,12 +4,14 @@ namespace App\Http\Controllers\IQ;
use App\Http\Controllers\Controller;
use App\Models\IQContentSite;
use App\Models\IQContentTree;
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 Validator;
@ -38,14 +40,14 @@ class ContentTreeController extends Controller
}
public function detail($id, $node_id = false, $area_section_id = false)
public function detail($id, $node_id = false, $section_id = false)
{
$model = IQContentTree::findOrFail($id);
$tree_node = IQContentTreeNode::find($node_id);
$area_section = false;
$site_fields = false;
if($area_section_id){
if($section_id){
/*
* $area_section = IQContentAreaSection::findOrFail($area_section_id);
$site_fields = $this->contentSiteRepo->siteFieldPrepare($tree_node->iq_content_site, $area_section);
@ -53,16 +55,20 @@ class ContentTreeController extends Controller
}
$data = [
'model' => $model,
'area_section' => $area_section,
'site_fields' => $site_fields,
'tree_node' => $tree_node,
'id' => $id,
'section' => false,
];
return view('cms.travel_guide.tree-detail', $data);
}
public function repair($id=1){
die();
$model = IQContentTree::findOrFail($id);
$travel_guide_pages = TravelPageGuide::getPageGuides($model->root_id);
$page_parent_id = [];
@ -92,7 +98,10 @@ class ContentTreeController extends Controller
'meta_title' => $guide_page->pagetitle,
'meta_description' => $description,
'meta_keywords' => $keywords,
];
'country_id' => $guide_page->country_id,
'box_image_url' => $guide_page->box_image_url,
];
$TravelGuide = TravelGuide::create($data);
@ -122,14 +131,12 @@ class ContentTreeController extends Controller
$tree_node = IQContentTreeNode::create($tree_data);
$TravelGuide->tree_node_id = $tree_node->id;
$TravelGuide->save();
IQContentSite::create(['tree_node_id'=>$tree_node->id, 'travel_guide_id'=>$TravelGuide->id]);
if($guide_page->travel_guide_content_id > 0){
$TravelGuide = TravelGuide::find($guide_page->travel_guide_content_id);
if($TravelGuide){
$TravelGuide->tree_node_id = $tree_node->id;
$TravelGuide->save();
IQContentSite::create(['tree_node_id'=>$tree_node->id, 'travel_guide_id'=>$TravelGuide->id]);
}
}
@ -137,10 +144,30 @@ class ContentTreeController extends Controller
die("--");
}
public function store($id, $node_id = false, $area_section_id = false)
{
$data = Input::all();
//new sort
//from ajax
if(isset($data['action'])){
//set node active on off
if($data['action'] == 'node-set-active'){
//$model = IQContentTree::findOrFail($id);
$tree_node = IQContentTreeNode::findOrFail($node_id);
if($tree_node->active){
$tree_node->active = false;
}else{
$tree_node->active = true;
}
$tree_node->save();
return response()->json(['success' => 'tree-node-active', 'data'=>$tree_node->active], 200);
}
}
//new sort / save nestable
if(isset($data['nestable-output'])){
$model = IQContentTree::findOrFail($id);
$model->updated_at = now();
@ -150,17 +177,19 @@ class ContentTreeController extends Controller
\Session()->flash('alert-save', '1');
return redirect(route('iq_content_tree_detail', [$model->id]));
}
if(isset($data['iq_content_site_field']) && is_array($data['iq_content_site_field'])){
$model = IQContentTree::findOrFail($id);
$model->updated_at = now();
$model->save();
$this->contentSiteRepo->storeContentSideFields($data['iq_content_site_field']);
\Session()->flash('alert-save', '1');
return redirect(route('iq_content_tree_detail', [$model->id, $node_id, $area_section_id]));
}
$rules = array(
'name' => 'required',
);
@ -214,27 +243,52 @@ class ContentTreeController extends Controller
$model->save();
$tree_node = IQContentTreeNode::findOrFail($node_id);
// $tree_node->site_id = $contentSite->id;
$tree_node->save();
$travel_guide = TravelGuide::findOrFail($data['travel_guide_id']);
$travel_guide->tree_node_id = $tree_node->id;
$travel_guide->save();
\Session()->flash('alert-save', '1');
if(IQContentSite::whereTreeNodeId($tree_node->id)->whereTravelGuideId($travel_guide->id)->count() == 0){
IQContentSite::create(['tree_node_id'=>$tree_node->id, 'travel_guide_id'=>$travel_guide->id]);
\Session()->flash('alert-save', '1');
}else{
\Session()->flash('alert-error', 'Eintrag schon vorhanden');
}
return redirect(route('iq_content_tree_detail', [$id, $node_id]));
break;
case 'guide-tree-site' :
$model = IQContentTree::findOrFail($id);
$model->updated_at = now();
$model->save();
$tree_node = IQContentTreeNode::findOrFail($data['tree_node_id']);
$travel_guide = TravelGuide::findOrFail($data['travel_guide_id']);
if(IQContentSite::whereTreeNodeId($tree_node->id)->whereTravelGuideId($travel_guide->id)->count() == 0){
IQContentSite::create(['tree_node_id'=>$tree_node->id, 'travel_guide_id'=>$travel_guide->id]);
\Session()->flash('alert-save', '1');
}else{
\Session()->flash('alert-error', 'Eintrag schon vorhanden');
}
return redirect(route('cms_travel_guide_detail', [$travel_guide->id]));
break;
}
}
}
public function remove($id, $node_id, $travel_guide_id){
public function removeSite($id, $node_id, $travel_guide_id, $r=false){
$model = IQContentTree::findOrFail($id);
$tree_node = IQContentTreeNode::findOrFail($node_id);
$tavel_guide = TravelGuide::findOrFail($travel_guide_id);
$tavel_guide->tree_node_id = null;
$tavel_guide->save();
$iq_content_site = IQContentSite::whereTreeNodeId($node_id)->whereTravelGuideId($travel_guide_id)->first();
$iq_content_site->delete();
\Session()->flash('alert-success', __('Seite aus Tree entfernt.'));
if($r == "g"){
return redirect(route('cms_travel_guide_detail', [$travel_guide_id]));
}
return redirect(route('iq_content_tree_detail', [$id, $node_id]));

View file

@ -0,0 +1,322 @@
<?php
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 Validator;
class ContentLinkController extends Controller
{
private $tree = [];
/**
* ContentSiteController constructor.
*/
public function __construct()
{
// $this->middleware('auth');
}
/**
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function index()
{
$data = [
'text' => "",
'values' => [],
];
return view('iq.tools.links', $data);
}
public function store()
{
die("nothing to set");
//$this->readNodeAndSaveToTree();
//$this->cleanTextTravelGuide();
//$this->h1ToTitleTravelGuide();
}
public function h1ToTitleTravelGuide()
{
$TravelGuides = TravelGuide::all();
foreach ($TravelGuides as $travelGuide){
if(strpos($travelGuide->full_text,'<html><body><h1>' )){
$dom = new \DOMDocument('1.0', 'utf-8');
@$dom->loadHTML(mb_convert_encoding($travelGuide->full_text, 'HTML-ENTITIES', 'UTF-8'));
$elements = $dom->getElementsByTagName('h1');
foreach ($elements as $element) {
if($element->nodeValue != ""){
var_dump($travelGuide->id);
var_dump($element->nodeValue);
echo "<br>";
var_dump($travelGuide->name);
echo "<br>";
echo "--";
echo "<br>";
$new_text = preg_replace('/<h1[^>]*>([\s\S]*?)<\/h1[^>]*>/', '', $travelGuide->full_text);
$travelGuide->name = $element->nodeValue;
$travelGuide->full_text = $new_text;
$travelGuide->save();
}
}
}
}
die("done");
}
public function cleanTextTravelGuide()
{
$TravelGuides = TravelGuide::all();
foreach ($TravelGuides as $travelGuide){
$new_text = \App\Services\Util::cleanHTML($travelGuide->full_text);
if(strcmp($travelGuide->full_text, $new_text) != 0){
$travelGuide->full_text = $new_text;
$travelGuide->save();
var_dump($travelGuide->id);
echo "<br>";
}
}
die("done");
}
public function readNodeAndSaveToTree(){
$input = Input::all();
$ret = [];
if(isset($input['text'])){
$out = $this->ul_to_array($input['text']);
$this->array_to_nodes($out);
}
die("done");
$data = [
'text' => $input['text'],
'values' => $ret,
];
return view('iq.tools.links', $data);
}
public function array_to_nodes($array, $lvl = 1, $parent_id = 1, $pos=100){
if(is_array($array)){
foreach ($array as $node){
if(isset($node['slug'])){
$slug = substr($node['slug'], 0, 80);
// $slug = substr($node['slug'], 0, strrpos($slug, " "));
$name = substr($node['name'], 0, 255);
// $name = substr($node['name'], 0, strrpos($name, " "));
$data = [
'tree_id' => 1,
'parent_id' => $parent_id,
'lvl' => $lvl,
'name' => $name,
'identifier' => $slug,
'active' => false,
'pos' => $pos++,
];
$tree_node = IQContentTreeNode::create($data);
$travel_guides = TravelGuide::whereSlug($node['slug'])->get();
foreach ($travel_guides as $travel_guide){
if(IQContentSite::whereTreeNodeId($tree_node->id)->whereTravelGuideId($travel_guide->id)->count() == 0) {
IQContentSite::create(['tree_node_id' => $tree_node->id, 'travel_guide_id' => $travel_guide->id]);
}
}
}
if(isset($node['children']) && is_array($node['children'])){
$this->array_to_nodes($node['children'], $lvl + 1, $tree_node->id, $pos);
}
}
}
}
public function ul_to_array($ol){
if(is_string($ol)){
if(!$ol = simplexml_load_string($ol)) {
trigger_error("Syntax error in UL/LI structure");
return FALSE;
}
return $this->ul_to_array($ol);
} else if(is_object($ol)){
$output = array();
foreach($ol->li as $li){
$tmp = false;
if(isset($li->ol)){
$tmp = $this->ul_to_array($li->ol);
}
if($li->count()){
$str = (string) $li;
$a = new \SimpleXMLElement($li->children()->asXML());
$str = (string) $a[0]." ".$str;
$str = str_replace("\n", "", $str);
$str = str_replace("\r", "", $str);
$str = str_replace("\t", "", $str);
$str = preg_replace(array('/\s{2,}/', '/[\t\n]/'), ' ', $str);
if(trim($str) !== "" && $str !== null){
$slug = (string) $a['href'];
$link = explode("/", $slug);
$link1 = array_pop($link);
$link1 = str_replace('.htm', '',$link1);
$output[] = ['slug'=> $link1, 'name'=>$str, 'children'=>$tmp];
}
}else{
$str = (string) $li;
$str = str_replace("\n", "", $str);
$str = str_replace("\r", "", $str);
$str = str_replace("\t", "", $str);
if(trim($str) !== "" && $str !== null){
$output[] = ['slug'=>'', 'name'=>$str, 'children'=>$tmp];
}
}
}
return $output;
} else {
return FALSE;
}
}
/**
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function rindex()
{
$data = [
'text' => "",
'values' => [],
];
return view('iq.content.tools.redirects', $data);
}
public function rstore()
{
$iqContentTree = IQContentTree::find(2);
$this->makeTree($iqContentTree);
$input = Input::all();
$ret = [];
if(isset($input['text'])){
$dom = new \DOMDocument('1.0', 'utf-8');
@$dom->loadHTML(mb_convert_encoding($input['text'], 'HTML-ENTITIES', 'UTF-8'));
$tags = ['ol'];
foreach ($tags as $tag){
$domElements = [];
$elements = $dom->getElementsByTagName($tag)->item(0);
foreach($elements as $node){
foreach($node->childNodes as $child) {
$ret[] = array($child->nodeName => $child->nodeValue);
}
}
}
/* $tags = ['a']; foreach ($tags as $tag){
$domElements = [];
$elements = $dom->getElementsByTagName($tag);
foreach ($elements as $element) {
$domElements[] = $element;
}
foreach ($domElements as $domElement) {
$r = "-----";
$href = $domElement->getAttribute('href');
$link = explode("/", $href);
$link1 = array_pop($link);
$link1 = str_replace('.html', '',$link1);
$link1 = str_replace('-', '',$link1);
if(isset($this->tree[$link1])){
$r = $this->tree[$link1];
}else{
$link1 = array_pop($link);
$link1 = str_replace('.html', '',$link1);
$link1 = str_replace('-', '',$link1);
if(isset($this->tree[$link1])){
$r = $this->tree[$link1];
}
}
$ret[] = "Redirect 301 /".$href." ".$r;
}
}*/
}
$data = [
'text' => $input['text'],
'values' => $ret,
];
return view('iq.content.tools.redirects', $data);
}
public function makeTree(IQContentTree $iq_content_tree, $lvl = 0, $parent_id = false, $url = "")
{
if ($parent_id) {
//where('active', true)
$tree_nodes = IQContentTreeNode::where('tree_id', $iq_content_tree->id)->where('lvl', $lvl)->where('active', true)->where('parent_id', $parent_id)->orderBy('pos', 'ASC')->get();
} else {
$url = "/" . $iq_content_tree->identifier . "/";
$tree_nodes = IQContentTreeNode::where('tree_id', $iq_content_tree->id)->where('lvl', $lvl)->where('active', true)->orderBy('pos', 'ASC')->get();
}
foreach ($tree_nodes as $node) {
$children = IQContentTreeNode::where('tree_id', $iq_content_tree->id)->where('lvl', $lvl + 1)->where('active', true)->where('parent_id', $node->id)->count();
$this->tree[str_replace('-', '', $node->identifier)] = url($url . $node->identifier);
if ($children) {
$this->makeTree($iq_content_tree, $lvl + 1, $node->id, $url . $node->identifier . "/");
}
}
return true;
}
}

View file

@ -70,7 +70,7 @@ class TravelCountryController extends Controller
}
}
//TODO for this thime
//TODO for this time
//we need an update in the old CRM v1 system DB
$tc = \App\Models\Sym\TravelCountry::find($model->crm_id);
if(!$tc){

View file

@ -129,7 +129,49 @@ class Booking extends Model
}
public function calculate_price_total()
{
$travel_draft_item = false;
$travel_price_adult = 0;
$travel_price_children = 0;
$total_adult = 0;
$total_children = 0;
foreach ($this->booking_draft_items as $booking_draft_item) {
//24 Rundreise
if($booking_draft_item->draft_type_id == 24){
$travel_draft_item = $booking_draft_item;
continue;
}
$prices = $booking_draft_item->getItemPrice();
//Grundpreis Reise
if($booking_draft_item->draft_type_id == 30){
$travel_price_adult += $prices['adult'];
$travel_price_children += $prices['children'];
}
$total_adult += $prices['adult'];
$total_children += $prices['children'];
}
if($travel_draft_item){
$travel_draft_item->setPriceAdultRaw($travel_price_adult);
$travel_draft_item->setPriceChildrenRaw($travel_price_children);
$travel_draft_item->save();
}
$this->price = $total_adult + $total_children;
$this->save();
}
public function _format_number($value){
return preg_replace("/[^0-9,]/", "", $value);
}
public function getPriceAttribute()
{
// 2 = decimal places | '.' = decimal seperator | ',' = thousand seperator
return number_format(($this->attributes['price']), 2, ',', '.');
}
public function findBeforeDraftItemRelation($reid)
{

View file

@ -114,6 +114,32 @@ class BookingDraftItem extends Model
return $this->belongsTo('App\Models\DraftType', 'draft_type_id');
}
public function getItemPrice(){
$adult = 0;
$children = 0;
$days_duration = 1;
if(isset($this->attributes['days_duration']) && in_array($this->draft_type_id, [36, 37])){
$days_duration = intval($this->days_duration);
}
if(isset($this->attributes['adult'])){
$adult = $this->attributes['price_adult'] * $this->attributes['adult'] * $days_duration;
}
if(isset($this->attributes['children'])){
$children = $this->attributes['price_children'] * $this->attributes['children'] * $days_duration;
}
/*
if(in_array($this->draft_type_id, [38, 39,40])){
$days_duration = $this->days_duration;
$price = $this->price;
}
*/
return ['adult'=>$adult, 'children'=>$children];
}
public function _format_number($value){
return preg_replace("/[^0-9,]/", "", $value);
}
@ -141,21 +167,66 @@ class BookingDraftItem extends Model
}
}
//price_adult
public function setPriceAdultAttribute($value)
{
$value = $this->_format_number($value);
$this->attributes['price_adult'] = floatval(str_replace(',', '.', $value));
}
public function getPriceAdultAttribute()
{
// 2 = decimal places | '.' = decimal seperator | ',' = thousand seperator
return number_format(($this->attributes['price_adult']), 2, ',', '.');
}
public function getPriceAdultRaw()
{
return isset($this->attributes['price_adult']) ? $this->attributes['price_adult'] : 0;
}
public function setPriceAdultRaw($value)
{
return $this->attributes['price_adult'] = $value;
}
//price_children
public function setPriceChildrenAttribute($value)
{
$value = $this->_format_number($value);
$this->attributes['price_children'] = floatval(str_replace(',', '.', $value));
}
public function getPriceChildrenAttribute()
{
// 2 = decimal places | '.' = decimal seperator | ',' = thousand seperator
return number_format(($this->attributes['price_children']), 2, ',', '.');
}
public function getPriceChildrenRaw()
{
return isset($this->attributes['price_children']) ? $this->attributes['price_children'] : 0;
}
public function setPriceChildrenRaw($value)
{
return $this->attributes['price_children'] = $value;
}
//price
public function setPriceAttribute($value)
{
$value = $this->_format_number($value);
$this->attributes['price'] = floatval(str_replace(',', '.', $value));
}
public function getPriceAttribute()
{
// 2 = decimal places | '.' = decimal seperator | ',' = thousand seperator
return number_format(($this->attributes['price']), 2, ',', '.');
}
public function getPriceRaw()
{
return isset($this->attributes['price']) ? $this->attributes['price'] : 0;
}
public function setPriceRaw($value)
{
return $this->attributes['price'] = $value;
}
}

View file

@ -51,7 +51,7 @@ class CMSContent extends Model
protected $table = 'c_m_s_contents';
protected $fillable = [
'name', 'field', 'text', 'full_text', 'integer', 'decimal',
'name', 'slug', 'field', 'text', 'full_text', 'integer', 'decimal',
];
public function sluggable()

View file

@ -57,11 +57,10 @@ class DraftItem extends Model
protected $table = 'draft_items';
protected $fillable = [
'pos',
'pos'
];
public function draft()
{
return $this->belongsTo('App\Models\Draft', 'draft_id');

View file

@ -0,0 +1,47 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* App\Models\IQContentSite
*
* @property int $id
* @property int $tree_node_id
* @property int $travel_guide_id
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property-read \App\Models\IQContentTreeNode $iq_content_tree_node
* @property-read \App\Models\TravelGuide $travel_guide
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentSite newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentSite newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentSite query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentSite whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentSite whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentSite whereTravelGuideId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentSite whereTreeNodeId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentSite whereUpdatedAt($value)
* @mixin \Eloquent
*/
class IQContentSite extends Model
{
protected $connection = 'mysql_stern';
protected $table = 'i_q_content_sites';
protected $fillable = [
'tree_node_id', 'travel_guide_id',
];
public function iq_content_tree_node()
{
return $this->belongsTo('App\Models\IQContentTreeNode', 'tree_node_id');
}
public function travel_guide()
{
return $this->belongsTo('App\Models\TravelGuide', 'travel_guide_id');
}
}

View file

@ -43,6 +43,10 @@ use Illuminate\Support\Str;
* @method static \Illuminate\Database\Query\Builder|\App\Models\IQContentTree withTrashed()
* @method static \Illuminate\Database\Query\Builder|\App\Models\IQContentTree withoutTrashed()
* @mixin \Eloquent
* @property int|null $page_id
* @property int|null $root_id
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTree wherePageId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTree whereRootId($value)
*/
class IQContentTree extends Model
{
@ -83,4 +87,29 @@ class IQContentTree extends Model
}
}
public static function getTreesOptions($id = false, $html = true, $choose = true) {
$values = [];
$ret = "";
$models = IQContentTree::where('active', 1)->get();
if($html) {
if($choose){
$ret .= '<option value="">Bitte wählen</option>\n';
}
foreach ($models as $model) {
$attr = ($model->id == $id) ? ' selected="selected"' : '';
$ret .= '<option value="' . $model->id . '"' . $attr . '>' . $model->name . '</option>\n';
}
return $ret;
}else{
foreach ($models as $model) {
$values[$model->id] = $model->name;
}
return $values;
}
return false;
}
}

View file

@ -51,6 +51,8 @@ use Illuminate\Support\Str;
* @method static \Illuminate\Database\Query\Builder|\App\Models\IQContentTreeNode withTrashed()
* @method static \Illuminate\Database\Query\Builder|\App\Models\IQContentTreeNode withoutTrashed()
* @mixin \Eloquent
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\IQContentSite[] $iq_content_site
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\IQContentSite[] $iq_content_sites
*/
class IQContentTreeNode extends Model
{
@ -59,7 +61,6 @@ class IQContentTreeNode extends Model
protected $connection = 'mysql_stern';
protected $dates = ['deleted_at'];
protected $table = 'i_q_content_tree_nodes';
@ -91,12 +92,21 @@ class IQContentTreeNode extends Model
public function iq_content_tree_node_childs()
{
return $this->hasMany('App\Models\IQContentTreeNode', 'parent_id', 'id');
return $this->hasMany('App\Models\IQContentTreeNode', 'parent_id', 'id')->orderBy('pos', 'ASC');
}
public function travel_guides()
public function iq_content_sites()
{
return $this->hasMany('App\Models\TravelGuide', 'tree_node_id', 'id');
return $this->hasMany('App\Models\IQContentSite', 'tree_node_id', 'id');
}
public function iq_content_site_first()
{
foreach ($this->iq_content_sites as $iq_content_site) {
if (isset($iq_content_site->travel_guide) && $iq_content_site->travel_guide->active) {
return $iq_content_site->travel_guide;
}
}
}
@ -122,6 +132,30 @@ class IQContentTreeNode extends Model
return $ret.$node_parent->identifier."/";
}
}
public static function getTreeNodeOptions($tree_id, $id = false, $html = true, $choose = true) {
$values = [];
$ret = "";
$models = IQContentTreeNode::where('tree_id', $tree_id)->where('active', 1)->get();
if($html) {
if($choose){
$ret .= '<option value="">Bitte wählen</option>\n';
}
foreach ($models as $model) {
$attr = ($model->id == $id) ? ' selected="selected"' : '';
$ret .= '<option value="' . $model->id . '"' . $attr . '>' . $model->name . '</option>\n';
}
return $ret;
}else{
foreach ($models as $model) {
$values[$model->id] = $model->name;
}
return $values;
}
return false;
}
//
}

View file

@ -31,7 +31,13 @@ class TravelCountry extends Model
protected $fillable = [
'name',
'is_customer_country',
'active_backend'
'active_backend',
'contact_headline',
'contact_text_1',
'contact_text_2',
'contact_text_3',
'contact_text_4',
'contact_footer',
];

View file

@ -3,6 +3,7 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
/**
* App\Models\TravelCountry
@ -47,7 +48,16 @@ class TravelCountry extends Model
protected $fillable = [
'name',
'slug',
'html_information',
'text_before',
'text_after',
'contact_headline',
'contact_text_1',
'contact_text_2',
'contact_text_3',
'contact_text_4',
'contact_footer',
'entry_requirements',
'is_customer_country',
'active_frontend',
@ -72,6 +82,13 @@ class TravelCountry extends Model
return $this->hasMany('App\Models\TravelNationalityRequirement', 'travel_country_id', 'id');
}
public function setSlugAttribute( $value ) {
if(!isset($value) || $value == ""){
$this->attributes['slug'] = Str::slug(pre_slug($this->name), '-');
}else{
$this->attributes['slug'] = Str::slug(pre_slug($value), '-');
}
}
public function getNationalityRequirement($travel_nationality_id){

View file

@ -39,6 +39,14 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelGuide newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelGuide newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelGuide query()
* @property string|null $keyword
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\IQContentSite[] $iq_content_site
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelGuide whereKeyword($value)
* @property int|null $country_id
* @property string|null $box_image_url
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\IQContentSite[] $iq_content_sites
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelGuide whereBoxImageUrl($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelGuide whereCountryId($value)
*/
class TravelGuide extends Model
{
@ -58,7 +66,7 @@ class TravelGuide extends Model
];
protected $fillable = [
'tree_node_id', 'name', 'slug', 'text', 'full_text', 'keyword', 'meta_title', 'meta_description', 'meta_keywords', 'pos', 'scope', 'active',
'name', 'slug', 'text', 'full_text', 'keyword', 'meta_title', 'meta_description', 'meta_keywords', 'country_id', 'box_image_url', 'pos', 'scope', 'active',
];
@ -72,9 +80,18 @@ class TravelGuide extends Model
}
public function iq_content_tree_node()
public function iq_content_sites()
{
return $this->belongsTo('App\Models\IQContentTreeNode', 'tree_node_id');
return $this->hasMany('App\Models\IQContentSite', 'travel_guide_id', 'id');
}
public function iq_content_tree_node_first()
{
foreach ($this->iq_content_sites as $iq_content_site) {
if (isset($iq_content_site->iq_content_tree_node) && $iq_content_site->iq_content_tree_node->active) {
return $iq_content_site->iq_content_tree_node;
}
}
}

View file

@ -429,6 +429,12 @@ class TravelUserBookingFewo extends Model
return isset($this->attributes['price_total']) ? $this->attributes['price_total'] : 0;
}
public function calculate_price(){
$this->attributes['price_travel_total'] = $this->getPriceTravelRaw() + $this->getPriceBalanceRaw() + $this->getPriceExtraRaw();
$this->attributes['price_total'] = $this->getPriceTravelTotalRaw() + $this->getPriceServiceRaw() + $this->getPriceDepositRaw();
}
public function getPriceTravelTotalFirstPay(){
if($this->attributes['price_travel'] == 0){
return 0;
@ -469,6 +475,10 @@ class TravelUserBookingFewo extends Model
}
public function getLastChangeAt(){
if(!isset($this->attributes['last_change_at']) || !$this->attributes['last_change_at']){ return ""; }
return Carbon::parse($this->attributes['last_change_at'])->format("H:i d.m.Y");
}
public function getBookingDateYear(){
return Carbon::parse($this->booking_date)->format('Y');
@ -530,7 +540,19 @@ class TravelUserBookingFewo extends Model
return false;
}
//get TravelInfos Name / Paths / ...
public function isChangeLowerInvoiceCreate(){
$dir = $this->getBookingDateYear()."/";
$filename = $this->getInvoiceFileName();
if(Storage::disk('fewo_invoices')->exists( $dir.$filename )){
return Carbon::createFromTimestamp(Storage::disk('fewo_invoices')->lastModified($dir.$filename))->gt($this->last_change_at);
}
return false;
}
//get TravelInfos Name / Paths / ...
public function getTravelInfoFileName(){
if($this->invoice_number) {
return "Anreiseinfo-".Util::sanitize($this->invoice_number).".pdf";
@ -581,7 +603,15 @@ class TravelUserBookingFewo extends Model
$filename = $this->getTravelInfoFileName();
if(Storage::disk('fewo_infos')->exists( $dir.$filename )){
return Carbon::createFromTimestamp(Storage::disk('fewo_infos')->lastModified($dir.$filename))->format("H:i d.m.Y");
}
return false;
}
public function isChangeLowerTravelInfoCreate(){
$dir = $this->getBookingDateYear()."/";
$filename = $this->getTravelInfoFileName();
if(Storage::disk('fewo_invoices')->exists( $dir.$filename )){
return Carbon::createFromTimestamp(Storage::disk('fewo_infos')->lastModified($dir.$filename))->gt($this->last_change_at);
}
return false;
}

View file

@ -0,0 +1,28 @@
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class LaravelFilemanager extends ServiceProvider
{
/**
* Bootstrap services.
*
* @return void
*/
public function boot()
{
//
}
/**
* Register services.
*
* @return void
*/
public function register()
{
//
}
}

View file

@ -107,6 +107,7 @@ class TravelUserBookingFewoRepository extends BaseRepository {
$model = TravelUserBookingFewo::findOrFail($id);
$model->fill($data)->save();
$res = $this->calculatePriceNew($model);
$model->daily_prices = $res['season'];
@ -189,7 +190,6 @@ class TravelUserBookingFewoRepository extends BaseRepository {
return back()->withInput(Input::all())->withErrors($validator);
}
$set_price = true;
$data['is_calendar_fewo_direct'] = isset($data['is_calendar_fewo_direct']) ? true : false;
$data['is_calendar_hrs'] = isset($data['is_calendar_hrs']) ? true : false;
$data['is_calendar_stern_tours'] = isset($data['is_calendar_stern_tours']) ? true : false;
@ -197,22 +197,25 @@ class TravelUserBookingFewoRepository extends BaseRepository {
if($id == "new") {
$model = TravelUserBookingFewo::create($data);
}else{
$model = TravelUserBookingFewo::findOrFail($id);
if($data['from_date'] == $model->from_date && $data['to_date'] == $model->to_date){
$set_price = false;
}
$model->fill($data)->save();
}
$model->last_change_at = now();
$model->save();
$res = $this->calculatePriceNew($model);
$model->daily_prices = $res['season'];
if($set_price){
if(isset($data['calculate_price_new'])){
$model->price_travel = $res['price_travel'];
$model->price_service = $res['price_service'];
$model->price_deposit = $res['price_deposit'];
$model->price_total = $res['price_total'] + $model->getPriceBalanceRaw();
$model->calculate_price();
$model->save();
if($fewo_reservation = $model->fewo_reservation){
$model->fewo_reservation->from_date = $model->getFromDateRaw();

View file

@ -68,8 +68,8 @@ class HTMLHelper
return self::$days[intval($i)];
}
public static function getRoleLabel($role_id = 0){
return '<span class="badge badge-pill '.self::getLable($role_id).'">'.self::$roles[$role_id].'</span>';
public static function getRoleLabel($role_id = 0, $pre = "", $post = ""){
return '<span class="badge badge-pill '.self::getLable($role_id).'">'.$pre.self::$roles[$role_id].$post.'</span>';
}
public static function getLable($id){

View file

@ -41,16 +41,16 @@ class HTMLTreeHelper
</div>
<div class="dd-content">
<a href="' . route('iq_content_tree_detail', [$iq_content_tree->id, $node->id]) . '">
<div class="dd-content-link">
' . ($tree_node_id == $node->id ? '<strong> <i class="fa fa-chevron-right"></i> ' : '') . $node->name . ($tree_node_id == $node->id ? '</strong>' : '') . '
' . ($tree_node_id == $node->id ? '<strong> <i class="fa fa-chevron-right"></i> ' : '').$node->name.($tree_node_id == $node->id ? '</strong>' : '') . '
</div>
<div class="float-right">
' . ($node->site_id ? '<span class="far fa-check fa-xs text-light"></span>' : '') . '
<span class="far fa-edit"></span>
' . ($node->active ? '<i class="fa fa-eye text-success"></i>' : '<i class="fa fa-eye-slash text-danger"></i>') . '
</div>
</a>
<div class="float-right">
' . ($node->iq_content_sites->count() ? '<span class="text-light">('.$node->iq_content_sites->count().')</span>' : '') . '
<a href="#" class="iq_update_data_load" data-action="node-set-active" data-target="self" data-url="'.route('iq_content_tree_detail', [$iq_content_tree->id, $node->id]).'">' . ($node->active ? '
<i class="fa fa-eye text-success"></i>' : '<i class="fa fa-eye-slash text-danger"></i>') . '
</a>
</div>
</div>';
if ($children) {

View file

@ -67,4 +67,51 @@ class Util
}
return $search;
}
public static function cleanHTML($html)
{
$html = str_replace('font-size: 14px;', ' ', $html);
$html = str_replace('font-weight: lighter; ', ' ', $html);
$html = str_replace('font-family: Helvetica, Arial, sans-serif; ', ' ', $html);
$html = str_replace('font-family: Verdana, sans-serif; ', ' ', $html);
$html = str_replace('color: rgb(60, 60, 60); ', ' ', $html);
$html = str_replace(' style=" padding: 0px; margin-right: 0px; margin-left: 0px; margin-bottom: 20px !important; line-height: 20px !important;"', ' ', $html);
$html = str_replace('property="article"', ' ', $html);
$html = str_replace('&nbsp;', ' ', $html);
$html = str_replace('https://www.aegypten-online.de', 'https://www.sterntours.de', $html);
$dom = new \DOMDocument('1.0', 'utf-8');
@$dom->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'));
$removeFullTags = ['span', 'a'];
foreach ($removeFullTags as $removeFullTag){
$domElemsToRemove = [];
$elements = $dom->getElementsByTagName($removeFullTag);
foreach ($elements as $element) {
$domElemsToRemove[] = $element;
}
foreach ($domElemsToRemove as $domElem) {
if($removeFullTag == 'span' && strpos($domElem->getAttribute('style'), 'font-weight: 700') !== false){
$new_node = $dom->createTextNode("<strong>".$domElem->nodeValue."</strong>");
}else{
$new_node = $dom->createTextNode($domElem->nodeValue);
}
$domElem->parentNode->replaceChild($new_node, $domElem);
}
}
$removeStyleTags = ['ul', 'li', 'h1', 'h2', 'br'];
foreach ($removeStyleTags as $removeStyleTag){
$elements = $dom->getElementsByTagName($removeStyleTag);
foreach ($elements as $element) {
$element->removeAttribute('style');
}
}
$html = $dom->saveHTML();
return $html;
}
}

28
bootstrap/cache/packages.php vendored Normal file → Executable file
View file

@ -42,6 +42,16 @@
'Image' => 'Intervention\\Image\\Facades\\Image',
),
),
'iqcontent/laravel-filemanager' =>
array (
'providers' =>
array (
0 => 'IqContent\\LaravelFilemanager\\LaravelFilemanagerServiceProvider',
),
'aliases' =>
array (
),
),
'jenssegers/date' =>
array (
'providers' =>
@ -101,6 +111,13 @@
'Excel' => 'Maatwebsite\\Excel\\Facades\\Excel',
),
),
'nesbot/carbon' =>
array (
'providers' =>
array (
0 => 'Carbon\\Laravel\\ServiceProvider',
),
),
'nunomaduro/collision' =>
array (
'providers' =>
@ -108,17 +125,6 @@
0 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider',
),
),
'vladrub/laravel-datatables-oracle' =>
array (
'providers' =>
array (
0 => 'Yajra\\DataTables\\DataTablesServiceProvider',
),
'aliases' =>
array (
'DataTables' => 'Yajra\\DataTables\\Facades\\DataTables',
),
),
'yajra/laravel-datatables-oracle' =>
array (
'providers' =>

81
bootstrap/cache/services.php vendored Normal file → Executable file
View file

@ -28,28 +28,29 @@
24 => 'Cviebrock\\EloquentSluggable\\ServiceProvider',
25 => 'Fideloper\\Proxy\\TrustedProxyServiceProvider',
26 => 'Intervention\\Image\\ImageServiceProvider',
27 => 'Jenssegers\\Date\\DateServiceProvider',
28 => 'Laracasts\\Flash\\FlashServiceProvider',
29 => 'Laravel\\Passport\\PassportServiceProvider',
30 => 'Laravel\\Tinker\\TinkerServiceProvider',
31 => 'Collective\\Html\\HtmlServiceProvider',
32 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
33 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider',
34 => 'Yajra\\DataTables\\DataTablesServiceProvider',
35 => 'Yajra\\DataTables\\DataTablesServiceProvider',
36 => 'Laravel\\Tinker\\TinkerServiceProvider',
37 => 'Laravel\\Passport\\PassportServiceProvider',
38 => 'App\\Providers\\AppServiceProvider',
39 => 'App\\Providers\\AuthServiceProvider',
40 => 'App\\Providers\\EventServiceProvider',
41 => 'App\\Providers\\RouteServiceProvider',
42 => 'Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider',
43 => 'Jenssegers\\Date\\DateServiceProvider',
44 => 'Collective\\Html\\HtmlServiceProvider',
45 => 'Intervention\\Image\\ImageServiceProvider',
46 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
47 => 'Yajra\\DataTables\\DataTablesServiceProvider',
48 => 'Reliese\\Coders\\CodersServiceProvider',
27 => 'IqContent\\LaravelFilemanager\\LaravelFilemanagerServiceProvider',
28 => 'Jenssegers\\Date\\DateServiceProvider',
29 => 'Laracasts\\Flash\\FlashServiceProvider',
30 => 'Laravel\\Passport\\PassportServiceProvider',
31 => 'Laravel\\Tinker\\TinkerServiceProvider',
32 => 'Collective\\Html\\HtmlServiceProvider',
33 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
34 => 'Carbon\\Laravel\\ServiceProvider',
35 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider',
36 => 'Yajra\\DataTables\\DataTablesServiceProvider',
37 => 'Laravel\\Tinker\\TinkerServiceProvider',
38 => 'Laravel\\Passport\\PassportServiceProvider',
39 => 'App\\Providers\\AppServiceProvider',
40 => 'App\\Providers\\AuthServiceProvider',
41 => 'App\\Providers\\EventServiceProvider',
42 => 'App\\Providers\\RouteServiceProvider',
43 => 'Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider',
44 => 'Jenssegers\\Date\\DateServiceProvider',
45 => 'Collective\\Html\\HtmlServiceProvider',
46 => 'Intervention\\Image\\ImageServiceProvider',
47 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
48 => 'Yajra\\DataTables\\DataTablesServiceProvider',
49 => 'Reliese\\Coders\\CodersServiceProvider',
),
'eager' =>
array (
@ -67,21 +68,22 @@
11 => 'Cviebrock\\EloquentSluggable\\ServiceProvider',
12 => 'Fideloper\\Proxy\\TrustedProxyServiceProvider',
13 => 'Intervention\\Image\\ImageServiceProvider',
14 => 'Jenssegers\\Date\\DateServiceProvider',
15 => 'Laracasts\\Flash\\FlashServiceProvider',
16 => 'Laravel\\Passport\\PassportServiceProvider',
17 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
18 => 'Yajra\\DataTables\\DataTablesServiceProvider',
19 => 'Yajra\\DataTables\\DataTablesServiceProvider',
20 => 'Laravel\\Passport\\PassportServiceProvider',
21 => 'App\\Providers\\AppServiceProvider',
22 => 'App\\Providers\\AuthServiceProvider',
23 => 'App\\Providers\\EventServiceProvider',
24 => 'App\\Providers\\RouteServiceProvider',
25 => 'Jenssegers\\Date\\DateServiceProvider',
26 => 'Intervention\\Image\\ImageServiceProvider',
27 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
28 => 'Yajra\\DataTables\\DataTablesServiceProvider',
14 => 'IqContent\\LaravelFilemanager\\LaravelFilemanagerServiceProvider',
15 => 'Jenssegers\\Date\\DateServiceProvider',
16 => 'Laracasts\\Flash\\FlashServiceProvider',
17 => 'Laravel\\Passport\\PassportServiceProvider',
18 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
19 => 'Carbon\\Laravel\\ServiceProvider',
20 => 'Yajra\\DataTables\\DataTablesServiceProvider',
21 => 'Laravel\\Passport\\PassportServiceProvider',
22 => 'App\\Providers\\AppServiceProvider',
23 => 'App\\Providers\\AuthServiceProvider',
24 => 'App\\Providers\\EventServiceProvider',
25 => 'App\\Providers\\RouteServiceProvider',
26 => 'Jenssegers\\Date\\DateServiceProvider',
27 => 'Intervention\\Image\\ImageServiceProvider',
28 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
29 => 'Yajra\\DataTables\\DataTablesServiceProvider',
),
'deferred' =>
array (
@ -102,6 +104,9 @@
'command.config.clear' => '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',
@ -110,6 +115,8 @@
'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',
'command.preset' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.queue.failed' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',

View file

@ -4,32 +4,41 @@
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"repositories": [
{
"type": "path",
"url": "./packages/*/*/",
"options": {
"symlink": true
}
}
],
"require": {
"php": "^7.1.3",
"barryvdh/laravel-dompdf": "^0.8.4",
"cviebrock/eloquent-sluggable": "4.5",
"doctrine/dbal": "^2.8",
"fideloper/proxy": "^4.0",
"guzzlehttp/guzzle": "6.3.3",
"intervention/image": "2.4.2",
"jenssegers/date": "^3.4",
"laracasts/flash": "3.0.2",
"laravel/framework": "5.6.*",
"laravel/passport": "^7.0",
"laravel/tinker": "^1.0",
"laravelcollective/html": "5.6.x-dev",
"maatwebsite/excel": "2.1.30",
"reliese/laravel": "^0.0.13",
"vladrub/laravel-datatables-oracle": "8.0.x-dev",
"yajra/laravel-datatables-oracle": "^8.8"
"laravel/framework": "5.8.*",
"barryvdh/laravel-dompdf": "*",
"cviebrock/eloquent-sluggable": "*",
"doctrine/dbal": "*",
"fideloper/proxy": "*",
"guzzlehttp/guzzle": "*",
"intervention/image": "*",
"jenssegers/date": "*",
"laracasts/flash": "*",
"laravel/passport": "*",
"laravel/tinker": "*",
"laravelcollective/html": "*",
"maatwebsite/excel": "*",
"reliese/laravel": "*",
"yajra/laravel-datatables-oracle": "*",
"iqcontent/laravel-filemanager": "*"
},
"require-dev": {
"barryvdh/laravel-ide-helper": "^2.5",
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^2.0",
"phpunit/phpunit": "^7.0"
"barryvdh/laravel-ide-helper": "*",
"filp/whoops": "*",
"fzaninotto/faker": "*",
"mockery/mockery": "*",
"nunomaduro/collision": "*",
"phpunit/phpunit": "*"
},
"autoload": {
"files": [

1574
composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -1,704 +1,164 @@
<?php
return array(
'cache' => [
use Maatwebsite\Excel\Excel;
return [
'exports' => [
/*
|--------------------------------------------------------------------------
| Enable/Disable cell caching
|--------------------------------------------------------------------------
*/
'enable' => true,
/*
|--------------------------------------------------------------------------
| Caching driver
| Chunk size
|--------------------------------------------------------------------------
|
| Set the caching driver
|
| Available methods:
| memory|gzip|serialized|igbinary|discISAM|apc|memcache|temp|wincache|sqlite|sqlite3
| When using FromQuery, the query is automatically chunked.
| Here you can specify how big the chunk should be.
|
*/
'driver' => 'memory',
/*
|--------------------------------------------------------------------------
| Cache settings
|--------------------------------------------------------------------------
*/
'settings' => [
'memoryCacheSize' => '32MB',
'cacheTime' => 600
],
/*
|--------------------------------------------------------------------------
| Memcache settings
|--------------------------------------------------------------------------
*/
'memcache' => [
'host' => 'localhost',
'port' => 11211,
],
/*
|--------------------------------------------------------------------------
| Cache dir (for discISAM)
|--------------------------------------------------------------------------
*/
'dir' => storage_path('cache')
],
'properties' => [
'creator' => 'Maatwebsite',
'lastModifiedBy' => 'Maatwebsite',
'title' => 'Spreadsheet',
'description' => 'Default spreadsheet export',
'subject' => 'Spreadsheet export',
'keywords' => 'maatwebsite, excel, export',
'category' => 'Excel',
'manager' => 'Maatwebsite',
'company' => 'Maatwebsite',
],
/*
|--------------------------------------------------------------------------
| Sheets settings
|--------------------------------------------------------------------------
*/
'sheets' => [
/*
|--------------------------------------------------------------------------
| Default page setup
|--------------------------------------------------------------------------
*/
'pageSetup' => [
'orientation' => 'portrait',
'paperSize' => '9',
'scale' => '100',
'fitToPage' => false,
'fitToHeight' => true,
'fitToWidth' => true,
'columnsToRepeatAtLeft' => ['', ''],
'rowsToRepeatAtTop' => [0, 0],
'horizontalCentered' => false,
'verticalCentered' => false,
'printArea' => null,
'firstPageNumber' => null,
],
],
/*
|--------------------------------------------------------------------------
| Creator
|--------------------------------------------------------------------------
|
| The default creator of a new Excel file
|
*/
'creator' => 'Maatwebsite',
'csv' => [
/*
|--------------------------------------------------------------------------
| Delimiter
|--------------------------------------------------------------------------
|
| The default delimiter which will be used to read out a CSV file
|
*/
'delimiter' => ',',
/*
|--------------------------------------------------------------------------
| Enclosure
|--------------------------------------------------------------------------
*/
'enclosure' => '"',
/*
|--------------------------------------------------------------------------
| Line endings
|--------------------------------------------------------------------------
*/
'line_ending' => "\r\n",
/*
|--------------------------------------------------------------------------
| setUseBom
|--------------------------------------------------------------------------
*/
'use_bom' => false
],
'export' => [
/*
|--------------------------------------------------------------------------
| Autosize columns
|--------------------------------------------------------------------------
|
| Disable/enable column autosize or set the autosizing for
| an array of columns ( array('A', 'B') )
|
*/
'autosize' => true,
/*
|--------------------------------------------------------------------------
| Autosize method
|--------------------------------------------------------------------------
|
| --> PHPExcel_Shared_Font::AUTOSIZE_METHOD_APPROX
| The default is based on an estimate, which does its calculation based
| on the number of characters in the cell value (applying any calculation
| and format mask, and allowing for wordwrap and rotation) and with an
| "arbitrary" adjustment based on the font (Arial, Calibri or Verdana,
| defaulting to Calibri if any other font is used) and a proportional
| adjustment for the font size.
|
| --> PHPExcel_Shared_Font::AUTOSIZE_METHOD_EXACT
| The second method is more accurate, based on actual style formatting as
| well (bold, italic, etc), and is calculated by generating a gd2 imagettf
| bounding box and using its dimensions to determine the size; but this
| method is significantly slower, and its accuracy is still dependent on
| having the appropriate fonts installed.
|
*/
'autosize-method' => PHPExcel_Shared_Font::AUTOSIZE_METHOD_APPROX,
/*
|--------------------------------------------------------------------------
| Auto generate table heading
|--------------------------------------------------------------------------
|
| If set to true, the array indices (or model attribute names)
| will automatically be used as first row (table heading)
|
*/
'generate_heading_by_indices' => true,
/*
|--------------------------------------------------------------------------
| Auto set alignment on merged cells
|--------------------------------------------------------------------------
*/
'merged_cell_alignment' => 'left',
'chunk_size' => 1000,
/*
|--------------------------------------------------------------------------
| Pre-calculate formulas during export
|--------------------------------------------------------------------------
*/
'calculate' => false,
'pre_calculate_formulas' => false,
/*
|--------------------------------------------------------------------------
| Include Charts during export
| CSV Settings
|--------------------------------------------------------------------------
|
| Configure e.g. delimiter, enclosure and line ending for CSV exports.
|
*/
'includeCharts' => false,
/*
|--------------------------------------------------------------------------
| Default sheet settings
|--------------------------------------------------------------------------
*/
'sheets' => [
/*
|--------------------------------------------------------------------------
| Default page margin
|--------------------------------------------------------------------------
|
| 1) When set to false, default margins will be used
| 2) It's possible to enter a single margin which will
| be used for all margins.
| 3) Alternatively you can pass an array with 4 margins
| Default order: array(top, right, bottom, left)
|
*/
'page_margin' => false,
/*
|--------------------------------------------------------------------------
| Value in source array that stands for blank cell
|--------------------------------------------------------------------------
*/
'nullValue' => null,
/*
|--------------------------------------------------------------------------
| Insert array starting from this cell address as the top left coordinate
|--------------------------------------------------------------------------
*/
'startCell' => 'A1',
/*
|--------------------------------------------------------------------------
| Apply strict comparison when testing for null values in the array
|--------------------------------------------------------------------------
*/
'strictNullComparison' => false
'csv' => [
'delimiter' => ',',
'enclosure' => '"',
'line_ending' => PHP_EOL,
'use_bom' => false,
'include_separator_line' => false,
'excel_compatibility' => false,
],
/*
|--------------------------------------------------------------------------
| Store settings
|--------------------------------------------------------------------------
*/
'store' => [
/*
|--------------------------------------------------------------------------
| Path
|--------------------------------------------------------------------------
|
| The path we want to save excel file to
|
*/
'path' => storage_path('exports'),
/*
|--------------------------------------------------------------------------
| Return info
|--------------------------------------------------------------------------
|
| Whether we want to return information about the stored file or not
|
*/
'returnInfo' => false
],
/*
|--------------------------------------------------------------------------
| PDF Settings
|--------------------------------------------------------------------------
*/
'pdf' => [
/*
|--------------------------------------------------------------------------
| PDF Drivers
|--------------------------------------------------------------------------
| Supported: DomPDF, tcPDF, mPDF
*/
'driver' => 'DomPDF',
/*
|--------------------------------------------------------------------------
| PDF Driver settings
|--------------------------------------------------------------------------
*/
'drivers' => [
/*
|--------------------------------------------------------------------------
| DomPDF settings
|--------------------------------------------------------------------------
*/
'DomPDF' => [
'path' => base_path('vendor/dompdf/dompdf/')
],
/*
|--------------------------------------------------------------------------
| tcPDF settings
|--------------------------------------------------------------------------
*/
'tcPDF' => [
'path' => base_path('vendor/tecnick.com/tcpdf/')
],
/*
|--------------------------------------------------------------------------
| mPDF settings
|--------------------------------------------------------------------------
*/
'mPDF' => [
'path' => base_path('vendor/mpdf/mpdf/')
],
]
]
],
'filters' => [
/*
|--------------------------------------------------------------------------
| Register read filters
|--------------------------------------------------------------------------
*/
'registered' => [
'chunk' => 'Maatwebsite\Excel\Filters\ChunkReadFilter'
'imports' => [
'read_only' => true,
'heading_row' => [
/*
|--------------------------------------------------------------------------
| Heading Row Formatter
|--------------------------------------------------------------------------
|
| Configure the heading row formatter.
| Available options: none|slug|custom
|
*/
'formatter' => 'slug',
],
/*
|--------------------------------------------------------------------------
| Enable certain filters for every file read
| CSV Settings
|--------------------------------------------------------------------------
|
| Configure e.g. delimiter, enclosure and line ending for CSV imports.
|
*/
'enabled' => []
'csv' => [
'delimiter' => ',',
'enclosure' => '"',
'escape_character' => '\\',
'contiguous' => false,
'input_encoding' => 'UTF-8',
],
],
'import' => [
/*
|--------------------------------------------------------------------------
| Extension detector
|--------------------------------------------------------------------------
|
| Configure here which writer type should be used when
| the package needs to guess the correct type
| based on the extension alone.
|
*/
'extension_detector' => [
'xlsx' => Excel::XLSX,
'xlsm' => Excel::XLSX,
'xltx' => Excel::XLSX,
'xltm' => Excel::XLSX,
'xls' => Excel::XLS,
'xlt' => Excel::XLS,
'ods' => Excel::ODS,
'ots' => Excel::ODS,
'slk' => Excel::SLK,
'xml' => Excel::XML,
'gnumeric' => Excel::GNUMERIC,
'htm' => Excel::HTML,
'html' => Excel::HTML,
'csv' => Excel::CSV,
'tsv' => Excel::TSV,
/*
|--------------------------------------------------------------------------
| Has heading
| PDF Extension
|--------------------------------------------------------------------------
|
| The sheet has a heading (first) row which we can use as attribute names
|
| Options: true|false|slugged|slugged_with_count|ascii|numeric|hashed|hashed_with_lower|trans|original
| Configure here which Pdf driver should be used by default.
| Available options: Excel::MPDF | Excel::TCPDF | Excel::DOMPDF
|
*/
'heading' => 'slugged',
/*
|--------------------------------------------------------------------------
| First Row with data or heading of data
|--------------------------------------------------------------------------
|
| If the heading row is not the first row, or the data doesn't start
| on the first row, here you can change the start row.
|
*/
'startRow' => 1,
/*
|--------------------------------------------------------------------------
| Cell name word separator
|--------------------------------------------------------------------------
|
| The default separator which is used for the cell names
| Note: only applies to 'heading' settings 'true' && 'slugged'
|
*/
'separator' => '_',
/*
|--------------------------------------------------------------------------
| Slug whitelisting
|--------------------------------------------------------------------------
|
| Here you can whitelist certain characters in the slug.
| E.g. user.last_name will not remove . and _
| Note: only applies to 'heading' settings 'true' && 'slugged'
|
*/
'slug_whitelist' => '._',
/*
|--------------------------------------------------------------------------
| Include Charts during import
|--------------------------------------------------------------------------
*/
'includeCharts' => false,
/*
|--------------------------------------------------------------------------
| Sheet heading conversion
|--------------------------------------------------------------------------
|
| Convert headings to ASCII
| Note: only applies to 'heading' settings 'true' && 'slugged'
|
*/
'to_ascii' => true,
/*
|--------------------------------------------------------------------------
| Import encoding
|--------------------------------------------------------------------------
*/
'encoding' => [
'input' => 'UTF-8',
'output' => 'UTF-8'
],
/*
|--------------------------------------------------------------------------
| Calculate
|--------------------------------------------------------------------------
|
| By default cells with formulas will be calculated.
|
*/
'calculate' => true,
/*
|--------------------------------------------------------------------------
| Ignore empty cells
|--------------------------------------------------------------------------
|
| By default empty cells are not ignored
|
*/
'ignoreEmpty' => false,
/*
|--------------------------------------------------------------------------
| Force sheet collection
|--------------------------------------------------------------------------
|
| For a sheet collection even when there is only 1 sheets.
| When set to false and only 1 sheet found, the parsed file will return
| a row collection instead of a sheet collection.
| When set to true, it will return a sheet collection instead.
|
*/
'force_sheets_collection' => false,
/*
|--------------------------------------------------------------------------
| Date format
|--------------------------------------------------------------------------
|
| The format dates will be parsed to
|
*/
'dates' => [
/*
|--------------------------------------------------------------------------
| Enable/disable date formatting
|--------------------------------------------------------------------------
*/
'enabled' => true,
/*
|--------------------------------------------------------------------------
| Default date format
|--------------------------------------------------------------------------
|
| If set to false, a carbon object will return
|
*/
'format' => false,
/*
|--------------------------------------------------------------------------
| Date columns
|--------------------------------------------------------------------------
*/
'columns' => []
],
/*
|--------------------------------------------------------------------------
| Import sheets by config
|--------------------------------------------------------------------------
*/
'sheets' => [
/*
|--------------------------------------------------------------------------
| Example sheet
|--------------------------------------------------------------------------
|
| Example sheet "test" will grab the firstname at cell A2
|
*/
'test' => [
'firstname' => 'A2'
]
]
'pdf' => Excel::DOMPDF,
],
'views' => [
'value_binder' => [
/*
|--------------------------------------------------------------------------
| Styles
| Default Value Binder
|--------------------------------------------------------------------------
|
| The default styles which will be used when parsing a view
| PhpSpreadsheet offers a way to hook into the process of a value being
| written to a cell. In there some assumptions are made on how the
| value should be formatted. If you want to change those defaults,
| you can implement your own default value binder.
|
*/
'styles' => [
/*
|--------------------------------------------------------------------------
| Table headings
|--------------------------------------------------------------------------
*/
'th' => [
'font' => [
'bold' => true,
'size' => 12,
]
],
/*
|--------------------------------------------------------------------------
| Strong tags
|--------------------------------------------------------------------------
*/
'strong' => [
'font' => [
'bold' => true,
'size' => 12,
]
],
/*
|--------------------------------------------------------------------------
| Bold tags
|--------------------------------------------------------------------------
*/
'b' => [
'font' => [
'bold' => true,
'size' => 12,
]
],
/*
|--------------------------------------------------------------------------
| Italic tags
|--------------------------------------------------------------------------
*/
'i' => [
'font' => [
'italic' => true,
'size' => 12,
]
],
/*
|--------------------------------------------------------------------------
| Heading 1
|--------------------------------------------------------------------------
*/
'h1' => [
'font' => [
'bold' => true,
'size' => 24,
]
],
/*
|--------------------------------------------------------------------------
| Heading 2
|--------------------------------------------------------------------------
*/
'h2' => [
'font' => [
'bold' => true,
'size' => 18,
]
],
/*
|--------------------------------------------------------------------------
| Heading 3
|--------------------------------------------------------------------------
*/
'h3' => [
'font' => [
'bold' => true,
'size' => 13.5,
]
],
/*
|--------------------------------------------------------------------------
| Heading 4
|--------------------------------------------------------------------------
*/
'h4' => [
'font' => [
'bold' => true,
'size' => 12,
]
],
/*
|--------------------------------------------------------------------------
| Heading 5
|--------------------------------------------------------------------------
*/
'h5' => [
'font' => [
'bold' => true,
'size' => 10,
]
],
/*
|--------------------------------------------------------------------------
| Heading 6
|--------------------------------------------------------------------------
*/
'h6' => [
'font' => [
'bold' => true,
'size' => 7.5,
]
],
/*
|--------------------------------------------------------------------------
| Hyperlinks
|--------------------------------------------------------------------------
*/
'a' => [
'font' => [
'underline' => true,
'color' => ['argb' => 'FF0000FF'],
]
],
/*
|--------------------------------------------------------------------------
| Horizontal rules
|--------------------------------------------------------------------------
*/
'hr' => [
'borders' => [
'bottom' => [
'style' => 'thin',
'color' => ['FF000000']
],
]
]
]
]
);
'default' => Maatwebsite\Excel\DefaultValueBinder::class,
],
'transactions' => [
/*
|--------------------------------------------------------------------------
| Transaction Handler
|--------------------------------------------------------------------------
|
| By default the import is wrapped in a transaction. This is useful
| for when an import may fail and you want to retry it. With the
| transactions, the previous import gets rolled-back.
|
| You can disable the transaction handler by setting this to null.
| Or you can choose a custom made transaction handler here.
|
| Supported handlers: null|db
|
*/
'handler' => 'db',
],
'temporary_files' => [
/*
|--------------------------------------------------------------------------
| Local Temporary Path
|--------------------------------------------------------------------------
|
| When exporting and importing files, we use a temporary file, before
| storing reading or downloading. Here you can customize that path.
|
*/
'local_path' => sys_get_temp_dir(),
/*
|--------------------------------------------------------------------------
| Remote Temporary Disk
|--------------------------------------------------------------------------
|
| When dealing with a multi server setup with queues in which you
| cannot rely on having a shared local temporary path, you might
| want to store the temporary file on a shared disk. During the
| queue executing, we'll retrieve the temporary file from that
| location instead. When left to null, it will always use
| the local path. This setting only has effect when using
| in conjunction with queued imports and exports.
|
*/
'remote_disk' => null,
],
];

203
config/lfm.php Normal file
View file

@ -0,0 +1,203 @@
<?php
/*
|--------------------------------------------------------------------------
| Documentation for this config :
|--------------------------------------------------------------------------
| online => http://unisharp.github.io/laravel-filemanager/config
| offline => vendor/unisharp/laravel-filemanager/docs/config.md
*/
return [
/*
|--------------------------------------------------------------------------
| Routing
|--------------------------------------------------------------------------
*/
'use_package_routes' => true,
// // Use relative paths (without domain)
// 'relative_paths' => false,
/*
|--------------------------------------------------------------------------
| Multi-User Mode
|--------------------------------------------------------------------------
*/
'allow_multi_user' => false,
'allow_share_folder' => false,
/*
|--------------------------------------------------------------------------
| Folder Names
|--------------------------------------------------------------------------
*/
// Flexible way to customize client folders accessibility
// If you want to customize client folders, publish tag="lfm_handler"
// Then you can rewrite userField function in App\Handler\ConfigHandler class
// And set 'user_field' to App\Handler\ConfigHandler::class
// Ex: The private folder of user will be named as the user id.
'user_folder_name' => IqContent\LaravelFilemanager\Handlers\ConfigHandler::class,
'shared_folder_name' => 'shares',
'thumb_folder_name' => 'thumbs',
'folder_categories' => [
'file' => [
'folder_name' => 'files',
'startup_view' => 'grid',
'max_size' => 50000, // size in KB
'valid_mime' => [
'image/jpeg',
'image/pjpeg',
'image/png',
'image/gif',
'image/svg+xml',
'application/pdf',
'text/plain',
'application/msword',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'application/vnd.ms-word.template.macroEnabled.12',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
'application/excel',
],
],
'image' => [
'folder_name' => 'photos',
'startup_view' => 'list',
'max_size' => 50000, // size in KB
'valid_mime' => [
'image/jpeg',
'image/pjpeg',
'image/png',
'image/gif',
'image/svg+xml',
'application/pdf',
'text/plain',
],
],
],
/*
|--------------------------------------------------------------------------
| Upload / Validation
|--------------------------------------------------------------------------
*/
'disk' => 'public',
'rename_file' => false,
'alphanumeric_filename' => true,
'alphanumeric_directory' => true,
'should_validate_size' => false,
'should_validate_mime' => false,
// permissions to be set when create a new folder or when it creates automatically with thumbnails
'create_folder_mode' => 0755,
// permissions to be set on file upload.
'create_file_mode' => 0644,
// If true, it will attempt to chmod the file after upload
'should_change_file_mode' => true,
// behavior on files with identical name
// setting it to true cause old file replace with new one
// setting it to false show `error-file-exist` error and stop upload
'over_write_on_duplicate' => false,
/*
|--------------------------------------------------------------------------
| Thumbnail
|--------------------------------------------------------------------------
*/
// If true, image thumbnails would be created during upload
'should_create_thumbnails' => true,
// Create thumbnails automatically only for listed types.
'raster_mimetypes' => [
'image/jpeg',
'image/pjpeg',
'image/png',
],
'thumb_img_width' => 200,
'thumb_img_height' => 200,
/*
|--------------------------------------------------------------------------
| jQuery UI options
|--------------------------------------------------------------------------
*/
'resize_aspectRatio' => false,
'resize_containment' => true,
/*
|--------------------------------------------------------------------------
| File Extension Information
|--------------------------------------------------------------------------
*/
'file_type_array' => [
'pdf' => 'Adobe Acrobat',
'doc' => 'Microsoft Word',
'docx' => 'Microsoft Word',
'xls' => 'Microsoft Excel',
'xlsx' => 'Microsoft Excel',
'zip' => 'Archive',
'gif' => 'GIF Image',
'jpg' => 'JPEG Image',
'jpeg' => 'JPEG Image',
'png' => 'PNG Image',
'ppt' => 'Microsoft PowerPoint',
'pptx' => 'Microsoft PowerPoint',
],
'file_icon_array' => [
'pdf' => 'fa-file-pdf',
'doc' => 'fa-file-word',
'docx' => 'fa-file-word',
'xls' => 'fa-file-excel',
'xlsx' => 'fa-file-excel',
'zip' => 'fa-file-archive',
'gif' => 'fa-file-image',
'jpg' => 'fa-file-image',
'jpeg' => 'fa-file-image',
'png' => 'fa-file-image',
'ppt' => 'fa-file-powerpoint',
'pptx' => 'fa-file-powerpoint',
'mp3' => 'fa-file-audio',
'mp4' => 'fa-file-video',
'txt' => 'fa-file-alt',
'dwg' => 'fa fa-file-image',
],
/*
|--------------------------------------------------------------------------
| php.ini override
|--------------------------------------------------------------------------
|
| These values override your php.ini settings before uploading files
| Set these to false to ingnore and apply your php.ini settings
|
| Please note that the 'upload_max_filesize' & 'post_max_size'
| directives are not supported.
*/
'php_ini_overrides' => [
'memory_limit' => '256M',
],
];

View file

@ -18,10 +18,11 @@ return [
'crm-cm-bf' => ['name' => 'ADMIN CRM > Kundenverwaltung > Buchungen (FeWo)' , 'color' => 'admin'],
'crm-old-cm' => ['name' => 'ADMIN CRM altes System > Kundenverwaltung' , 'color' => 'info'],
'cms' => ['name' => 'ADMIN CMS' , 'color' => 'secondary'],
'cms-cn' => ['name' => 'ADMIN CMS > Inhalte' , 'color' => 'secondary'],
'cms-iq-assets' => ['name' => 'ADMIN CMS > Medien' , 'color' => 'secondary'],
'cms-tg' => ['name' => 'ADMIN CMS > Reiseführer' , 'color' => 'secondary'],
'cms-fb' => ['name' => 'ADMIN CMS > Feedback' , 'color' => 'secondary'],
'cms-sb' => ['name' => 'ADMIN CMS > Sidebar' , 'color' => 'secondary'],
'cms-cn' => ['name' => 'ADMIN CMS > Inhalte' , 'color' => 'secondary'],
],
2 => [
'sua-st' => ['name' => 'SUPERADMIN > Einstellungen' , 'color' => 'superadmin'],

View file

@ -29,7 +29,6 @@ class CreateDraftItemsTable extends Migration
$table->decimal('price', 8, 2)->nullable();
$table->tinyInteger('pos')->unsigned()->nullable();
$table->boolean('in_pdf')->default(true);
$table->boolean('active')->default(true);

View file

@ -19,7 +19,22 @@ class CreateTravelCountryTable extends Migration
$table->integer('feedback_page_id')->index();
$table->string('name')->nullable();
$table->string('slug')->nullable();
$table->text('html_information')->nullable();
$table->string('text_before')->nullable();
$table->string('text_after')->nullable();
$table->string('contact_headline')->nullable();
$table->text('contact_text_1')->nullable();
$table->text('contact_text_2')->nullable();
$table->text('contact_text_3')->nullable();
$table->text('contact_text_4')->nullable();
$table->text('contact_footer')->nullable();
$table->text('entry_requirements')->nullable(); //need?
$table->boolean('is_customer_country');

View file

@ -16,9 +16,6 @@ class CreateTravelGuidesTable extends Migration
Schema::connection('mysql_stern')->create('travel_guides', function (Blueprint $table) {
$table->increments('id');
$table->unsignedBigInteger('tree_node_id');
$table->string('name');
$table->string('slug')->index()->unique();
@ -31,16 +28,15 @@ class CreateTravelGuidesTable extends Migration
$table->string('meta_description')->nullable();
$table->string('meta_keywords')->nullable();
$table->integer('country_id')->nullable()->index();
$table->string('box_image_url', 200)->nullable();
$table->tinyInteger('pos')->unsigned()->nullable();
$table->boolean('scope')->default(true);
$table->boolean('active')->default(true);
$table->timestamps();
$table->foreign('tree_node_id')
->references('id')
->on('i_q_content_tree_nodes');
});
}

View file

@ -59,6 +59,8 @@ class CreateTravelUserBookingFewosTable extends Migration
$table->text('send_info_mail')->nullable();
$table->text('info_mail_text')->nullable();
$table->timestamp('last_change_at')->nullable();
$table->timestamps();
$table->softDeletes();

View file

@ -0,0 +1,46 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateIQContentSitesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::connection('mysql_stern')->create('i_q_content_sites', function (Blueprint $table) {
$table->increments('id');
$table->unsignedBigInteger('tree_node_id');
$table->unsignedInteger('travel_guide_id');
$table->timestamps();
$table->foreign('tree_node_id')
->references('id')
->on('i_q_content_tree_nodes')
->onDelete('CASCADE');
$table->foreign('travel_guide_id')
->references('id')
->on('travel_guides')
->onDelete('CASCADE');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::connection('mysql_stern')->dropIfExists('i_q_content_sites');
}
}

View file

@ -0,0 +1,51 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateIQContentFoldersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::connection('mysql_stern')->create('i_q_content_folders', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('folder_id')->nullable()->index();
$table->string('name')->index();
$table->string('slug')->unique()->index();
$table->string('identifier')->nullable();
$table->string('path')->nullable();
$table->unsignedTinyInteger('color')->default(0);
$table->unsignedTinyInteger('pos')->default(0);
$table->boolean('active')->default(true);
$table->timestamps();
$table->foreign('folder_id')
->references('id')
->on('i_q_content_folders')
->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::connection('mysql_stern')->dropIfExists('i_q_content_folders');
}
}

View file

@ -0,0 +1,55 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateIQContentFilesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::connection('mysql_stern')->create('i_q_content_files', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('folder_id')->nullable()->index();
$table->string('name')->index();
$table->string('identifier')->nullable();
$table->string('slug')->unique()->index();
$table->string('ext', 10)->nullable();
$table->string('mine', 100)->nullable();
$table->unsignedInteger('size')->unsigned();
$table->string('dimensions', 100)->nullable();
$table->text('content')->nullable();
$table->unsignedTinyInteger('color')->default(0);
$table->unsignedTinyInteger('pos')->default(0);
$table->boolean('active')->default(true);
$table->timestamps();
$table->foreign('folder_id')
->references('id')
->on('i_q_content_folders')
->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::connection('mysql_stern')->dropIfExists('i_q_content_files');
}
}

View file

@ -0,0 +1,39 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateIQContentCategoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::connection('mysql_stern')->create('i_q_content_categories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name')->index();
$table->string('slug')->unique()->index();
$table->unsignedTinyInteger('pos')->default(0);
$table->boolean('active')->default(true);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::connection('mysql_stern')->dropIfExists('i_q_content_categories');
}
}

View file

@ -0,0 +1,45 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateIQContentTagsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::connection('mysql_stern')->create('i_q_content_tags', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('category_id')->index();
$table->string('name')->index();
$table->string('slug')->unique()->index();
$table->unsignedTinyInteger('pos')->default(0);
$table->boolean('active')->default(true);
$table->timestamps();
$table->foreign('category_id')
->references('id')
->on('i_q_content_categories')
->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::connection('mysql_stern')->dropIfExists('i_q_content_tags');
}
}

View file

@ -0,0 +1,49 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateIQContentFileTagsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::connection('mysql_stern')->create('i_q_content_file_tags', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('file_id')->index();
$table->unsignedBigInteger('tag_id')->index();
$table->timestamps();
$table->foreign('file_id')
->references('id')
->on('i_q_content_files')
->onDelete('cascade');
$table->foreign('tag_id')
->references('id')
->on('i_q_content_tags')
->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::connection('mysql_stern')->dropIfExists('i_q_content_file_tags');
}
}

View file

@ -0,0 +1,10 @@
Please check the following instructions before submitting a bug :
* Make sure you are using the latest version.
* Make sure you read [installation](http://unisharp.github.io/laravel-filemanager/installation), [integration](http://unisharp.github.io/laravel-filemanager/integration), and [upgrade](http://unisharp.github.io/laravel-filemanager/upgrade) document.
And provide the followings :
* Operating system :
* Laravel version :
* Package version :
* Steps to reproduce your issue :
* Screenshots of browser console :

View file

@ -0,0 +1,16 @@
---
name: Bug report
about: Create a report to help us improve
---
Please check the following instructions before submitting a bug :
* Make sure you are using the latest version.
* Make sure you read [installation](http://unisharp.github.io/laravel-filemanager/installation), [integration](http://unisharp.github.io/laravel-filemanager/integration), and [upgrade](http://unisharp.github.io/laravel-filemanager/upgrade) document.
And provide the followings :
* Operating system :
* Laravel version :
* Package version :
* Steps to reproduce your issue :
* Screenshots of browser console :

View file

@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View file

@ -0,0 +1,4 @@
/vendor
composer.lock
/docs/Gemfile.lock
/docs/_site

View file

@ -0,0 +1 @@
preset: psr2

View file

@ -0,0 +1,19 @@
language: php
php:
- 7.2
- 7.1
- 7.0
- 5.6
matrix:
fast_finish: true
allow_failures:
- php: 5.6
before_script:
- travis_retry composer self-update
- travis_retry composer install --no-interaction --prefer-source
script:
- vendor/bin/phpunit --verbose

View file

@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at service@unisharp.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq

View file

@ -0,0 +1,13 @@
## Steps to contribute
1. Fork [unisharp/laravel-filemanager](https://github.com/UniSharp/laravel-filemanager) from GitHub.
1. Run commands below:
```
git clone git@github.com:UniSharp/laravel-filemanager-example-5.3.git
cd laravel-filemanager-example-5.3
composer require unisharp/laravel-filemanager:dev-master
make init
```
1. Edit codes in `vendor/unisharp/laravel-filemanager`
1. Push your changes to your fork.
1. Send a pull request to [unisharp/laravel-filemanager](https://github.com/UniSharp/laravel-filemanager).

View file

@ -0,0 +1,23 @@
The MIT License (MIT)
Copyright (c) 2015 Trevor Sawler <https://github.com/tsawler>
Copyright (c) 2015-2017 All contributors from GitHub
Copyright (c) 2015-2017 UniSharp
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -0,0 +1,3 @@
test:
vendor/bin/phpunit --coverage-text
vendor/bin/phpcs --version && echo && vendor/bin/phpcs -p --standard=PSR2 --ignore=src/lang/,src/views/ src tests

View file

@ -0,0 +1,2 @@
#### (optional) Issue number:
#### Summary of the change:

View file

@ -0,0 +1,110 @@
<p align="center"><img src="https://unisharp.github.io/laravel-filemanager/images/logo_vertical_colored.png"></p>
<p align="center">
<a target="_blank" href="https://travis-ci.org/UniSharp/laravel-filemanager"><img src="https://img.shields.io/travis/UniSharp/laravel-filemanager.svg"></a>
<a target="_blank" href="https://packagist.org/packages/unisharp/laravel-filemanager"><img src="https://poser.pugx.org/unisharp/laravel-filemanager/downloads"></a>
<a target="_blank" href="https://packagist.org/packages/unisharp/laravel-filemanager"><img src="https://img.shields.io/badge/unstable-v2.0.0--alpha8-orange.svg"></a>
<a target="_blank" href="https://packagist.org/packages/unisharp/laravel-filemanager"><img src="https://poser.pugx.org/unisharp/laravel-filemanager/v/stable"></a>
<a target="_blank" href="https://packagist.org/packages/unisharp/laravel-filemanager"><img src="https://poser.pugx.org/unisharp/laravel-filemanager/license"></a>
</p>
<p align="center">
<a href="http://unisharp.github.io/laravel-filemanager/">Documents</a>
<a href="http://unisharp.github.io/laravel-filemanager/installation">Installation</a>
<a href="http://unisharp.github.io/laravel-filemanager/integration">Integration</a>
<a href="http://unisharp.github.io/laravel-filemanager/config">Config</a>
<a href="http://unisharp.github.io/laravel-filemanager/customization">Customization</a>
<a href="http://unisharp.github.io/laravel-filemanager/events">Events</a>
<a href="http://unisharp.github.io/laravel-filemanager/upgrade">Upgrade</a>
<a href="https://github.com/UniSharp/laravel-filemanager-example-5.3">Demo</a>
<a href="https://github.com/UniSharp/laravel-filemanager/wiki">FAQ</a>
</p>
## Installing alpha version
The alpha version of `v2.0` contains support of cloud storage and fresh new UI with RWD.
* Run `composer require unisharp/laravel-filemanager:dev-master` to get the latest code.
* Run `composer require unisharp/laravel-filemanager:v2.0.0-alpha8` to get the latest release of alpha version.
## v2.0 progress
* [x] (done) Unit test
* [x] (done) Integrate with Laravel Storage
* [x] (done) Multiple selection
* [x] (done) Responsive design
* [x] (done) Config refactoring
* [x] (done) JSON APIs
* [x] (done) Move to folder function
* [x] (done) Applying MIME icon generator
* [x] (done) Refactor floating action buttons
* [x] (done) Configurable disk of storage
* [x] (done) Bootstrap 4 support
* [x] (done) Remove bootbox
* [ ] Documents for v2.0
* [x] (done) Resize function RWD refactor
* [ ] ConfigHandler should overwrite most configs
* [ ] Events should pass object instead of only file path
* [ ] Add more events for files and folders manipulation
## Documents of V1
https://github.com/UniSharp/laravel-filemanager/tree/v1/docs
## Errors with namespace
We have changed namespace from `Unisharp` to `UniSharp`, and change the first character of every namespace into capital.
If you are updating this package and encounter any errors like `Class not found`, please remove this package entirely and reinstall again.
## v1.8 released
* Please follow the intructions in [upgrade document](https://unisharp.github.io/laravel-filemanager/upgrade).
* Important changes :
* Fix Windows compatibility (utf-8 file names and folder names).
* New feature : Copy & Crop. Thanks [gwleuverink](https://github.com/gwleuverink).
* [Config document](https://unisharp.github.io/laravel-filemanager/config) is refactored.
## Security
It is important to note that if you use your own routes **you must protect your routes to Laravel-Filemanager in order to prevent unauthorized uploads to your server**. Fortunately, Laravel makes this very easy.
If, for example, you want to ensure that only logged in users have the ability to access the Laravel-Filemanager, simply wrap the routes in a group, perhaps like this:
```php
Route::group(['middleware' => 'auth'], function () {
Route::get('/laravel-filemanager', '\UniSharp\LaravelFilemanager\Controllers\LfmController@show');
Route::post('/laravel-filemanager/upload', '\UniSharp\LaravelFilemanager\Controllers\UploadController@upload');
// list all lfm routes here...
});
```
This approach ensures that only authenticated users have access to the Laravel-Filemanager. If you are using Middleware or some other approach to enforce security, modify as needed.
**If you use the laravel-filemanager default route, make sure the `auth` middleware (set in config/lfm.php) is enabled and functional**.
## Contributors & Credits
### Developers / Maintainers
* [Stream](https://github.com/g0110280)
* [@gwleuverink](https://github.com/gwleuverink)
* All [@UniSharp](https://github.com/UniSharp) members
### Contributors
* [All contibutors](https://github.com/UniSharp/laravel-filemanager/graphs/contributors) from GitHub. (issues / PR)
* [@taswler](https://github.com/tsawler) the original author of this package.
* Nathan for providing security suggestions.
* [@mdnazmulhasan27771](https://github.com/mdnazmulhasan27771) the designer of our logo. (Licensed CC BY 4.0)
### Credits
* [@olivervogel](https://github.com/olivervogel) for the awesome [image library](https://github.com/Intervention/image).
* SVG Loaders by [Sam](http://samherbert.net/svg-loaders/) (Licensed MIT)
* Articles and videos which helped promoting this package.
* All users and you.

View file

@ -0,0 +1,61 @@
{
"name": "iqcontent/laravel-filemanager",
"description": "A file upload/editor intended for use with Laravel 5 and CKEditor / TinyMCE",
"license": "MIT",
"keywords": [
"filemanager",
"laravel",
"ckeditor",
"tinymce",
"upload",
"file",
"manager",
"image"
],
"authors": [
{
"name": "Kevin Adametz",
"email": "info@adametz.media"
}
],
"require": {
"php": ">=7.1.3",
"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.*",
"cviebrock/eloquent-sluggable": "*"
},
"require-dev": {
"phpunit/phpunit": "^6.2",
"mockery/mockery": "^0.9.9",
"squizlabs/php_codesniffer": "^3.1"
},
"suggest": {
"ext-gd": "to use GD library based image processing.",
"ext-imagick": "to use Imagick based image processing."
},
"autoload": {
"psr-4": {
"IqContent\\LaravelFilemanager\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests"
}
},
"extra": {
"laravel": {
"providers": [
"IqContent\\LaravelFilemanager\\LaravelFilemanagerServiceProvider"
],
"aliases": {
}
}
}
}

View file

@ -0,0 +1,51 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateIQContentFoldersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('i_q_content_folders', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('folder_id')->nullable()->index();
$table->string('name')->index();
$table->string('slug')->unique()->index();
$table->string('identifier')->nullable();
$table->string('path')->nullable();
$table->unsignedTinyInteger('color')->default(0);
$table->unsignedTinyInteger('pos')->default(0);
$table->boolean('active')->default(true);
$table->timestamps();
$table->foreign('folder_id')
->references('id')
->on('i_q_content_folders')
->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('i_q_content_folders');
}
}

View file

@ -0,0 +1,55 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateIQContentFilesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('i_q_content_files', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('folder_id')->nullable()->index();
$table->string('name')->index();
$table->string('identifier')->nullable();
$table->string('slug')->unique()->index();
$table->string('ext', 10)->nullable();
$table->string('mine', 100)->nullable();
$table->unsignedInteger('size')->unsigned();
$table->string('dimensions', 100)->nullable();
$table->text('content')->nullable();
$table->unsignedTinyInteger('color')->default(0);
$table->unsignedTinyInteger('pos')->default(0);
$table->boolean('active')->default(true);
$table->timestamps();
$table->foreign('folder_id')
->references('id')
->on('i_q_content_folders')
->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('i_q_content_files');
}
}

View file

@ -0,0 +1,39 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateIQContentCategoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('i_q_content_categories', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name')->index();
$table->string('slug')->unique()->index();
$table->unsignedTinyInteger('pos')->default(0);
$table->boolean('active')->default(true);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('i_q_content_categories');
}
}

View file

@ -0,0 +1,45 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateIQContentTagsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('i_q_content_tags', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('category_id')->index();
$table->string('name')->index();
$table->string('slug')->unique()->index();
$table->unsignedTinyInteger('pos')->default(0);
$table->boolean('active')->default(true);
$table->timestamps();
$table->foreign('category_id')
->references('id')
->on('i_q_content_categories')
->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('i_q_content_tags');
}
}

View file

@ -0,0 +1,49 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateIQContentFileTagsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('i_q_content_file_tags', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('file_id')->index();
$table->unsignedBigInteger('tag_id')->index();
$table->timestamps();
$table->foreign('file_id')
->references('id')
->on('i_q_content_files')
->onDelete('cascade');
$table->foreign('tag_id')
->references('id')
->on('i_q_content_tags')
->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('i_q_content_file_tags');
}
}

View file

@ -0,0 +1,2 @@
source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins

View file

@ -0,0 +1,11 @@
theme: jekyll-theme-cayman
# Setup
title: Laravel File Manager
description: It's like Dropbox for your Laravel app.
google_analytics: UA-92410814-4
# About/contact
author:
name: UniSharp
url: https://github.com/UniSharp

View file

@ -0,0 +1,140 @@
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<title>{{ page.title | default: site.title }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#157878">
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
<style>
h1.project-name {
margin-top: 100px;
}
h2.project-tagline {
margin-bottom: 5rem;
}
#nav > span > a {
color: #dddddd;
}
#nav > span:not(:last-child)::after {
content: ' |';
color: #dddddd;
}
.button-group {
display: flex;
justify-content: center;
margin-bottom: 30px;
}
@media screen and (max-width: 42em) {
a.btn {
width: 50%;
margin: 0;
}
a.btn + a.btn {
margin-top: 0;
margin-left: 15px;
}
}
.main-content {
padding: 1rem !important;
}
#carbonads {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif;
overflow: hidden;
background-color: rgba(0, 0, 0, .05);
font-size: 14px;
padding: 15px 15px 15px 160px;
}
#carbonads a {
text-decoration: none;
}
#carbonads a:hover {
color: inherit;
}
.carbon-img {
float: left;
margin-left: -145px;
width: 130px;
height: 100px;
}
.carbon-img img {
width: 130px;
height: 100px;
}
.carbon-text {
color: #333;
}
.carbon-poweredby {
display: block;
color: #777;
}
@media only screen and (min-width: 400px) {
#carbonads {
max-width: 330px;
}
}
</style>
</head>
<body>
<section class="page-header">
<h1 class="project-name">{{ site.title | default: site.github.repository_name }}</h1>
<h2 class="project-tagline">{{ site.description | default: site.github.project_tagline }}</h2>
<div class="button-group">
<a class="btn" href="https://github.com/UniSharp/laravel-filemanager-example-5.3" target="_blank">Demo</a>
{% if site.github.is_project_page %}
<a href="{{ site.github.repository_url }}" class="btn">View on GitHub</a>
{% endif %}
{% if site.show_downloads %}
<a href="{{ site.github.zip_url }}" class="btn">Download .zip</a>
<a href="{{ site.github.tar_url }}" class="btn">Download .tar.gz</a>
{% endif %}
</div>
<nav id="nav">
<span><a href="/laravel-filemanager">Home</a></span>
<span><a href="installation">Installation</a></span>
<span><a href="integration">Integration</a></span>
<span><a href="config">Config</a></span>
<span><a href="customization">Customization</a></span>
<span><a href="events">Events</a></span>
<span><a href="upgrade">Upgrade</a></span>
<span><a href="contribution">Contribution</a></span>
</nav>
</section>
<section class="main-content">
<script async type="text/javascript" src="//cdn.carbonads.com/carbon.js?serve=CK7DE2JL&placement=unisharpgithubio" id="_carbonads_js"></script>
{{ content }}
<footer class="site-footer">
{% if site.github.is_project_page %}
<span class="site-footer-owner"><a href="{{ site.github.repository_url }}">{{ site.github.repository_name }}</a> is maintained by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a>.</span>
{% endif %}
<span class="site-footer-credits">This page was generated by <a href="https://pages.github.com">GitHub Pages</a>.</span>
</footer>
</section>
{% if site.google_analytics %}
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '{{ site.google_analytics }}', 'auto');
ga('send', 'pageview');
</script>
{% endif %}
</body>
</html>

View file

@ -0,0 +1,103 @@
**The config is in `config/lfm.php`.**
## Routing:
| Key | Type | Description |
|----------------------|---------|--------------------------------------------------------------------------------------------------------------|
| use\_package\_routes | boolean | Use routes from package or not. If false, you will need to define routes to all controllers of this package. |
| middlewares | array | Middlewares to be applied to default routes. For laravel 5.1 and before, remove 'web' from the array. |
| url_prefix | string | The url prefix to this package. Change it if necessary. |
## Multi-User Mode:
| Key | Type | Description |
|----------------------|---------|------------------------------------------------------------------------------------------------|
| allow\_multi\_user | boolean | If true, private folders will be created for each signed-in user. |
| allow\_share\_folder | boolean | If true, share folder will be created. |
| user_field | string | Private folders will be named by this. Can receive column name of `users` table or class name. |
### If you want to name private folders other than columns of users table, follow these steps:
1. Run `php artisan vendor:publish --tag=lfm_handler`.
2. Fill `App\Handler\ConfigHandler::class` into `user_field`.
3. Edit `userField()` in the `App\Handler\ConfigHandler`
## Working Directory:
| Key | Type | Description |
|----------------------|--------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| base_directory | string | Which folder to store files in project, fill in 'public', 'resources', 'storage' and so on. Does not support path relative path like `../public_html` or `public/upload/user/`. |
| images\_folder\_name | string | Does not support path relative path like `../public_html` or `public/upload/user/`. |
| files\_folder\_name | string | Does not support path relative path like `../public_html` or `public/upload/user/`. |
| shared\_folder\_name | string | Does not support path relative path like `../public_html` or `public/upload/user/`. |
| thumb\_folder\_name | string | Does not support path relative path like `../public_html` or `public/upload/user/`. |
## Startup Views:
| Key | Type | Description |
|-----------------------|--------|-----------------------------------------------------------------|
| images\_startup\_view | string | The default display type for images. Supported: "grid", "list". |
| files\_startup\_view | string | The default display type for files. Supported: "grid", "list". |
## Upload / Validation:
| Key | Type | Description |
|----------------------------|---------|---------------------------------------------------------------------------|
| disk (Alpha version only) | string | Correspond to `disks` section in `config/filesystems.php`. |
| rename_file | string | If true, the uploaded file will be renamed to uniqid() + file extension. |
| alphanumeric_filename | string | If true, non-alphanumeric file name will be replaced with `_`. |
| alphanumeric_directory | boolean | If true, non-alphanumeric folder name will be rejected. |
| should\_validate\_size | boolean | If true, the size of uploading file will be verified. |
| max\_image\_size | int | Specify max size of uploading image. |
| max\_file\_size | int | Specify max size of uploading file. |
| should\_validate\_mime | boolean | If true, the mime type of uploading file will be verified. |
| valid\_image\_mimetypes | array | Array of mime types. Available since v1.3.0 . |
| should\_create\_thumbnails | boolean | If true, thumbnails will be created for faster loading. |
| raster\_mimetypes | array | Array of mime types. Thumbnails will be created only for these mimetypes. |
| create\_folder\_mode | int | Permission setting for folders created by this package. |
| create\_file\_mode | int | Permission setting for files uploaded to this package. |
| should\_change\_file\_mode | boolean | If true, it will attempt to chmod the file after upload |
| valid\_file\_mimetypes | array | Array of mime types. Available since v1.3.0 . |
##### Appendix:
* [full mime types list](http://docs.w3cub.com/http/basics_of_http/mime_types/complete_list_of_mime_types/)
* [Laravel File Storage](https://laravel.com/docs/master/filesystem)
## Thumbnail dimensions:
| Key | Type | Description |
|--------------------|--------|--------------------------------------------------|
| thumb\_img\_width | string | Width of thumbnail made when image is uploaded. |
| thumb\_img\_height | string | Height of thumbnail made when image is uploaded. |
## File Extension Information
| Key | Type | Description |
|-------------------|-------|---------------------------------------------|
| file\_type\_array | array | Map file extension with display names. |
| file\_icon\_array | array | Map file extension with icons(font-awsome). |
## php.ini override
| Key | Type | Description |
|---------------------|------------------|-----------------------------------------------------------------------------------------------------------------------------------|
| php\_ini\_overrides | array or boolean | These values override your php.ini settings before uploading files. Set these to false to ingnore and apply your php.ini settings |
### Caveats
The php\_ini\_overrides are applied on every request the filemanager does and are reset once the script has finished executing.
This has one drawback: any ini settings that you might want to change that apply to the request itself will not work.
For example, overriding these settings will not work:
* upload\_max\_filesize
* post\_max\_size
**Why this is expected behaviour:**
upload\_max\_filesize and post\_max\_size will get set but uploaded files are already passed to your PHP script before the settings are changed.

View file

@ -0,0 +1,13 @@
## Steps to contribute
1. Fork [unisharp/laravel-filemanager](https://github.com/UniSharp/laravel-filemanager) from GitHub.
1. Run commands below:
```
git clone git@github.com:UniSharp/laravel-filemanager-example-5.3.git
cd laravel-filemanager-example-5.3
composer require unisharp/laravel-filemanager:dev-master
make init
```
1. Edit codes in `vendor/unisharp/laravel-filemanager`
1. Push your changes to your fork.
1. Send a pull request to [unisharp/laravel-filemanager](https://github.com/UniSharp/laravel-filemanager).

View file

@ -0,0 +1,47 @@
## Routes
1. Edit `routes/web.php` :
Create route group to wrap package routes.
```php
Route::group(['prefix' => 'laravel-filemanager', 'middleware' => ['web', 'auth']], function () {
\UniSharp\LaravelFilemanager\Lfm::routes();
});
```
Make sure `auth` middleware is present to :
1. prevent unauthorized uploads
1. work properly with multi-user mode
1. Make sure urls below is correspond to your route (remember to include type parameter `?type=Images` or `?type=Files`) :
* CKEditor
```javascript
CKEDITOR.replace('editor', {
filebrowserImageBrowseUrl: '/your-custom-route?type=Images',
filebrowserBrowseUrl: '/your-custom-route?type=Files'
});
```
* TinyMCE
```javascript
...
var cmsURL = editor_config.path_absolute + 'your-custom-route?field_name='+field_name+'&lang='+ tinymce.settings.language;
if (type == 'image') {
cmsURL = cmsURL + "&type=Images";
} else {
cmsURL = cmsURL + "&type=Files";
}
...
```
## Views
Copy views to `resources/views/vendor/unisharp/laravel-filemanager/` :
```bash
php artisan vendor:publish --tag=lfm_view
```
## Translations
1. Copy `vendor/unisharp/laravel-filemanager/src/lang/en` to `/resources/lang/vendor/laravel-filemanager/<YOUR LANGUAGE>/lfm.php`.
1. Edit the file as you please.

View file

@ -0,0 +1,97 @@
## List of events
* UniSharp\LaravelFilemanager\Events\ImageIsUploading
* UniSharp\LaravelFilemanager\Events\ImageWasUploaded
* UniSharp\LaravelFilemanager\Events\ImageIsRenaming
* UniSharp\LaravelFilemanager\Events\ImageWasRenamed
* UniSharp\LaravelFilemanager\Events\ImageIsDeleting
* UniSharp\LaravelFilemanager\Events\ImageWasDeleted
* UniSharp\LaravelFilemanager\Events\FolderIsRenaming
* UniSharp\LaravelFilemanager\Events\FolderWasRenamed
* UniSharp\LaravelFilemanager\Events\ImageIsResizing
* UniSharp\LaravelFilemanager\Events\ImageWasResized
* UniSharp\LaravelFilemanager\Events\ImageIsCropping
* UniSharp\LaravelFilemanager\Events\ImageWasCropped
## How to use
* Sample code : [laravel-filemanager-demo-events](https://github.com/UniSharp/laravel-filemanager-demo-events)
* To use events you can add a listener to listen to the events.
Snippet for `EventServiceProvider`
```php
protected $listen = [
ImageWasUploaded::class => [
UploadListener::class,
],
];
```
The `UploadListener` will look like:
```php
class UploadListener
{
public function handle($event)
{
$method = 'on'.class_basename($event);
if (method_exists($this, $method)) {
call_user_func([$this, $method], $event);
}
}
public function onImageWasUploaded(ImageWasUploaded $event)
{
$path = $event->path();
//your code, for example resizing and cropping
}
}
```
* Or by using Event Subscribers
Snippet for `EventServiceProvider`
```php
protected $subscribe = [
UploadListener::class
];
```
The `UploadListener` will look like:
```php
public function subscribe($events)
{
$events->listen('*', UploadListener::class);
}
public function handle($event)
{
$method = 'on'.class_basename($event);
if (method_exists($this, $method)) {
call_user_func([$this, $method], $event);
}
}
public function onImageWasUploaded(ImageWasUploaded $event)
{
$path = $event->path();
// your code, for example resizing and cropping
}
public function onImageWasRenamed(ImageWasRenamed $event)
{
// image was renamed
}
public function onImageWasDeleted(ImageWasDeleted $event)
{
// image was deleted
}
public function onFolderWasRenamed(FolderWasRenamed $event)
{
// folder was renamed
}
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 966 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -0,0 +1,29 @@
[![Latest Stable Version](https://poser.pugx.org/unisharp/laravel-filemanager/v/stable)](https://packagist.org/packages/unisharp/laravel-filemanager)
[![Total Downloads](https://poser.pugx.org/unisharp/laravel-filemanager/downloads)](https://packagist.org/packages/unisharp/laravel-filemanager)
[![License](https://poser.pugx.org/unisharp/laravel-filemanager/license)](https://packagist.org/packages/unisharp/laravel-filemanager)
## Features
* CKEditor and TinyMCE integration
* Standalone button
* Uploading validation
* Cropping and resizing of images
* Public and private folders for multi users
* Customizable routes, middlewares, views, and folder path
* Supports two types : files and images. Each type works in different directory.
* Supported locales : ar, bg, de, el, en, es, fa, fr, it, he, hu, nl, pl, pt-BR, pt_PT, ro, ru, sv, tr, zh-CN, zh-TW
PR is welcome!
## Screenshots
> Standalone button :
![Standalone button demo](https://unisharp.github.io/laravel-filemanager/images/lfm01.png)
> Grid view :
![Grid view demo](https://unisharp.github.io/laravel-filemanager/images/lfm02.png)
> List view :
![List view demo](https://unisharp.github.io/laravel-filemanager/images/lfm03.png)

View file

@ -0,0 +1,64 @@
## Requirements
* php >= 5.4
* exif extension
* fileinfo extension
* GD Library >=2.0 or Imagick PHP extension >=6.5.7
* Laravel 5
* requires [intervention/image](https://github.com/Intervention/image) (to make thumbs, crop and resize images).
## Installation
1. Install package
```bash
composer require unisharp/laravel-filemanager:~1.8
```
1. (optional) Edit `config/app.php` :
\* *For Laravel 5.5 and up, skip to step 3. All service providers and facades are automatically discovered.*
Add service providers
```php
UniSharp\LaravelFilemanager\LaravelFilemanagerServiceProvider::class,
Intervention\Image\ImageServiceProvider::class,
```
And add class aliases
```php
'Image' => Intervention\Image\Facades\Image::class,
```
Code above is for Laravel 5.1.
In Laravel 5.0 should leave only quoted class names.
1. Publish the package's config and assets :
```bash
php artisan vendor:publish --tag=lfm_config
php artisan vendor:publish --tag=lfm_public
```
1. Run commands to clear cache :
```bash
php artisan route:clear
php artisan config:clear
```
1. Ensure that the files & images directories (in `config/lfm.php`) are writable by your web server (run commands like `chown` or `chmod`).
1. Create symbolic link :
```bash
php artisan storage:link
```
1. Edit `APP_URL` in `.env`.
## What's next
1. Check the [integration document](http://unisharp.github.io/laravel-filemanager/integration) to see how to apply this package.
1. Check the [config document](http://unisharp.github.io/laravel-filemanager/config) to discover the flexibility of this package.

View file

@ -0,0 +1,205 @@
## Note
Check `vendor/unisharp/laravel-filemanager/src/views/demo.blade.php`, which already integrated all options from below.
## WYSIWYG Editor Integration:
### Option 1: CKEditor
```html
<textarea id="my-editor" name="content" class="form-control">{!! old('content', 'test editor content') !!}</textarea>
<script src="//cdn.ckeditor.com/4.6.2/standard/ckeditor.js"></script>
<script>
var options = {
filebrowserImageBrowseUrl: '/laravel-filemanager?type=Images',
filebrowserImageUploadUrl: '/laravel-filemanager/upload?type=Images&_token={{csrf_token()}}',
filebrowserBrowseUrl: '/laravel-filemanager?type=Files',
filebrowserUploadUrl: '/laravel-filemanager/upload?type=Files&_token={{csrf_token()}}'
};
</script>
```
* Sample 1 - Replace by ID:
```html
<script>
CKEDITOR.replace('my-editor', options);
</script>
```
* Sample 2 - With JQuery Selector:
```html
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="/vendor/unisharp/laravel-ckeditor/adapters/jquery.js"></script>
<script>
$('textarea.my-editor').ckeditor(options);
</script>
```
### Option 2: TinyMCE4
```html
<script src="//cdn.tinymce.com/4/tinymce.min.js"></script>
<textarea name="content" class="form-control my-editor">{!! old('content', $content) !!}</textarea>
<script>
var editor_config = {
path_absolute : "/",
selector: "textarea.my-editor",
plugins: [
"advlist autolink lists link image charmap print preview hr anchor pagebreak",
"searchreplace wordcount visualblocks visualchars code fullscreen",
"insertdatetime media nonbreaking save table contextmenu directionality",
"emoticons template paste textcolor colorpicker textpattern"
],
toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media",
relative_urls: false,
file_browser_callback : function(field_name, url, type, win) {
var x = window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth;
var y = window.innerHeight|| document.documentElement.clientHeight|| document.getElementsByTagName('body')[0].clientHeight;
var cmsURL = editor_config.path_absolute + 'laravel-filemanager?field_name=' + field_name;
if (type == 'image') {
cmsURL = cmsURL + "&type=Images";
} else {
cmsURL = cmsURL + "&type=Files";
}
tinyMCE.activeEditor.windowManager.open({
file : cmsURL,
title : 'Filemanager',
width : x * 0.8,
height : y * 0.8,
resizable : "yes",
close_previous : "no"
});
}
};
tinymce.init(editor_config);
</script>
```
### Option 3: Summernote
```html
<!-- dependencies (Summernote depends on Bootstrap & jQuery) -->
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.css" rel="stylesheet">
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.js"></script>
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.js"></script>
<link href="http://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.3/summernote.css" rel="stylesheet">
<script src="http://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.3/summernote.js"></script>
<!-- markup -->
<textarea id="summernote-editor" name="content">{!! old('content', $content) !!}</textarea>
<!-- summernote config -->
<script>
$(document).ready(function(){
// Define function to open filemanager window
var lfm = function(options, cb) {
var route_prefix = (options && options.prefix) ? options.prefix : '/laravel-filemanager';
window.open(route_prefix + '?type=' + options.type || 'file', 'FileManager', 'width=900,height=600');
window.SetUrl = cb;
};
// Define LFM summernote button
var LFMButton = function(context) {
var ui = $.summernote.ui;
var button = ui.button({
contents: '<i class="note-icon-picture"></i> ',
tooltip: 'Insert image with filemanager',
click: function() {
lfm({type: 'image', prefix: '/laravel-filemanager'}, function(lfmItems, path) {
lfmItems.forEach(function (lfmItem) {
context.invoke('insertImage', lfmItem.url);
});
});
}
});
return button.render();
};
// Initialize summernote with LFM button in the popover button group
// Please note that you can add this button to any other button group you'd like
$('#summernote-editor').summernote({
toolbar: [
['popovers', ['lfm']],
],
buttons: {
lfm: LFMButton
}
})
});
</script>
```
## Standalone button
If you are going to use filemanager independently, meaning set the value of an input to selected photo/file url, follow this structure:
1. Create a button, input, and image preview holder if you are going to choose images.
Specify the id to the input and image preview by `data-input` and `data-preview`.
```html
<div class="input-group">
<span class="input-group-btn">
<a id="lfm" data-input="thumbnail" data-preview="holder" class="btn btn-primary">
<i class="fa fa-picture-o"></i> Choose
</a>
</span>
<input id="thumbnail" class="form-control" type="text" name="filepath">
</div>
<img id="holder" style="margin-top:15px;max-height:100px;">
```
1. Import lfm.js(run `php artisan vendor:publish` if you need).
```html
<script src="/vendor/laravel-filemanager/js/stand-alone-button.js"></script>
```
1. Init filemanager with type. (requires jQuery)
```javascript
$('#lfm').filemanager('image');
```
or
```javascript
$('#lfm').filemanager('file');
```
Domain can be specified in the second parameter(optional, but will be required when developing on Windows mechines) :
```javascript
var domain = "{{ url() }}";
$('#lfm').filemanager('image', {prefix: domain});
```
## JavaScript integration
In case you are developing javascript application and you want dynamically to trigger filemanager popup, you can create function like this. It doesn't rely on jQuery.
```javascript
var lfm = function(options, cb) {
var route_prefix = (options && options.prefix) ? options.prefix : '/laravel-filemanager';
window.open(route_prefix + '?type=' + options.type || 'file', 'FileManager', 'width=900,height=600');
window.SetUrl = cb;
}
```
And use it like this:
```javascript
lfm({type: 'image', prefix: 'prefix'}, function(url, path) {
});
```
## Embed file manager
```html
<iframe src="/laravel-filemanager" style="width: 100%; height: 500px; overflow: hidden; border: none;"></iframe>
```

View file

@ -0,0 +1,23 @@
## Upgrade instructions
1. Please backup your own `config/lfm.php` before upgrading.
1. Run commands:
```bash
composer update unisharp/laravel-filemanager
php artisan vendor:publish --tag=lfm_view --force
php artisan vendor:publish --tag=lfm_public --force
php artisan vendor:publish --tag=lfm_config --force
php artisan route:clear
php artisan config:clear
```
1. Clear browser cache if page is broken after upgrading.
## Errors with namespace
We have changed namespace from `Unisharp` to `UniSharp`, and change the first character of every namespace into capital.
If you are updating this package and encounter any errors like `Class not found`, please remove this package entirely and reinstall again.

Some files were not shown because too many files have changed in this diff Show more