Your Shop creates, verify user

This commit is contained in:
Kevin Adametz 2019-01-04 18:46:48 +01:00
parent c129a44383
commit ccc2af4bf7
76 changed files with 3728 additions and 1477 deletions

4
.env
View file

@ -2,7 +2,9 @@ APP_NAME="mivita.care"
APP_ENV=local
APP_DEBUG=true
APP_KEY=base64:HrWQ9AV3Zt2TU0iq1OeUUpTUaXwNUdh8xHmx7RXTif4=
APP_URL=http://mivita.local/login
APP_URL=http://mivita.local/
APP_DOMAIN=mivita.local
APP_PROTOCOL=http://
LOG_CHANNEL=stack

3
.idea/mivita.care.iml generated
View file

@ -4,6 +4,7 @@
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" packagePrefix="Tests\" />
<sourceFolder url="file://$MODULE_DIR$/app" isTestSource="false" packagePrefix="App\" />
<excludeFolder url="file://$MODULE_DIR$/vendor/askedio/laravel5-profanity-filter" />
<excludeFolder url="file://$MODULE_DIR$/vendor/barryvdh/laravel-ide-helper" />
<excludeFolder url="file://$MODULE_DIR$/vendor/barryvdh/reflection-docblock" />
<excludeFolder url="file://$MODULE_DIR$/vendor/cocur/slugify" />
@ -64,6 +65,7 @@
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/log" />
<excludeFolder url="file://$MODULE_DIR$/vendor/psr/simple-cache" />
<excludeFolder url="file://$MODULE_DIR$/vendor/psy/psysh" />
<excludeFolder url="file://$MODULE_DIR$/vendor/ralouphie/getallheaders" />
<excludeFolder url="file://$MODULE_DIR$/vendor/ramsey/uuid" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/code-unit-reverse-lookup" />
<excludeFolder url="file://$MODULE_DIR$/vendor/sebastian/comparator" />
@ -80,6 +82,7 @@
<excludeFolder url="file://$MODULE_DIR$/vendor/seld/phar-utils" />
<excludeFolder url="file://$MODULE_DIR$/vendor/swiftmailer/swiftmailer" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/console" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/contracts" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/css-selector" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/debug" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/event-dispatcher" />

3
.idea/php.xml generated
View file

@ -100,6 +100,9 @@
<path value="$PROJECT_DIR$/vendor/cocur/slugify" />
<path value="$PROJECT_DIR$/vendor/cviebrock/eloquent-sluggable" />
<path value="$PROJECT_DIR$/vendor/gloudemans/shoppingcart" />
<path value="$PROJECT_DIR$/vendor/symfony/contracts" />
<path value="$PROJECT_DIR$/vendor/ralouphie/getallheaders" />
<path value="$PROJECT_DIR$/vendor/askedio/laravel5-profanity-filter" />
</include_path>
</component>
<component name="PhpProjectSharedConfiguration" php_language_level="7.1" />

1
.idea/symfony2.xml generated
View file

@ -3,5 +3,6 @@
<component name="Symfony2PluginSettings">
<option name="directoryToWeb" value="public" />
<option name="pluginEnabled" value="true" />
<option name="lastServiceGeneratorLanguage" value="yaml" />
</component>
</project>

1039
.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 2018-11-22 15:17:36.
* Generated on 2019-01-03 18:54:53.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
* @see https://github.com/barryvdh/laravel-ide-helper
@ -144,6 +144,7 @@ namespace PHPSTORM_META {
'migration.repository' => \Illuminate\Database\Migrations\DatabaseMigrationRepository::class,
'migrator' => \Illuminate\Database\Migrations\Migrator::class,
'phpexcel' => \Maatwebsite\Excel\Classes\PHPExcel::class,
'profanityFilter' => \Askedio\Laravel5ProfanityFilter\ProfanityFilter::class,
'queue' => \Illuminate\Queue\QueueManager::class,
'queue.connection' => \Illuminate\Queue\SyncQueue::class,
'queue.failer' => \Illuminate\Queue\Failed\DatabaseFailedJobProvider::class,
@ -298,6 +299,7 @@ namespace PHPSTORM_META {
'migration.repository' => \Illuminate\Database\Migrations\DatabaseMigrationRepository::class,
'migrator' => \Illuminate\Database\Migrations\Migrator::class,
'phpexcel' => \Maatwebsite\Excel\Classes\PHPExcel::class,
'profanityFilter' => \Askedio\Laravel5ProfanityFilter\ProfanityFilter::class,
'queue' => \Illuminate\Queue\QueueManager::class,
'queue.connection' => \Illuminate\Queue\SyncQueue::class,
'queue.failer' => \Illuminate\Queue\Failed\DatabaseFailedJobProvider::class,
@ -452,6 +454,7 @@ namespace PHPSTORM_META {
'migration.repository' => \Illuminate\Database\Migrations\DatabaseMigrationRepository::class,
'migrator' => \Illuminate\Database\Migrations\Migrator::class,
'phpexcel' => \Maatwebsite\Excel\Classes\PHPExcel::class,
'profanityFilter' => \Askedio\Laravel5ProfanityFilter\ProfanityFilter::class,
'queue' => \Illuminate\Queue\QueueManager::class,
'queue.connection' => \Illuminate\Queue\SyncQueue::class,
'queue.failer' => \Illuminate\Queue\Failed\DatabaseFailedJobProvider::class,
@ -606,6 +609,7 @@ namespace PHPSTORM_META {
'migration.repository' => \Illuminate\Database\Migrations\DatabaseMigrationRepository::class,
'migrator' => \Illuminate\Database\Migrations\Migrator::class,
'phpexcel' => \Maatwebsite\Excel\Classes\PHPExcel::class,
'profanityFilter' => \Askedio\Laravel5ProfanityFilter\ProfanityFilter::class,
'queue' => \Illuminate\Queue\QueueManager::class,
'queue.connection' => \Illuminate\Queue\SyncQueue::class,
'queue.failer' => \Illuminate\Queue\Failed\DatabaseFailedJobProvider::class,
@ -760,6 +764,7 @@ namespace PHPSTORM_META {
'migration.repository' => \Illuminate\Database\Migrations\DatabaseMigrationRepository::class,
'migrator' => \Illuminate\Database\Migrations\Migrator::class,
'phpexcel' => \Maatwebsite\Excel\Classes\PHPExcel::class,
'profanityFilter' => \Askedio\Laravel5ProfanityFilter\ProfanityFilter::class,
'queue' => \Illuminate\Queue\QueueManager::class,
'queue.connection' => \Illuminate\Queue\SyncQueue::class,
'queue.failer' => \Illuminate\Queue\Failed\DatabaseFailedJobProvider::class,
@ -914,6 +919,7 @@ namespace PHPSTORM_META {
'migration.repository' => \Illuminate\Database\Migrations\DatabaseMigrationRepository::class,
'migrator' => \Illuminate\Database\Migrations\Migrator::class,
'phpexcel' => \Maatwebsite\Excel\Classes\PHPExcel::class,
'profanityFilter' => \Askedio\Laravel5ProfanityFilter\ProfanityFilter::class,
'queue' => \Illuminate\Queue\QueueManager::class,
'queue.connection' => \Illuminate\Queue\SyncQueue::class,
'queue.failer' => \Illuminate\Queue\Failed\DatabaseFailedJobProvider::class,
@ -1068,6 +1074,7 @@ namespace PHPSTORM_META {
'migration.repository' => \Illuminate\Database\Migrations\DatabaseMigrationRepository::class,
'migrator' => \Illuminate\Database\Migrations\Migrator::class,
'phpexcel' => \Maatwebsite\Excel\Classes\PHPExcel::class,
'profanityFilter' => \Askedio\Laravel5ProfanityFilter\ProfanityFilter::class,
'queue' => \Illuminate\Queue\QueueManager::class,
'queue.connection' => \Illuminate\Queue\SyncQueue::class,
'queue.failer' => \Illuminate\Queue\Failed\DatabaseFailedJobProvider::class,

View file

@ -3,7 +3,7 @@
/**
* A helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.6.39 on 2018-11-22 15:17:35.
* Generated for Laravel 5.6.39 on 2019-01-03 18:54:52.
*
* This file should not be included in your code, only analyzed by your IDE!
*
@ -6034,12 +6034,12 @@ namespace Illuminate\Support\Facades {
*
* @param string $message The log message
* @param array $context The log context
* @return Boolean Whether the record has been processed
* @return bool Whether the record has been processed
* @static
*/
public static function debug($message, $context = array())
{
return \Monolog\Logger::debug($message, $context);
return \Monolog\Logger::addDebug($message, $context);
}
/**
@ -6047,12 +6047,12 @@ namespace Illuminate\Support\Facades {
*
* @param string $message The log message
* @param array $context The log context
* @return Boolean Whether the record has been processed
* @return bool Whether the record has been processed
* @static
*/
public static function info($message, $context = array())
{
return \Monolog\Logger::info($message, $context);
return \Monolog\Logger::addInfo($message, $context);
}
/**
@ -6060,12 +6060,12 @@ namespace Illuminate\Support\Facades {
*
* @param string $message The log message
* @param array $context The log context
* @return Boolean Whether the record has been processed
* @return bool Whether the record has been processed
* @static
*/
public static function notice($message, $context = array())
{
return \Monolog\Logger::notice($message, $context);
return \Monolog\Logger::addNotice($message, $context);
}
/**
@ -6073,12 +6073,12 @@ namespace Illuminate\Support\Facades {
*
* @param string $message The log message
* @param array $context The log context
* @return Boolean Whether the record has been processed
* @return bool Whether the record has been processed
* @static
*/
public static function warning($message, $context = array())
{
return \Monolog\Logger::warning($message, $context);
return \Monolog\Logger::addWarning($message, $context);
}
/**
@ -6086,12 +6086,12 @@ namespace Illuminate\Support\Facades {
*
* @param string $message The log message
* @param array $context The log context
* @return Boolean Whether the record has been processed
* @return bool Whether the record has been processed
* @static
*/
public static function error($message, $context = array())
{
return \Monolog\Logger::error($message, $context);
return \Monolog\Logger::addError($message, $context);
}
/**
@ -6099,12 +6099,12 @@ namespace Illuminate\Support\Facades {
*
* @param string $message The log message
* @param array $context The log context
* @return Boolean Whether the record has been processed
* @return bool Whether the record has been processed
* @static
*/
public static function critical($message, $context = array())
{
return \Monolog\Logger::critical($message, $context);
return \Monolog\Logger::addCritical($message, $context);
}
/**
@ -6112,12 +6112,12 @@ namespace Illuminate\Support\Facades {
*
* @param string $message The log message
* @param array $context The log context
* @return Boolean Whether the record has been processed
* @return bool Whether the record has been processed
* @static
*/
public static function alert($message, $context = array())
{
return \Monolog\Logger::alert($message, $context);
return \Monolog\Logger::addAlert($message, $context);
}
/**
@ -6125,12 +6125,12 @@ namespace Illuminate\Support\Facades {
*
* @param string $message The log message
* @param array $context The log context
* @return Boolean Whether the record has been processed
* @return bool Whether the record has been processed
* @static
*/
public static function emergency($message, $context = array())
{
return \Monolog\Logger::emergency($message, $context);
return \Monolog\Logger::addEmergency($message, $context);
}
/**
@ -8934,7 +8934,7 @@ namespace Illuminate\Support\Facades {
* Checks whether the method is cacheable or not.
*
* @see https://tools.ietf.org/html/rfc7231#section-4.2.3
* @return bool
* @return bool True for GET and HEAD, false otherwise
* @static
*/
public static function isMethodCacheable()
@ -9566,7 +9566,7 @@ namespace Illuminate\Support\Facades {
*/
public static function validate($rules, $params = null)
{
return \Illuminate\Http\Request::validate($rules, $params);
return \Illuminate\Http\Request::Illuminate\Foundation\Providers\{closure}($rules, $params);
}
/**
@ -9576,7 +9576,7 @@ namespace Illuminate\Support\Facades {
*/
public static function hasValidSignature()
{
return \Illuminate\Http\Request::hasValidSignature();
return \Illuminate\Http\Request::Illuminate\Foundation\Providers\{closure}();
}
}
@ -14789,7 +14789,7 @@ namespace Illuminate\Support\Facades {
* Checks whether the method is cacheable or not.
*
* @see https://tools.ietf.org/html/rfc7231#section-4.2.3
* @return bool
* @return bool True for GET and HEAD, false otherwise
* @static
*/
public static function isMethodCacheable()
@ -15421,7 +15421,7 @@ namespace Illuminate\Support\Facades {
*/
public static function validate($rules, $params = null)
{
return \Illuminate\Http\Request::validate($rules, $params);
return \Illuminate\Http\Request::Illuminate\Foundation\Providers\{closure}($rules, $params);
}
/**
@ -15431,7 +15431,7 @@ namespace Illuminate\Support\Facades {
*/
public static function hasValidSignature()
{
return \Illuminate\Http\Request::hasValidSignature();
return \Illuminate\Http\Request::Illuminate\Foundation\Providers\{closure}();
}
}
@ -17412,6 +17412,16 @@ namespace App\Services\Facade {
*/
class Yard {
/**
*
*
* @static
*/
public static function getTaxRate()
{
return \App\Services\Yard::getTaxRate();
}
/**
*
*
@ -17437,6 +17447,26 @@ namespace App\Services\Facade {
return \App\Services\Yard::shipping($decimals, $decimalPoint, $thousandSeperator);
}
/**
*
*
* @static
*/
public static function subtotalWithShipping($decimals = null, $decimalPoint = null, $thousandSeperator = null)
{
return \App\Services\Yard::subtotalWithShipping($decimals, $decimalPoint, $thousandSeperator);
}
/**
*
*
* @static
*/
public static function taxWithShipping($decimals = null, $decimalPoint = null, $thousandSeperator = null)
{
return \App\Services\Yard::taxWithShipping($decimals, $decimalPoint, $thousandSeperator);
}
/**
*
*
@ -17447,6 +17477,20 @@ namespace App\Services\Facade {
return \App\Services\Yard::totalWithShipping($decimals, $decimalPoint, $thousandSeperator);
}
/**
* Get the total price of the items in the cart.
*
* @param int $decimals
* @param string $decimalPoint
* @param string $thousandSeperator
* @return string
* @static
*/
public static function total($decimals = null, $decimalPoint = null, $thousandSeperator = null)
{
return \App\Services\Yard::total($decimals, $decimalPoint, $thousandSeperator);
}
/**
* Get the total tax of the items in the cart.
*
@ -17456,9 +17500,9 @@ namespace App\Services\Facade {
* @return float
* @static
*/
public static function taxWithShipping($decimals = null, $decimalPoint = null, $thousandSeperator = null)
public static function tax($decimals = null, $decimalPoint = null, $thousandSeperator = null)
{
return \App\Services\Yard::taxWithShipping($decimals, $decimalPoint, $thousandSeperator);
return \App\Services\Yard::tax($decimals, $decimalPoint, $thousandSeperator);
}
/**
@ -17470,19 +17514,9 @@ namespace App\Services\Facade {
* @return float
* @static
*/
public static function subtotalWithShipping($decimals = null, $decimalPoint = null, $thousandSeperator = null)
public static function subtotal($decimals = null, $decimalPoint = null, $thousandSeperator = null)
{
return \App\Services\Yard::subtotalWithShipping($decimals, $decimalPoint, $thousandSeperator);
}
/**
*
*
* @static
*/
public static function cardCalcSubTotal($price)
{
return \App\Services\Yard::cardCalcSubTotal($price);
return \App\Services\Yard::subtotal($decimals, $decimalPoint, $thousandSeperator);
}
/**
@ -17603,51 +17637,6 @@ namespace App\Services\Facade {
return \App\Services\Yard::count();
}
/**
* Get the total price of the items in the cart.
*
* @param int $decimals
* @param string $decimalPoint
* @param string $thousandSeperator
* @return string
* @static
*/
public static function total($decimals = null, $decimalPoint = null, $thousandSeperator = null)
{
//Method inherited from \Gloudemans\Shoppingcart\Cart
return \App\Services\Yard::total($decimals, $decimalPoint, $thousandSeperator);
}
/**
* Get the total tax of the items in the cart.
*
* @param int $decimals
* @param string $decimalPoint
* @param string $thousandSeperator
* @return float
* @static
*/
public static function tax($decimals = null, $decimalPoint = null, $thousandSeperator = null)
{
//Method inherited from \Gloudemans\Shoppingcart\Cart
return \App\Services\Yard::tax($decimals, $decimalPoint, $thousandSeperator);
}
/**
* Get the subtotal (total - tax) of the items in the cart.
*
* @param int $decimals
* @param string $decimalPoint
* @param string $thousandSeperator
* @return float
* @static
*/
public static function subtotal($decimals = null, $decimalPoint = null, $thousandSeperator = null)
{
//Method inherited from \Gloudemans\Shoppingcart\Cart
return \App\Services\Yard::subtotal($decimals, $decimalPoint, $thousandSeperator);
}
/**
* Search the cart content for a cart item matching the given search closure.
*

View file

@ -65,6 +65,12 @@ namespace App{
* @method static \Illuminate\Database\Eloquent\Builder|\App\User whereNotes($value)
* @method static \Illuminate\Database\Query\Builder|\App\User withTrashed()
* @method static \Illuminate\Database\Query\Builder|\App\User withoutTrashed()
* @property int|null $account_id
* @method static \Illuminate\Database\Eloquent\Builder|\App\User newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\User newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\User query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\User whereAccountId($value)
* @property-read \App\Models\UserShop $user_shop
*/
class User extends \Eloquent {}
}
@ -96,6 +102,9 @@ namespace App\Models{
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ProductCategory[] $product_categories
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Category findSimilarSlugs($attribute, $config, $slug)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Category whereSlug($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Category newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Category newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Category query()
*/
class Category extends \Eloquent {}
}
@ -106,6 +115,17 @@ namespace App\Models{
*
* @property-read \App\User $user
* @mixin \Eloquent
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserUpdateEmail newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserUpdateEmail newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserUpdateEmail query()
* @property int $user_id
* @property string $email
* @property string $token
* @property \Illuminate\Support\Carbon $created_at
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserUpdateEmail whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserUpdateEmail whereEmail($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserUpdateEmail whereToken($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserUpdateEmail whereUserId($value)
*/
class UserUpdateEmail extends \Eloquent {}
}
@ -179,6 +199,9 @@ namespace App\Models{
* @property string|null $slug
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product findSimilarSlugs($attribute, $config, $slug)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product whereSlug($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product query()
*/
class Product extends \Eloquent {}
}
@ -206,6 +229,9 @@ namespace App\Models{
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Country wherePhone($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Country whereRu($value)
* @mixin \Eloquent
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Country newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Country newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Country query()
*/
class Country extends \Eloquent {}
}
@ -239,92 +265,13 @@ namespace App\Models{
* @property string|null $slug
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductImage findSimilarSlugs($attribute, $config, $slug)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductImage whereSlug($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductImage newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductImage newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductImage query()
*/
class ProductImage extends \Eloquent {}
}
namespace App\Models{
/**
* App\Models\Account
*
* @property int $id
* @property int $user_id
* @property int $company
* @property string|null $company_name
* @property string|null $company_street
* @property string|null $company_postal_code
* @property string|null $company_city
* @property int|null $company_pre_phone_id
* @property string|null $company_phone
* @property string|null $company_homepage
* @property int|null $company_country_id
* @property string|null $salutation
* @property string|null $title
* @property string|null $first_name
* @property string|null $last_name
* @property string|null $street
* @property string|null $postal_code
* @property string|null $city
* @property int|null $country_id
* @property int|null $pre_phone_id
* @property string|null $phone
* @property int|null $pre_mobil_id
* @property string|null $mobil
* @property string|null $birthday
* @property string|null $website
* @property string|null $facebook
* @property string|null $facebook_fanpage
* @property string|null $instagram
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property \Illuminate\Support\Carbon|null $deleted_at
* @property-read \App\Models\Country|null $company_country
* @property-read \App\Models\Country|null $company_pre_phone
* @property-read \App\Models\Country|null $country
* @property-read \App\Models\Country|null $pre_mobil
* @property-read \App\Models\Country|null $pre_phone
* @property-read \App\User $user
* @method static bool|null forceDelete()
* @method static \Illuminate\Database\Query\Builder|\App\Models\Account onlyTrashed()
* @method static bool|null restore()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereBirthday($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereCity($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereCompany($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereCompanyCity($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereCompanyCountryId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereCompanyHomepage($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereCompanyName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereCompanyPhone($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereCompanyPostalCode($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereCompanyPrePhoneId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereCompanyStreet($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereCountryId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereDeletedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereFacebook($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereFacebookFanpage($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereFirstName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereInstagram($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereLastName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereMobil($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account wherePhone($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account wherePostalCode($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account wherePreMobilId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account wherePrePhoneId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereSalutation($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereStreet($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereTitle($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereUserId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereWebsite($value)
* @method static \Illuminate\Database\Query\Builder|\App\Models\Account withTrashed()
* @method static \Illuminate\Database\Query\Builder|\App\Models\Account withoutTrashed()
* @mixin \Eloquent
*/
class Account extends \Eloquent {}
}
namespace App\Models{
/**
* App\Models\Attribute
@ -350,10 +297,98 @@ namespace App\Models{
* @mixin \Eloquent
* @property string|null $slug
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Attribute whereSlug($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Attribute newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Attribute newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Attribute query()
*/
class Attribute extends \Eloquent {}
}
namespace App\Models{
/**
* App\Models\UserAccount
*
* @property-read \App\Models\Country $company_country
* @property-read \App\Models\Country $company_pre_phone
* @property-read \App\Models\Country $country
* @property mixed $birthday
* @property-read mixed $company
* @property-read \App\Models\Country $pre_mobil
* @property-read \App\Models\Country $pre_phone
* @property-read \App\User $user
* @method static bool|null forceDelete()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount newQuery()
* @method static \Illuminate\Database\Query\Builder|\App\Models\UserAccount onlyTrashed()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount query()
* @method static bool|null restore()
* @method static \Illuminate\Database\Query\Builder|\App\Models\UserAccount withTrashed()
* @method static \Illuminate\Database\Query\Builder|\App\Models\UserAccount withoutTrashed()
* @mixin \Eloquent
* @property int $id
* @property string|null $company_name
* @property string|null $company_street
* @property string|null $company_postal_code
* @property string|null $company_city
* @property int|null $company_pre_phone_id
* @property string|null $company_phone
* @property string|null $company_homepage
* @property int|null $company_country_id
* @property string|null $salutation
* @property string|null $title
* @property string|null $first_name
* @property string|null $last_name
* @property string|null $street
* @property string|null $postal_code
* @property string|null $city
* @property int|null $country_id
* @property int|null $pre_phone_id
* @property string|null $phone
* @property int|null $pre_mobil_id
* @property string|null $mobil
* @property string|null $website
* @property string|null $facebook
* @property string|null $facebook_fanpage
* @property string|null $instagram
* @property string|null $data_protection
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property \Illuminate\Support\Carbon|null $deleted_at
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereBirthday($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereCity($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereCompany($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereCompanyCity($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereCompanyCountryId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereCompanyHomepage($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereCompanyName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereCompanyPhone($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereCompanyPostalCode($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereCompanyPrePhoneId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereCompanyStreet($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereCountryId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereDataProtection($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereDeletedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereFacebook($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereFacebookFanpage($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereFirstName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereInstagram($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereLastName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereMobil($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount wherePhone($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount wherePostalCode($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount wherePreMobilId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount wherePrePhoneId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereSalutation($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereStreet($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereTitle($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount whereWebsite($value)
*/
class UserAccount extends \Eloquent {}
}
namespace App\Models{
/**
* App\Models\ProductAttribute
@ -371,10 +406,73 @@ namespace App\Models{
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductAttribute whereProductId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductAttribute whereUpdatedAt($value)
* @mixin \Eloquent
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductAttribute newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductAttribute newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductAttribute query()
*/
class ProductAttribute extends \Eloquent {}
}
namespace App\Models{
/**
* App\Models\UserShop
*
* @property int $id
* @property int $user_id
* @property string $name
* @property string $slug
* @property int $active
* @property string|null $active_date
* @property string $title
* @property array|null $trans_title
* @property string|null $copy
* @property array|null $trans_copy
* @property string|null $info
* @property array|null $trans_info
* @property array|null $featured
* @property string|null $filename
* @property string|null $originalname
* @property string|null $ext
* @property string|null $mine
* @property int|null $size
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property \Illuminate\Support\Carbon|null $deleted_at
* @property-read \App\User $user
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop findSimilarSlugs($attribute, $config, $slug)
* @method static bool|null forceDelete()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop newQuery()
* @method static \Illuminate\Database\Query\Builder|\App\Models\UserShop onlyTrashed()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop query()
* @method static bool|null restore()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereActive($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereActiveDate($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereCopy($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereDeletedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereExt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereFeatured($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereFilename($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereInfo($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereMine($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereOriginalname($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereSize($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereSlug($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereTitle($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereTransCopy($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereTransInfo($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereTransTitle($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserShop whereUserId($value)
* @method static \Illuminate\Database\Query\Builder|\App\Models\UserShop withTrashed()
* @method static \Illuminate\Database\Query\Builder|\App\Models\UserShop withoutTrashed()
*/
class UserShop extends \Eloquent {}
}
namespace App\Models{
/**
* App\Models\ProductCategory
@ -392,6 +490,9 @@ namespace App\Models{
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductCategory whereProductId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductCategory whereUpdatedAt($value)
* @mixin \Eloquent
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductCategory newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductCategory newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductCategory query()
*/
class ProductCategory extends \Eloquent {}
}

View file

@ -4,8 +4,7 @@ namespace App\Http\Controllers;
use App\Http\Controllers\Api\KasController;
use App\Models\Account;
use App\Models\UserAccount;
use App\Repositories\UserRepository;
use App\User;
use Illuminate\Support\Facades\Mail;
@ -31,23 +30,6 @@ class AdminUserController extends Controller
*/
public function index()
{
$kas = new KasController();
$pra = array(
'subdomain_name' => 'test',
'domain_name' => 'mivita.care',
'subdomain_path' => '/mein.mivita.care/public/',
//'php_version' => '7.1',
//'ssl_proxy' => 'Y',
//'redirect_status' => 0
);
//add_subdomain
$req = $kas->action('get_subdomains');
//"is_active"]=> string(1) "Y" ["in_progress"
var_dump($req);
die();
$data = [
//'values' => User::where('admin', 0)->get(),
'values' => User::where('confirmation_code_remider', '!=', 2)->get(),
@ -58,10 +40,10 @@ class AdminUserController extends Controller
public function edit($user_id)
{
$user = User::findOrFail($user_id);
/*if(!$user->account){
$user->account = new Account();
if(!$user->account){
$user->account = new UserAccount();
}
*/
$data = [
'user' => $user,
];

View file

@ -13,7 +13,7 @@ class DataTableController extends Controller
return view('datatable');
}
/*public function getLeads()
public function getLeads()
{
$query = User::where('deleted_at', '=', null);
@ -34,11 +34,15 @@ class DataTableController extends Controller
->addColumn('active', function (User $user) {
return $user->active ? ' <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>';
})
->addColumn('agreement', function (User $user) {
return $user->agreement ? '<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>';
})
->orderColumn('confirmed', 'confirmed $1')
->orderColumn('active', 'active $1')
->rawColumns(['action', 'confirmed', 'active'])
->orderColumn('agreement', 'agreement $1')
->rawColumns(['action', 'confirmed', 'active', 'agreement'])
->make(true);
}*/
}
public function getUsers()
{

View file

@ -60,6 +60,9 @@ class HomeController extends Controller
if($data == "imprint"){
$response = view('legal.imprint_de')->render();
}
if($data == "shop_term_of_use"){
$response = view('legal.shop_term_of_use_de')->render();
}
if(Request::ajax()) {
return response()->json(['response' => $response, 'target'=>$target]);
}
@ -117,4 +120,64 @@ class HomeController extends Controller
{
return view('legal.imprint');
}
public function verify($confirmation_code){
if( ! $confirmation_code)
{
return redirect('/status/error');
}
$user = User::whereConfirmationCode($confirmation_code)->first();
if ( ! $user)
{
return redirect('/status/not/found');
}
$user->confirmed = 1;
$user->confirmation_date = now();
$user->confirmation_code = null;
$user->confirmation_code_to = null;
$user->confirmation_code_remider = 0;
$user->save();
//Login!
Auth::login($user);
return redirect('/status/verify');
}
public function statusRegister(){
return view('status.status_register');
}
public function statusVerify(){
return view('status.status_verify');
}
public function statusError(){
return view('status.status_error');
}
public function notFound(){
return view('status.not_found');
}
/**
* @return string
*/
public function checkMail(){
$data = Input::all();
if($data['user_id'] == "new"){
if(User::where('email', $data['email'])->count()){
return json_encode(false);
}
}else{
if(User::where('email', $data['email'])->where('id', '!=', $data['user_id'])->count()){
return json_encode(false);
}
}
return json_encode(true);
}
}

View file

@ -0,0 +1,141 @@
<?php
namespace App\Http\Controllers;
use App\Mail\MailVerifyContact;
use App\Models\UserAccount;
use App\Repositories\UserRepository;
use App\User;
use Illuminate\Support\Facades\Mail;
use Input;
use Illuminate\Http\Request;
use Validator;
class LeadController extends Controller
{
protected $userRepo;
public function __construct(UserRepository $userRepo)
{
$this->middleware('admin');
$this->userRepo = $userRepo;
}
/**
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function index()
{
$data = [
'values' => User::where('admin', '=', 0)->where('confirmation_code_remider', '!=', 2)->get(),
];
return view('admin.leads', $data);
}
/**
* @param $id
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function edit($id)
{
if($id == "new"){
$user = new User();
$user->account = new UserAccount();
}else{
$user = User::findOrFail($id);
if(!$user->account){
$user->account = new UserAccount();
}
}
$data = [
'user' => $user,
'can_change_mail' => true,
];
return view('admin.lead_edit', $data);
}
/**
* @param Request $request
* @return \Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Illuminate\View\View
*/
public function store(Request $request)
{
$data = Input::all();
if ($data['user_id'] == "new") {
$user = new User();
$user->id = "new";
$user->account = new UserAccount();
$user->account->company_country_id = isset($data['company_country_id']) ? $data['company_country_id'] : 0;
$user->account->salutation = isset($data['salutation']) ? $data['salutation'] : 0;
$rules = array(
'salutation' => 'required',
'last_name' => 'required|max:255',
'country_id' => 'required|integer|min:1',
'email' => 'required|string|email|max:255|unique:users',
'email-confirm' => 'required|same:email',
);
} else {
$user = User::findOrFail($data['user_id']);
if(!$user->account){
$user->account = new UserAccount();
}
$rules = array(
'salutation' => 'required',
'last_name' => 'required|max:255',
'country_id' => 'required|integer|min:1',
'email' => 'required|string|email|max:255|exists:users,email',
'email-confirm' => 'required|same:email',
);
}
if(Input::get('company') == 1){
$rules['company_name'] = 'required|max:255';
$rules['company_country_id'] = 'required|integer|min:1';
}
$data = [
'user' => $user,
];
$validator = Validator::make(Input::all(), $rules);
if ($validator->fails()) {
return view('admin.lead_edit', $data)->withErrors($validator);
} else {
$data = Input::all();
$this->userRepo->update(Input::all());
if(isset($data['contact_verify'])){
$user = $this->userRepo->getModel();
$unique = false;
do{
$confirmation_code = str_random(30);
if( User::where('confirmation_code', '=', $confirmation_code)->count() == 0){
$unique = true;
}
}
while(!$unique);
$user->lang = $user->getLandByCountry();
$user->confirmation_code = $confirmation_code;
$user->save();
Mail::to($user->email)->send(new MailVerifyContact($confirmation_code, $user));
}
\Session()->flash('alert-save', true);
return redirect('/admin/leads');
}
}
}

View file

@ -64,9 +64,6 @@ class UserDataController extends Controller
if ($validator->fails()) {
// get the error messages from the validator
$messages = $validator->messages();
// redirect our user back to the form with the errors from the validator
return view('user.edit', $data)->withErrors($validator);
} else {
@ -76,13 +73,77 @@ class UserDataController extends Controller
}
}
/**
* @return \Illuminate\Contracts\View\Factory|\Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|\Illuminate\View\View
*/
public function userDataStore(){
$user = Auth::user();
if(!$user->account){
$user->account = new UserAccount();
}
$rules = array(
'salutation' => 'required',
'last_name' => 'required|max:255',
'country_id' => 'required|integer|min:1',
'email' => 'required|string|email|max:255|exists:users,email',
'email-confirm' => 'required|same:email',
);
if($user->active == 0){
$rules['accepted_data_protection'] = 'required';
$rules['accepted_active'] = 'required';
}
if(Input::get('company') == 1){
$rules['company_name'] = 'required|max:255';
$rules['company_country_id'] = 'required|integer|min:1';
}
$data = [
'user' => $user,
];
$validator = Validator::make(Input::all(), $rules);
if ($validator->fails()) {
// get the error messages from the validator
$messages = $validator->messages();
// redirect our user back to the form with the errors from the validator
return view('user.edit', $data)->withErrors($validator);
} else {
$this->userRepo->update(Input::all());
if($user->active == 0) {
$account = $user->account;
$account->data_protection = now();
$account->save();
$user->active = 1;
$user->active_date = now();
$user->save();
}
if(Input::get('accepted_active') == "on"){
$user->agreement = now();
}else{
$user->agreement = null;
}
\Session()->flash('alert-save', true);
return redirect('/home');
}
}
/**
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
*/
public function userDataAcceptedForm(){
$user = Auth::user();
if(Input::get('sender_accepted_infos') == "on"){
if(Input::get('accepted_active') == "on"){
$user->agreement = now();
}else {
$user->agreement = null;
@ -93,4 +154,59 @@ class UserDataController extends Controller
return redirect('/home');
}
/**
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
*/
public function userDataFree(){
$user = Auth::user();
$user->active = 1;
$user->active_date = now();
$user->save();
return redirect('/home');
}
/**
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
*/
public function userDataFreeForm(){
$user = Auth::user();
$rules = array(
'accepted_data_protection' => 'required'
);
$data = [
'user' => $user,
];
$validator = Validator::make(Input::all(), $rules);
if ($validator->fails()) {
// get the error messages from the validator
$messages = $validator->messages();
// redirect our user back to the form with the errors from the validator
return view('home', $data)->withErrors($validator);
} else {
$account = $user->account;
$account->data_protection = now();
$account->save();
if(Input::get('accepted_active') == "on"){
$user->agreement = now();
}else{
$user->agreement = null;
}
$user->active = 1;
$user->active_date = now();
$user->save();
}
return redirect('/home');
}
}

View file

@ -0,0 +1,273 @@
<?php
namespace App\Http\Controllers;
use App\Http\Controllers\Api\KasController;
use App\Models\UserShop;
use App\Repositories\UserRepository;
use Auth;
use Input;
use Response;
use Validator;
class UserShopController extends Controller
{
protected $db;
protected $userRepo;
public function __construct(UserRepository $userRepo)
{
$this->middleware('auth');
$this->userRepo = $userRepo;
}
public function index()
{
$user = Auth::user();
$data = [
'user' => $user,
];
return view('user.shop', $data);
}
public function store()
{
$user = Auth::user();
$data = Input::all();
if(!$user->shop){
abort(404);
}
$user->shop->title = $data['title'];;
$user->shop->copy = $data['copy'];
$user->shop->info = $data['info'];
$user->shop->active = isset($data['active']) ? true : false;
$user->shop->save();
\Session()->flash('alert-save', true);
$data = [
'user' => $user,
];
return view('user.shop', $data);
}
// Upload FILE -----------------------------------------------------------------------------------------------------------------------
public function uploadImage(){
$user = Auth::user();
if(!$user->shop){
abort(404);
}
try {
$image = \App\Services\Slim::getImages('images')[0];
if ( isset($image['output']['data']) )
{
// Base64 of the image
$data = $image['output']['data'];
$file_ex = array( 'image/jpeg' => 'jpg', 'image/png' => 'png');
if (!isset($file_ex[$image['output']['type']])) {
\Session()->flash('alert-danger', 'File is not jpg or png!');
return redirect(route('user_shop'));
}
$ext = $file_ex[$image['output']['type']];
// Original file name
$name = $image['output']['name'];
$name = \App\Services\Slim::sanitizeFileName($name);
$name = uniqid() . '_' . $name;
$data = \Storage::disk('public')->put(
'images/shop/'.$name,
$data
);
$user->shop->filename = $name;
$user->shop->originalname = $image['output']['name'];
$user->shop->ext = $ext;
$user->shop->mine = $image['output']['type'];
$user->shop->size = $image['input']['size'];
$user->shop->save();
\Session()->flash('alert-success', "Datei hochgeladen");
return redirect(route('user_shop'));
}
\Session()->flash('alert-danger', "Datei leer");
return redirect(route('user_shop'));
}
catch (Exception $e) {
\Session()->flash('alert-danger', "Fehler".$e);
return redirect(route('user_shop'));
}
}
public function deleteImage(){
$user = Auth::user();
if(!$user->shop){
abort(404);
}
if($user->shop->filename){
$file = 'images/shop/'.$user->shop->filename;
\Storage::disk('public')->delete($file);
$user->shop->filename = null;
$user->shop->originalname = null;
$user->shop->ext = null;
$user->shop->mine = null;
$user->shop->size = null;
$user->shop->save();
\Session()->flash('alert-success', "Datei gelöscht");
return redirect(route('user_shop'));
}
\Session()->flash('alert-danger', "Datei nicht gefunden");
return redirect(route('user_shop'));
}
/**
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
*/
public function userShopRegisterForm(){
if(Input::get('shop_submit') == 'check'){
$rules = array(
'user_shop_name' => ' required|alpha_dash|profanity|unique:user_shops,name|min:4|max:20|',
);
$validator = Validator::make(Input::all(), $rules);
if ($validator->fails()) {
\Session()->flash('shop-name-error', 'error');
return redirect()->back()->withErrors($validator)->withInput();
}
\Session()->flash('shop-name-error', 'check');
return redirect(route('user_shop'))->withInput();
}
if(Input::get('shop_submit') == 'action') {
$rules = array(
'user_shop_name' => ' required|alpha_dash|profanity|unique:user_shops,name|min:4|max:20|',
);
$validator = Validator::make(Input::all(), $rules);
if ($validator->fails()) {
\Session()->flash('shop-name-error', 'error');
}else{
\Session()->flash('shop-name-error', 'check');
}
$rules = array(
'user_shop_active' => 'accepted',
);
$validator = Validator::make(Input::all(), $rules);
if ($validator->fails()) {
return redirect()->back()->withErrors($validator)->withInput();
}
//all is right - save
$user = Auth::user();
$data = Input::all();
$user_shop = UserShop::create([
'user_id' => $user->id,
'name' => $data['user_shop_name'],
'active' => true,
'active_date' => now(),
]
);
$ret = $this->userShopRegisterSubDomain($user_shop->slug);
if($ret['success'] === true){
\Session()->flash('alert-save', true);
}else{
$user_shop->forceDelete();
\Session()->flash('alert-error', $ret['error']);
}
return redirect(route('user_shop'));
}
}
public function userShopRegisterSubDomain($slug){
$kas = new KasController();
$domain = 'mivita.care';
//check if exisist
$subdomains = $kas->action('get_subdomains');
foreach ($subdomains as $subdomain){
$sub = str_replace(".".$domain, '', $subdomain['subdomain_name']);
if($sub == $slug){
return ['success' => false, 'error' => 'Fehler: Subdomain existierts bereits, bitte einen neues Namen wählen'];
}
}
//add
$full_subdomain_name = $slug.".".$domain;
$pra = array(
'subdomain_name' => $slug,
'domain_name' => $domain,
'subdomain_path' => '/mein.mivita.care/public/',
//'php_version' => '7.1',
//'ssl_proxy' => 'Y',
//'redirect_status' => 0
);
$add_subdomain = $kas->action('add_subdomain', $pra);
if($add_subdomain == $full_subdomain_name){
return ['success' => true];
}
return ['success' => false, 'error' => $add_subdomain];
}
/**
* @return string to ajax
*/
public function checkUserShopName(){
$rules = array(
'user_shop_name' => ' required|alpha_dash|profanity|unique:user_shops,name|min:4|max:20|',
);
$validator = Validator::make(Input::all(), $rules);
if ($validator->fails()) {
$messages = $validator->messages();
return Response::json(array(
'success' => false,
'errors' => $validator->getMessageBag()->toArray()
));
}
return Response::json(array(
'success' => true,
));
}
}

View file

@ -70,9 +70,7 @@ class UserUpdateEmailController extends Controller
}
/*
*
* public function adminChangeMail($user_id)
public function adminChangeMail($user_id)
{
if(!Auth::user()->isAdmin()){
abort(404);
@ -122,7 +120,7 @@ class UserUpdateEmailController extends Controller
}
}
*/

View file

@ -74,9 +74,14 @@ class SiteController extends Controller
}
if($subsite){
if(!view()->exists('web.templates.'.$subsite)){
abort(404);
}
return view('web.templates.'.$subsite);
}
if(!view()->exists('web.templates.'.$site)){
abort(404);
}
return view('web.templates.'.$site);
}

View file

@ -29,20 +29,23 @@ class MailActivateUser extends Mailable
{
$salutation = __('Dear customer').",";
/*if($this->user->account){
if($this->user->account){
if($this->user->account->salutation == "mr"){
$salutation = __('Dear Sir')." ".$this->user->account->last_name.",";
}else{
$salutation = __('Dear Mrs')." ".$this->user->account->last_name.",";
}
}*/
}
return $this->view('emails.auth')->with([
'url' => route('user_update_email_confirm', $this->token),
'salutation' => $salutation,
'button' => __('Change E-Mail'),
'copy1line' => __('Dear Customer you will receive this e-mail because we have received a request to change your E-Mail Address for your account.'),
'copy2line' => __('Or copy this link into the address bar of your browser.'),
'copy3line' => __('For further questions we are happy to help you.'),
'greetings' => __('Best regards'),
'sender' => __('your mivita.care team'),
]);
}
}

View file

@ -28,20 +28,23 @@ class MailResetPassword extends Mailable
public function build()
{
$salutation = __('Dear customer').",";
/*if($this->user->account){
if($this->user->account){
if($this->user->account->salutation == "mr"){
$salutation = __('Dear Sir')." ".$this->user->account->last_name.",";
}else{
$salutation = __('Dear Mrs')." ".$this->user->account->last_name.",";
}
}*/
}
return $this->view('emails.auth')->with([
'url' => route('password.reset', $this->token),
'salutation' => $salutation,
'button' => __('Reset Password'),
'copy1line' => __('Dear Customer you will receive this e-mail because we have received a request to reset the password for your account.'),
'copy2line' => __('Or copy this link into the address bar of your browser.'),
'copy3line' => __('For further questions we are happy to help you.'),
'greetings' => __('Best regards'),
'sender' => __('your mivita.care team'),
]);
}
}

View file

@ -28,13 +28,13 @@ class MailVerifyAccount extends Mailable
public function build()
{
$salutation = __('Dear customer').",";
/*if($this->user->account){
if($this->user->account){
if($this->user->account->salutation == "mr"){
$salutation = __('Dear Sir')." ".$this->user->account->last_name.",";
}else{
$salutation = __('Dear Mrs')." ".$this->user->account->last_name.",";
}
}*/
}
return $this->view('emails.auth')->with([
'url' => route('register_verify', $this->confirmation_code),
@ -42,7 +42,10 @@ class MailVerifyAccount extends Mailable
'button' => __('Verify Your Email Address'),
'copy1line' => __('Thank you for creating an account with the JACKON Infomanager. Please follow the link below to confirm your email address.'),
'copy2line' => __('Or copy this link into the address bar of your browser.'),
'copy3line' => __('For further questions we are happy to help you.'),
'greetings' => __('Best regards'),
'sender' => __('your mivita.care team'),
]);
}
}

View file

@ -28,13 +28,13 @@ class MailVerifyContact extends Mailable
public function build()
{
$salutation = __('Dear customer').",";
/*if($this->user->account){
if($this->user->account){
if($this->user->account->salutation == "mr"){
$salutation = __('Dear Sir')." ".$this->user->account->last_name.",";
}else{
$salutation = __('Dear Mrs')." ".$this->user->account->last_name.",";
}
}*/
}
return $this->view('emails.auth')->with([
'url' => route('register_verify', $this->confirmation_code),
@ -42,7 +42,10 @@ class MailVerifyContact extends Mailable
'button' => __('Verify your Data and E-Mail Address'),
'copy1line' => __('We have data about you stored in our JACKON Infomanager. Please follow the link below to verify your email address.You can also change or delete your data.'),
'copy2line' => __('Or copy this link into the address bar of your browser.'),
'copy3line' => __('For further questions we are happy to help you.'),
'greetings' => __('Best regards'),
'sender' => __('your mivita.care team'),
]);
}

View file

@ -1,134 +0,0 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* App\Models\Account
*
* @property int $id
* @property int $user_id
* @property int $company
* @property string|null $company_name
* @property string|null $company_street
* @property string|null $company_postal_code
* @property string|null $company_city
* @property int|null $company_pre_phone_id
* @property string|null $company_phone
* @property string|null $company_homepage
* @property int|null $company_country_id
* @property string|null $salutation
* @property string|null $title
* @property string|null $first_name
* @property string|null $last_name
* @property string|null $street
* @property string|null $postal_code
* @property string|null $city
* @property int|null $country_id
* @property int|null $pre_phone_id
* @property string|null $phone
* @property int|null $pre_mobil_id
* @property string|null $mobil
* @property string|null $birthday
* @property string|null $website
* @property string|null $facebook
* @property string|null $facebook_fanpage
* @property string|null $instagram
* @property \Illuminate\Support\Carbon|null $created_at
* @property \Illuminate\Support\Carbon|null $updated_at
* @property \Illuminate\Support\Carbon|null $deleted_at
* @property-read \App\Models\Country|null $company_country
* @property-read \App\Models\Country|null $company_pre_phone
* @property-read \App\Models\Country|null $country
* @property-read \App\Models\Country|null $pre_mobil
* @property-read \App\Models\Country|null $pre_phone
* @property-read \App\User $user
* @method static bool|null forceDelete()
* @method static \Illuminate\Database\Query\Builder|\App\Models\Account onlyTrashed()
* @method static bool|null restore()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereBirthday($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereCity($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereCompany($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereCompanyCity($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereCompanyCountryId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereCompanyHomepage($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereCompanyName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereCompanyPhone($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereCompanyPostalCode($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereCompanyPrePhoneId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereCompanyStreet($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereCountryId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereDeletedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereFacebook($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereFacebookFanpage($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereFirstName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereInstagram($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereLastName($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereMobil($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account wherePhone($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account wherePostalCode($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account wherePreMobilId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account wherePrePhoneId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereSalutation($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereStreet($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereTitle($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereUpdatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereUserId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account whereWebsite($value)
* @method static \Illuminate\Database\Query\Builder|\App\Models\Account withTrashed()
* @method static \Illuminate\Database\Query\Builder|\App\Models\Account withoutTrashed()
* @mixin \Eloquent
*/
class Account extends Model
{
protected $table = 'accounts';
use SoftDeletes;
protected $dates = ['deleted_at'];
public function user()
{
return $this->belongsTo('App\User');
}
public function company_country()
{
return $this->belongsTo('App\Models\Country', 'company_country_id');
}
public function country()
{
return $this->belongsTo('App\Models\Country', 'country_id');
}
public function company_pre_phone()
{
return $this->belongsTo('App\Models\Country', 'company_pre_phone_id');
}
public function pre_phone()
{
return $this->belongsTo('App\Models\Country', 'pre_phone_id');
}
public function pre_mobil()
{
return $this->belongsTo('App\Models\Country', 'pre_mobil_id');
}
public function getCompanyAttribute(){
if(empty($this->attributes['company']) && @$this->attributes['company'] !== 0){
return 1;
}
return $this->attributes['company'];
}
}

View file

@ -28,6 +28,9 @@ use Illuminate\Database\Eloquent\Model;
* @mixin \Eloquent
* @property string|null $slug
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Attribute whereSlug($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Attribute newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Attribute newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Attribute query()
*/
class Attribute extends Model
{

View file

@ -31,6 +31,9 @@ use Cviebrock\EloquentSluggable\Sluggable;
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ProductCategory[] $product_categories
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Category findSimilarSlugs($attribute, $config, $slug)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Category whereSlug($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Category newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Category newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Category query()
*/
class Category extends Model
{

View file

@ -27,6 +27,9 @@ use PHPUnit\Framework\Constraint\Count;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Country wherePhone($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Country whereRu($value)
* @mixin \Eloquent
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Country newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Country newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Country query()
*/
class Country extends Model
{

View file

@ -74,6 +74,9 @@ use Illuminate\Database\Eloquent\SoftDeletes;
* @property string|null $slug
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product findSimilarSlugs($attribute, $config, $slug)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product whereSlug($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product query()
*/
class Product extends Model
{
@ -134,34 +137,6 @@ class Product extends Model
return $this->hasMany('App\Models\ProductImage', 'product_id', 'id');
}
/*
public function isImageAfter(){
if(empty($this->attributes['filename_after']) || @$this->attributes['filename_after'] == null || @$this->attributes['filename_after'] == ""){
return false;
}
if(!\Storage::disk('public')->has('images/'.$this->id.'/'.$this->filename_after)){
return false;
}
return true;
}
public function getImage($file){
if($file == "before" && $this->isImageBefore()){
$link = 'images/'.$this->id.'/'.$this->filename_before;
return '/storage/'.$link.'?=lm='.\Storage::disk('public')->lastModified($link);
}
if($file == "after" && $this->isImageAfter()){
$link = 'images/'.$this->id.'/'.$this->filename_after;
return '/storage/'.$link.'?=lm='.\Storage::disk('public')->lastModified($link);
}
return false;
}
*/
public function _format_number($value){

View file

@ -20,6 +20,9 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductAttribute whereProductId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductAttribute whereUpdatedAt($value)
* @mixin \Eloquent
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductAttribute newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductAttribute newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductAttribute query()
*/
class ProductAttribute extends Model
{

View file

@ -20,6 +20,9 @@ use Illuminate\Database\Eloquent\Model;
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductCategory whereProductId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductCategory whereUpdatedAt($value)
* @mixin \Eloquent
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductCategory newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductCategory newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductCategory query()
*/
class ProductCategory extends Model
{

View file

@ -33,6 +33,9 @@ use Illuminate\Database\Eloquent\Model;
* @property string|null $slug
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductImage findSimilarSlugs($attribute, $config, $slug)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductImage whereSlug($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductImage newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductImage newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ProductImage query()
*/
class ProductImage extends Model
{

View file

@ -0,0 +1,96 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Carbon\Carbon;
/**
* App\Models\UserAccount
*
* @property-read \App\Models\Country $company_country
* @property-read \App\Models\Country $company_pre_phone
* @property-read \App\Models\Country $country
* @property mixed $birthday
* @property-read mixed $company
* @property-read \App\Models\Country $pre_mobil
* @property-read \App\Models\Country $pre_phone
* @property-read \App\User $user
* @method static bool|null forceDelete()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount newQuery()
* @method static \Illuminate\Database\Query\Builder|\App\Models\UserAccount onlyTrashed()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserAccount query()
* @method static bool|null restore()
* @method static \Illuminate\Database\Query\Builder|\App\Models\UserAccount withTrashed()
* @method static \Illuminate\Database\Query\Builder|\App\Models\UserAccount withoutTrashed()
* @mixin \Eloquent
*/
class UserAccount extends Model
{
protected $table = 'user_accounts';
use SoftDeletes;
protected $dates = ['deleted_at'];
public function user()
{
return $this->hasOne('App\User', 'account_id');
}
public function company_country()
{
return $this->belongsTo('App\Models\Country', 'company_country_id');
}
public function country()
{
return $this->belongsTo('App\Models\Country', 'country_id');
}
public function company_pre_phone()
{
return $this->belongsTo('App\Models\Country', 'company_pre_phone_id');
}
public function pre_phone()
{
return $this->belongsTo('App\Models\Country', 'pre_phone_id');
}
public function pre_mobil()
{
return $this->belongsTo('App\Models\Country', 'pre_mobil_id');
}
public function getCompanyAttribute(){
if(empty($this->attributes['company']) && @$this->attributes['company'] !== 0){
return 1;
}
return $this->attributes['company'];
}
public function getBirthdayAttribute($value)
{
if(!$value){
return "";
}
return Carbon::parse($value)->format(\Util::formatDateDB());
}
public function setBirthdayAttribute( $value ) {
$this->attributes['birthday'] = (new Carbon($value))->format('Y-m-d');
}
public function getDataProtectionFormat(){
if(!$this->attributes['data_protection']){ return ""; }
return Carbon::parse($this->attributes['data_protection'])->format(\Util::formatDateTimeDB());
}
}

98
app/Models/UserShop.php Normal file
View file

@ -0,0 +1,98 @@
<?php
namespace App\Models;
use App\Http\Controllers\Api\KasController;
use Carbon\Carbon;
use Cviebrock\EloquentSluggable\Sluggable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class UserShop extends Model
{
protected $table = 'user_shops';
protected $is_online = NULL;
protected $casts = [
'trans_title' => 'array',
'trans_copy' => 'array',
'trans_info' => 'array',
'featured' => 'array',
];
protected $fillable = [
'user_id', 'name', 'active', 'active_date',
];
use SoftDeletes;
protected $dates = ['deleted_at'];
use Sluggable;
public function sluggable()
{
return [
'slug' => [
'source' => 'name'
]
];
}
public function user()
{
return $this->belongsTo('App\User', 'user_id');
}
public function getActiveDateFormat(){
if(!$this->attributes['active_date']){ return ""; }
return Carbon::parse($this->attributes['active_date'])->format(\Util::formatDateTimeDB());
}
public function getSubdomain()
{
return config('app.protocol').$this->attributes['slug'].".".config('app.domain');
}
public function getSubdomainStatus()
{
if($this->is_online != NULL){
return $this->is_online;
}
$kas = new KasController();
$domain = 'mivita.care';
$pra = array(
'subdomain_name' => $this->attributes['slug'].".".$domain,
'domain_name' => $this->attributes['slug'].".".$domain,
);
//check if exisist
$subdomain = $kas->action('get_subdomains', $pra);
if(!empty($subdomain[0]['is_active']) && $subdomain[0]['is_active'] == 'Y'){
$this->is_online = true;
return true;
}
$this->is_online = false;
return false;
}
public function isImage(){
if(empty($this->attributes['filename']) || @$this->attributes['filename'] == null || @$this->attributes['filename'] == ""){
return false;
}
if(!\Storage::disk('public')->has('images/shop/'.$this->filename)){
return false;
}
return true;
}
public function getImage(){
if($this->isImage()){
$link = 'images/shop/'.$this->filename;
return '/storage/'.$link.'?=lm='.\Storage::disk('public')->lastModified($link);
}
return false;
}
}

View file

@ -9,10 +9,13 @@ use Illuminate\Database\Eloquent\Model;
*
* @property-read \App\User $user
* @mixin \Eloquent
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserUpdateEmail newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserUpdateEmail newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserUpdateEmail query()
*/
class UserUpdateEmail extends Model
{
protected $table = 'users_update_email';
protected $table = 'user_update_emails';
protected $fillable = [
'user_id', 'email', 'token',

View file

@ -2,6 +2,7 @@
namespace App\Repositories;
use App\Models\UserAccount;
use App\User;
@ -14,10 +15,7 @@ class UserRepository extends BaseRepository {
}
/**
* refresh.
*/
/*public function update($data)
public function update($data)
{
if($data['user_id'] == "new"){
@ -40,17 +38,15 @@ class UserRepository extends BaseRepository {
$account->company = $data['company'];
$account->company_name = $data['company_name'];
$account->company_street = $data['company_street'];
$account->company_postal_code = $data['company_postal_code'];
$account->company_city = $data['company_city'];
$account->company_country_id = isset($data['company_country_id']) ? $data['company_country_id'] : null;
$account->company_pre_phone_id = isset($data['company_pre_phone_id']) ? $data['company_pre_phone_id']: null;
$account->company_phone = $data['company_phone'];
$account->company_homepage = $data['company_homepage'];
$account->position_text = $data['position_text'];
$account->salutation = $data['salutation'];
$account->title = $data['title'];
$account->first_name = $data['first_name'];
@ -67,7 +63,11 @@ class UserRepository extends BaseRepository {
$account->pre_mobil_id = isset($data['pre_mobil_id']) ? $data['pre_mobil_id']: null;
$account->mobil = $data['mobil'];
$account->contactpartner = $data['contactpartner'];
$account->birthday = $data['birthday'];
$account->website = $data['website'];
$account->instagram = $data['instagram'];
$account->facebook = $data['facebook'];
$account->facebook_fanpage = $data['facebook_fanpage'];
//data_protection
//active_date
@ -79,14 +79,9 @@ class UserRepository extends BaseRepository {
$this->model->save();
}
$this->updateInterests(isset($data['interests']) ? $data['interests'] : array());
$this->updateIndustrySector(isset($data['industry_sectors']) ? $data['industry_sectors'] : array());
return;
}
*/
public function deleteUser(User $user)
{
if($user->account){

View file

@ -3,6 +3,7 @@ namespace App\Services;
use App\Models\Attribute;
use App\Models\Category;
use App\Models\Country;
class HTMLHelper
{
@ -134,7 +135,7 @@ class HTMLHelper
}
/* public static function getCompanyOptions($company){
public static function getCompanyOptions($company){
$options = array(1 => __('business'), 0 => __('private'), );
$ret = "";
foreach ($options as $id => $value){
@ -143,21 +144,6 @@ class HTMLHelper
}
return $ret;
}
public static function getIndustrySectorsWithoutParents($id = false, $sameId = false, $all = true){
$values = IndustrySector::where('parent_id', null)->get();
$ret = "";
if($all){
$ret .= '<option value="">'.__('no').'</option>\n';
}
foreach ($values as $value){
if($sameId == $value->id){
continue;
}
$attr = ($value->id == $id) ? 'selected="selected"' : '';
$ret .= '<option value="'.$value->id.'" '.$attr.'>'.$value->name.'</option>\n';
}
return $ret;
}
public static function getContriesWithMore($id, $all=true){#
$values = Country::all();
@ -219,5 +205,27 @@ class HTMLHelper
$values = array('mr' => __('MR'), 'ms' => __('MS'));
return (!empty($values[$id]) ? $values[$id] : '');
}
/*public static function getIndustrySectorsWithoutParents($id = false, $sameId = false, $all = true){
$values = IndustrySector::where('parent_id', null)->get();
$ret = "";
if($all){
$ret .= '<option value="">'.__('no').'</option>\n';
}
foreach ($values as $value){
if($sameId == $value->id){
continue;
}
$attr = ($value->id == $id) ? 'selected="selected"' : '';
$ret .= '<option value="'.$value->id.'" '.$attr.'>'.$value->name.'</option>\n';
}
return $ret;
}
*/
}

View file

@ -206,6 +206,9 @@ class Slim {
$str = preg_replace('([^\w\s\d\-_~,;\[\]\(\).])', '', $str);
// Remove any runs of periods
$str = preg_replace('([\.]{2,})', '', $str);
$str = (strlen($str) > 33) ? substr($str,-33) : $str;
return $str;
}

View file

@ -64,6 +64,11 @@ use Illuminate\Database\Eloquent\SoftDeletes;
* @method static \Illuminate\Database\Eloquent\Builder|\App\User whereNotes($value)
* @method static \Illuminate\Database\Query\Builder|\App\User withTrashed()
* @method static \Illuminate\Database\Query\Builder|\App\User withoutTrashed()
* @property int|null $account_id
* @method static \Illuminate\Database\Eloquent\Builder|\App\User newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\User newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\User query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\User whereAccountId($value)
*/
class User extends Authenticatable
{
@ -94,11 +99,17 @@ class User extends Authenticatable
];
public function account()
public function account()
{
return $this->hasOne('App\Models\Account');
return $this->belongsTo('App\Models\UserAccount', 'account_id');
}
public function shop()
{
return $this->hasOne('App\Models\UserShop', 'user_id', 'id');
}
/**
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
@ -182,7 +193,7 @@ class User extends Authenticatable
return 'de';
}
}
return "en";
return "de";
}
/**

View file

@ -1,4 +1,11 @@
<?php return array (
'askedio/laravel5-profanity-filter' =>
array (
'providers' =>
array (
0 => 'Askedio\\Laravel5ProfanityFilter\\Providers\\ProfanityFilterServiceProvider',
),
),
'barryvdh/laravel-ide-helper' =>
array (
'providers' =>

View file

@ -23,31 +23,32 @@
19 => 'Illuminate\\Translation\\TranslationServiceProvider',
20 => 'Illuminate\\Validation\\ValidationServiceProvider',
21 => 'Illuminate\\View\\ViewServiceProvider',
22 => 'Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider',
23 => 'Cviebrock\\EloquentSluggable\\ServiceProvider',
24 => 'Fideloper\\Proxy\\TrustedProxyServiceProvider',
25 => 'Gloudemans\\Shoppingcart\\ShoppingcartServiceProvider',
26 => 'Intervention\\Image\\ImageServiceProvider',
27 => 'Jenssegers\\Date\\DateServiceProvider',
28 => 'Laracasts\\Flash\\FlashServiceProvider',
29 => 'Laravel\\Tinker\\TinkerServiceProvider',
30 => 'Collective\\Html\\HtmlServiceProvider',
31 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
32 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider',
33 => 'Yajra\\DataTables\\DataTablesServiceProvider',
22 => 'Askedio\\Laravel5ProfanityFilter\\Providers\\ProfanityFilterServiceProvider',
23 => 'Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider',
24 => 'Cviebrock\\EloquentSluggable\\ServiceProvider',
25 => 'Fideloper\\Proxy\\TrustedProxyServiceProvider',
26 => 'Gloudemans\\Shoppingcart\\ShoppingcartServiceProvider',
27 => 'Intervention\\Image\\ImageServiceProvider',
28 => 'Jenssegers\\Date\\DateServiceProvider',
29 => 'Laracasts\\Flash\\FlashServiceProvider',
30 => 'Laravel\\Tinker\\TinkerServiceProvider',
31 => 'Collective\\Html\\HtmlServiceProvider',
32 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
33 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider',
34 => 'Yajra\\DataTables\\DataTablesServiceProvider',
35 => 'Laravel\\Tinker\\TinkerServiceProvider',
36 => 'App\\Providers\\AppServiceProvider',
37 => 'App\\Providers\\AuthServiceProvider',
38 => 'App\\Providers\\EventServiceProvider',
39 => 'App\\Providers\\RouteServiceProvider',
40 => 'Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider',
41 => 'Jenssegers\\Date\\DateServiceProvider',
42 => 'Collective\\Html\\HtmlServiceProvider',
43 => 'Intervention\\Image\\ImageServiceProvider',
44 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
45 => 'Yajra\\DataTables\\DataTablesServiceProvider',
46 => 'App\\Providers\\YardServiceProvider',
35 => 'Yajra\\DataTables\\DataTablesServiceProvider',
36 => 'Laravel\\Tinker\\TinkerServiceProvider',
37 => 'App\\Providers\\AppServiceProvider',
38 => 'App\\Providers\\AuthServiceProvider',
39 => 'App\\Providers\\EventServiceProvider',
40 => 'App\\Providers\\RouteServiceProvider',
41 => 'Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider',
42 => 'Jenssegers\\Date\\DateServiceProvider',
43 => 'Collective\\Html\\HtmlServiceProvider',
44 => 'Intervention\\Image\\ImageServiceProvider',
45 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
46 => 'Yajra\\DataTables\\DataTablesServiceProvider',
47 => 'App\\Providers\\YardServiceProvider',
),
'eager' =>
array (
@ -61,24 +62,25 @@
7 => 'Illuminate\\Pagination\\PaginationServiceProvider',
8 => 'Illuminate\\Session\\SessionServiceProvider',
9 => 'Illuminate\\View\\ViewServiceProvider',
10 => 'Cviebrock\\EloquentSluggable\\ServiceProvider',
11 => 'Fideloper\\Proxy\\TrustedProxyServiceProvider',
12 => 'Gloudemans\\Shoppingcart\\ShoppingcartServiceProvider',
13 => 'Intervention\\Image\\ImageServiceProvider',
14 => 'Jenssegers\\Date\\DateServiceProvider',
15 => 'Laracasts\\Flash\\FlashServiceProvider',
16 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
17 => 'Yajra\\DataTables\\DataTablesServiceProvider',
10 => 'Askedio\\Laravel5ProfanityFilter\\Providers\\ProfanityFilterServiceProvider',
11 => 'Cviebrock\\EloquentSluggable\\ServiceProvider',
12 => 'Fideloper\\Proxy\\TrustedProxyServiceProvider',
13 => 'Gloudemans\\Shoppingcart\\ShoppingcartServiceProvider',
14 => 'Intervention\\Image\\ImageServiceProvider',
15 => 'Jenssegers\\Date\\DateServiceProvider',
16 => 'Laracasts\\Flash\\FlashServiceProvider',
17 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
18 => 'Yajra\\DataTables\\DataTablesServiceProvider',
19 => 'App\\Providers\\AppServiceProvider',
20 => 'App\\Providers\\AuthServiceProvider',
21 => 'App\\Providers\\EventServiceProvider',
22 => 'App\\Providers\\RouteServiceProvider',
23 => 'Jenssegers\\Date\\DateServiceProvider',
24 => 'Intervention\\Image\\ImageServiceProvider',
25 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
26 => 'Yajra\\DataTables\\DataTablesServiceProvider',
27 => 'App\\Providers\\YardServiceProvider',
19 => 'Yajra\\DataTables\\DataTablesServiceProvider',
20 => 'App\\Providers\\AppServiceProvider',
21 => 'App\\Providers\\AuthServiceProvider',
22 => 'App\\Providers\\EventServiceProvider',
23 => 'App\\Providers\\RouteServiceProvider',
24 => 'Jenssegers\\Date\\DateServiceProvider',
25 => 'Intervention\\Image\\ImageServiceProvider',
26 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
27 => 'Yajra\\DataTables\\DataTablesServiceProvider',
28 => 'App\\Providers\\YardServiceProvider',
),
'deferred' =>
array (

View file

@ -6,6 +6,7 @@
"type": "project",
"require": {
"php": "^7.1.3",
"askedio/laravel5-profanity-filter": "^1.10",
"cviebrock/eloquent-sluggable": "^4.5",
"doctrine/dbal": "^2.8",
"fideloper/proxy": "^4.0",

637
composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -52,7 +52,11 @@ return [
|
*/
'url' => env('APP_URL', 'http://mivita.local/login'),
'url' => env('APP_URL', 'http://mivita.local/'),
'domain' => env('APP_DOMAIN', 'mivita.local'),
'protocol' => env('APP_PROTOCOL', 'http://'),
/*
|--------------------------------------------------------------------------
| Application Timezone

125
config/profanity.php Normal file
View file

@ -0,0 +1,125 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Profanity Filter Configuration
|--------------------------------------------------------------------------
|
|
*/
/* Disable to replace partial words. */
'replaceFullWords' => true,
/* Replace bad words with this, based on length of word */
'replaceWith' => '*',
/* Replace related letters */
'strReplace' => [
'a' => '(a|a\.|a\-|4|@|Á|á|À|Â|à|Â|â|Ä|ä|Ã|ã|Å|å|α|Δ|Λ|λ)',
'b' => '(b|b\.|b\-|8|\|3|ß|Β|β)',
'c' => '(c|c\.|c\-|Ç|ç|¢|€|<|\(|{|©)',
'd' => '(d|d\.|d\-|&part;|\|\)|Þ|þ|Ð|ð)',
'e' => '(e|e\.|e\-|3|€|È|è|É|é|Ê|ê|∑)',
'f' => '(f|f\.|f\-|ƒ)',
'g' => '(g|g\.|g\-|6|9)',
'h' => '(h|h\.|h\-|Η)',
'i' => '(i|i\.|i\-|!|\||\]\[|]|1|∫|Ì|Í|Î|Ï|ì|í|î|ï)',
'j' => '(j|j\.|j\-)',
'k' => '(k|k\.|k\-|Κ|κ)',
'l' => '(l|1\.|l\-|!|\||\]\[|]|£|∫|Ì|Í|Î|Ï)',
'm' => '(m|m\.|m\-)',
'n' => '(n|n\.|n\-|η|Ν|Π)',
'o' => '(o|o\.|o\-|0|Ο|ο|Φ|¤|°|ø)',
'p' => '(p|p\.|p\-|ρ|Ρ|¶|þ)',
'q' => '(q|q\.|q\-)',
'r' => '(r|r\.|r\-|®)',
's' => '(s|s\.|s\-|5|\$|§)',
't' => '(t|t\.|t\-|Τ|τ)',
'u' => '(u|u\.|u\-|υ|µ)',
'v' => '(v|v\.|v\-|υ|ν)',
'w' => '(w|w\.|w\-|ω|ψ|Ψ)',
'x' => '(x|x\.|x\-|Χ|χ)',
'y' => '(y|y\.|y\-|¥|γ|ÿ|ý|Ÿ|Ý)',
'z' => '(z|z\.|z\-|Ζ)',
],
/* Replace these words no matter what language. */
'defaults' => [
'fuck',
'shit',
'anal',
'anus',
'arse',
'ass',
'ballsack',
'balls',
'bastard',
'bitch',
'biatch',
'bloody',
'blowjob',
'bollock',
'bollok',
'boner',
'boob',
'bugger',
'bum',
'butt',
'buttplug',
'clitoris',
'cock',
'coon',
'crap',
'cunt',
'damn',
'dick',
'dildo',
'dyke',
'fag',
'feck',
'fellate',
'fellatio',
'felching',
'fuck',
'fudgepacker',
'flange',
'goddamn',
'hell',
'homo',
'jizz',
'knobend',
'labia',
'muff',
'nigger',
'nigga',
'penis',
'piss',
'poop',
'prick',
'pube',
'pussy',
'queer',
'scrotum',
'sex',
'shit',
'sh1t',
'slut',
'smegma',
'spunk',
'suck',
'tit',
'tosser',
'turd',
'twat',
'vagina',
'wank',
'whore',
'wtf',
'mivita',
'aloe',
'vera',
],
];

View file

@ -15,10 +15,11 @@ class CreateUsersTable extends Migration
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('email')->unique();
$table->string('password');
$table->unsignedInteger('account_id')->nullable();
$table->boolean('confirmed')->default(false);
$table->string('confirmation_code', 30)->index()->nullable();
$table->timestamp('confirmation_date')->nullable();
@ -27,21 +28,16 @@ class CreateUsersTable extends Migration
$table->boolean('active')->default(false);
$table->timestamp('active_date')->nullable();
$table->dateTime('agreement')->nullable();
$table->boolean('admin')->default(false);
$table->char('lang', 2)->index();
$table->text('notes')->nullable();
$table->rememberToken();
$table->timestamp('last_login')->nullable();
$table->timestamps();
$table->softDeletes();
});

View file

@ -16,8 +16,6 @@ class CreateAccountsTable extends Migration
Schema::create('accounts', function (Blueprint $table) {
$table->increments('id');
$table->unsignedInteger('user_id')->index();
$table->boolean('company')->default(true);
$table->string('company_name')->nullable()->index();
@ -50,14 +48,10 @@ class CreateAccountsTable extends Migration
$table->string('facebook')->nullable();
$table->string('facebook_fanpage')->nullable();
$table->string('instagram')->nullable();
$table->timestamp('data_protection')->nullable();
$table->timestamps();
$table->softDeletes();
$table->foreign('user_id')
->references('id')
->on('users');
});
}

View file

@ -0,0 +1,63 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUserShopsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('user_shops', function (Blueprint $table) {
$table->increments('id');
$table->unsignedInteger('user_id');
$table->string('name', 20)->unique()->index();
$table->string('slug', 40)->unique()->index();
$table->boolean('active')->default(false);
$table->timestamp('active_date')->nullable();
$table->string('title')->nullable();
$table->text('trans_title')->nullable();
$table->text('copy')->nullable();
$table->mediumText('trans_copy')->nullable();
$table->text('info')->nullable();
$table->mediumText('trans_info')->nullable();
$table->string('featured')->nullable();
$table->string('filename')->nullable();
$table->string('originalname')->nullable();
$table->string('ext')->nullable();
$table->string('mine')->nullable();
$table->unsignedInteger('size')->nullable();
$table->timestamps();
$table->softDeletes();
$table->foreign('user_id')
->references('id')
->on('users')
->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('user_shops');
}
}

1
public/js/bootstrap-datepicker.de.min.js vendored Executable file
View file

@ -0,0 +1 @@
!function(a){a.fn.datepicker.dates.de={days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],daysShort:["Son","Mon","Die","Mit","Don","Fre","Sam"],daysMin:["So","Mo","Di","Mi","Do","Fr","Sa"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",clear:"Löschen",weekStart:1,format:"dd.mm.yyyy"}}(jQuery);

File diff suppressed because one or more lines are too long

View file

@ -113,6 +113,7 @@ return [
'url' => ':attribute muss eine URL sein.',
'old_password' => 'Passwort ist nicht gültig',
'users_update_email' => 'Die E-Mail ist schon zur Änderung eingetragen',
'profanity' => ':attribute ist nicht zulässig',
/*
|--------------------------------------------------------------------------
@ -172,5 +173,8 @@ return [
'time' => 'Uhrzeit',
'available' => 'verfügbar',
'size' => 'Größe',
'user_shop_name' => 'Shop Name',
'user_shop_active' => 'Nutzungsbedinungen',
],
];

View file

@ -0,0 +1,81 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Filter the following list when this language is used.
|--------------------------------------------------------------------------
|
|
*/
'anal',
'anus',
'arse',
'ass',
'ballsack',
'balls',
'bastard',
'bitch',
'biatch',
'bloody',
'blowjob',
'bollock',
'bollok',
'boner',
'boob',
'bugger',
'bum',
'butt',
'buttplug',
'clitoris',
'cock',
'coon',
'crap',
'cunt',
'damn',
'dick',
'dildo',
'dyke',
'fag',
'feck',
'fellate',
'fellatio',
'felching',
'fuck',
'fudgepacker',
'flange',
'goddamn',
'hell',
'homo',
'jizz',
'knobend',
'labia',
'muff',
'nigger',
'nigga',
'penis',
'piss',
'poop',
'prick',
'pube',
'pussy',
'queer',
'scrotum',
'sex',
'shit',
'sh1t',
'slut',
'smegma',
'spunk',
'suck',
'tit',
'tosser',
'turd',
'twat',
'vagina',
'wank',
'whore',
'wtf',
];

View file

@ -0,0 +1,14 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Filter the following list when this language is used.
|--------------------------------------------------------------------------
|
|
*/
'mierda',
];

View file

@ -1,4 +1,4 @@
@extends('layouts.layout-2-2')
@extends('layouts.layout-2')
@section('content')
<div class="card mb-4">

View file

@ -0,0 +1,43 @@
@extends('layouts.layout-2')
@section('content')
@if ($errors->any())
<div class="row">
<div class="col-sm-12">
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
</div>
</div>
@endif
<h4 class="font-weight-bold py-2 mb-2">
{{ __('Create/Edit Contact') }}
</h4>
{!! Form::open(['url' => route('admin_lead_store'), 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!}
<input type="hidden" name="user_id" id="user_id" value="@if($user->id>0){{$user->id}}@else new @endif">
@include('user.form')
@if(!$user->id || $user->id == 'new')
@include('user.data_verify')
@endif
<div class="text-left mt-3">
<button type="submit" class="btn btn-submit">{{ __('save') }}</button>&nbsp;
<a href="{{ route('admin_leads') }}" class="btn btn-default">{{ __('abort') }}</a>
</div>
{!! Form::close() !!}
@endsection

View file

@ -0,0 +1,105 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-2 mb-2">
{{ __('Contacts') }}
</h4>
<div class="card">
<div class="card-datatable table-responsive">
<div class="ml-4">
<a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('create new Contact')}}</a>
</div>
<table class="datatables-leads table table-striped table-bordered">
<thead>
<tr>
<th>#</th>
<th>{{__('E-Mail')}}</th>
<th>{{__('Vorname')}}</th>
<th>{{__('Nachname')}}</th>
<th>{{__('verifiziert')}}</th>
<th>{{__('freigegeben')}}</th>
<th>{{__('Einv.-Erkl.')}}</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="mt-4 ml-4">
<a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('create new Contact')}}</a>
</div>
</div>
</div>
<script>
$( document ).ready(function() {
$('.datatables-leads').dataTable({
"processing": true,
"serverSide": true,
"ajax": '{!! route('datatables-leads') !!}',
"columns": [
{data: 'action', orderable: false, searchable: false},
{ data: 'email', name: 'email' },
{ data: 'first_name', name: 'account.first_name' },
{ data: 'last_name', name: 'account.last_name' },
{ data: 'confirmed', name: 'confirmed' },
{ data: 'active', name: 'active' },
{ data: 'agreement', name: 'agreement' }
],
"bLengthChange": false,
"iDisplayLength": 50,
"language": {
"url": "/js/German.json"
}
});
});
</script>
@endsection
<?php /*
<!-- Filters -->
<!-- <div class="ui-bordered px-4 pt-4 mb-4">
<div class="form-row align-items-center">
<div class="col-md mb-4">
<label class="form-label">Filter1</label>
<select class="custom-select">
<option>Any</option>
<option>Yes</option>
<option>No</option>
</select>
</div>
<div class="col-md mb-4">
<label class="form-label">Filter2</label>
<select class="custom-select">
<option>Any</option>
<option>Yes</option>
<option>No</option>
</select>
</div>
<div class="col-md mb-4">
<label class="form-label">Filter3</label>
<select class="custom-select">
<option>Any</option>
<option>Yes</option>
<option>No</option>
</select>
</div>
<div class="col-md mb-4">
<label class="form-label">Filter4</label>
<input type="text" id="user-list-latest-activity" class="form-control" placeholder="Any">
</div>
<div class="col-md col-xl-2 mb-4">
<label class="form-label d-none d-md-block">&nbsp;</label>
<button type="button" class="btn btn-secondary btn-block">Show</button>
</div>
</div>
</div>-->
*/?>

View file

@ -16,7 +16,7 @@
</div>
@endif
<h4 class="font-weight-bold py-3 mb-0">
<h4 class="font-weight-bold py-2 mb-2">
{{ __('Create/Edit Produkt') }}
</h4>

View file

@ -16,7 +16,7 @@
</div>
@endif
<h4 class="font-weight-bold py-3 mb-4">
<h4 class="font-weight-bold py-2 mb-2">
{{ __('Create/Edit Contact') }}
</h4>

View file

@ -3,7 +3,7 @@
@section('content')
<h4 class="font-weight-bold py-3 mb-4">
<h4 class="font-weight-bold py-2 mb-2">
{{ __('User') }}
</h4>

View file

@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>mein STERN TOURS</title>
<title>mivita</title>
<style type="text/css">
@import url(https://fonts.googleapis.com/css?family=Roboto);
@ -19,13 +19,12 @@
text-decoration: none;
border: 0;
outline: none;
color: #5f8155;
color: #b5c49b;
}
a:hover {
color:#e5aa30;
color:#d7d700;
}
a img {
border: none;
}
@ -55,7 +54,7 @@
}
.headline {
color: #5f8155;
color: #b5c49b;
font-size: 16px;
}
@ -119,7 +118,7 @@
<tr class="">
<td align="center" valign="top" style="font-size: 0px;" class="">
<picture class="">
<img src="https://www.sterntours.de/images/da2f996_wlogo_1.png" alt="STERN TOURS" style="border:none" width="260">
<img src="https://mein.mivita.care/images/logo_mivita.png" alt="mivita.care" style="border:none" width="230">
</picture>
</td>
@ -168,8 +167,8 @@
<table role="presentation" cellpadding="0" cellspacing="0" align="center" border="0">
<tbody>
<tr>
<td style="border:none;border-radius:20px;color:#ffffff;cursor:auto;padding:15px 25px;" align="center" valign="middle" bgcolor="#5f8155">
<p style="text-decoration:none;background:#5f8155;color:#ffffff;font-family:Arial, sans-serif;font-size:13px;font-weight:normal;line-height:120%;text-transform:none;margin:0px;">
<td style="border:none;border-radius:20px;color:#ffffff;cursor:auto;padding:15px 25px;" align="center" valign="middle" bgcolor="#b5c49b">
<p style="text-decoration:none;background:#b5c49b;color:#ffffff;font-family:Arial, sans-serif;font-size:13px;font-weight:normal;line-height:120%;text-transform:none;margin:0px;">
<a href="{{ $url }}" style="color:#ffffff;font-size:14px;font-weight:bold;text-align:center;text-decoration:none;-webkit-text-size-adjust:none;">{{ $button }}</a>
</td>
</tr>
@ -192,7 +191,7 @@
{{ $copy2line }}<br>
<span style="color: #cabda9; font-weight: normal; font-size: 13px; text-decoration: underline; word-wrap: break-word;">{{ $url }}</span>
<br><br>
{{ $greetings }} <br><b>Ihr Team von STERN TOURS</b>
{{ $greetings }} <br><b>Ihr Team von mivita</b>
<br>
<br>
</td>
@ -213,17 +212,21 @@
<tr>
<td style="color:#7B7B7E; font-size:14px;">
<br>
STERN TOURS GmbH | Emser Straße 3 | 10719 Berlin<br>
Tel: +49 (0) 30 700 94 100 | Fax: +49 (0) 30 700 94 1044 | stern@sterntours.de<br>
mivita e.K. | Leinfeld 2 | 87755 Kirchhaslach<br>
Telefon: +49 (0) 8333 946 98 90 | Fax: +49 (0) 8333 7268<br>
E-Mail: info@mivita.care<br></p>
<br>
<a href="https://www.sterntours.de" style="color: #7B7B7E; text-decoration: underline;">www.sterntours.de</a>
<a href="https://www.mivita.care" style="color: #7B7B7E; text-decoration: underline;">www.mivita.care</a>
<br>
</td>
</tr>
<tr>
<td style="color:#bbbbbb; font-size:12px;">
Geschäftsführer: Thomas Stern | Registergericht: Amtsgericht Charlottenburg | Registernummer: HRB 67111<br>
Steuernummer: 27/545/30703 | UST-Ident.-Nr.: DE192609253 | Finanzamt: Wilmersdorf<br>
<p>Geschäftsinhaber: Alois Ried | Registergericht: Memmingen<br>
Registernummer: HRA 12236 | USt-ID-Nr.: DE 244162340</p>
<a href="{{route('data_protected')}}">Datenschutzerklärung</a> <br>
© 2018 All Rights Reserved <br>
<br>

View file

@ -4,7 +4,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>mivita</title>
<title>mivita.care</title>
<style type="text/css">
@import url(https://fonts.googleapis.com/css?family=Roboto);
@ -19,11 +19,10 @@
text-decoration: none;
border: 0;
outline: none;
color: #b5c49b;
color: #919f7a;
}
a:hover {
color:#d7d700;
color: #b6b600;
}
a img {
border: none;
@ -54,7 +53,7 @@
}
.headline {
color: #b5c49b;
color: #37302d;
font-size: 16px;
}
@ -191,8 +190,9 @@
{{ $copy2line }}<br>
<span style="color: #cabda9; font-weight: normal; font-size: 13px; text-decoration: underline; word-wrap: break-word;">{{ $url }}</span>
<br><br>
{{ $greetings }} <br><b>Ihr Team von STERN TOURS</b>
<br>
{{ $copy3line }}
<br><br>
{{ $greetings }} <br><b>{{ $sender }}</b>
<br>
</td>
</tr>
@ -222,7 +222,6 @@
</tr>
<tr>
<td style="color:#bbbbbb; font-size:12px;">
<p>Geschäftsinhaber: Alois Ried | Registergericht: Memmingen<br>
Registernummer: HRA 12236 | USt-ID-Nr.: DE 244162340</p>

View file

@ -21,188 +21,43 @@
<div class="card-body" style="background: #fff; border: 1px solid rgba(24, 28, 33, 0.06);">
<h4>{{ __('Your Data') }}</h4>
<p>{{__('Here you can adjust your data.')}}</p>
<div id="accordion">
<div class="card mb-2">
<a class="card-header">
<div class="collapsed text-dark" data-toggle="collapse" href="#accordion-2" aria-expanded="false">
{{ __('Your Data') }} <i class="ion ion-ios-arrow-down"></i>
</div>
</a>
<div id="accordion-2" class="collapse" data-parent="#accordion" style="">
<div class="card-body" style="background-color: #f5f5f5;">
{{--
@if($user->account->company == 1)
<h5 class="mt-0 mb-3">{{ __('Company data') }}</h5>
<div class="table-responsive">
<table class="table user-view-table m-0">
<tbody>
<tr>
<td>{{ __('Company name') }}:</td>
<td>{{ $user->account->company_name }}</td>
</tr>
<tr>
<td>{{ __('Street') }} / {{ __('House number') }}:</td>
<td>{{ $user->account->company_street }}</td>
</tr>
<tr>
<td>{{ __('Postcode') }}:</td>
<td>{{ $user->account->company_postal_code }}</td>
</tr>
<tr>
<td>{{ __('City') }}:</td>
<td>{{ $user->account->company_city }}</td>
</tr>
<tr>
<td>{{ __('Country') }}:</td>
<td>@if($user->account->company_country_id) {{ $user->account->company_country->getLocated() }} @endif</td>
</tr>
<tr>
<td>{{ __('Phone') }}:</td>
<td>@if($user->account->company_pre_phone_id) {{ $user->account->company_pre_phone->code }}@endif {{ $user->account->company_phone }}</td>
</tr>
<tr>
<td>{{ __('Homepage') }}:</td>
<td>{{ $user->account->company_homepage }}</td>
</tr>
</tbody>
</table>
</div>
<hr class="border-primary mt-2">
<h5 class="mt-4 mb-3">{{ __('Industry') }}</h5>
<div class="table-responsive">
<table class="table user-view-table m-0">
<tbody>
@foreach($user->account->getUserIndustrySectorsParents() as $user_industry_sector_parents)
<tr>
<td>{{ $user_industry_sector_parents->industry_sector->getLang('name') }}:</td>
<td>
@foreach($user->account->getUserIndustrySectorsChilds($user_industry_sector_parents->industry_sector->id) as $user_industry_sector_childs)
{{ $user_industry_sector_childs->industry_sector->getLang('name') }},
@endforeach
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<hr class="border-primary mt-2">
@endif
<h5 class="mt-4 mb-3">{{ __('Your Data') }}</h5>
<div class="table-responsive">
<table class="table user-view-table m-0">
<tbody>
<tr>
<td>{{ __('Function') }}:</td>
<td>{{ $user->account->position_text }}</td>
</tr>
<tr>
<td>{{ __('Salutation') }}:</td>
<td>{!! HTMLHelper::getSalutationLang($user->account->salutation) !!}</td>
</tr>
<tr>
<td>{{ __('Title') }}:</td>
<td>{{ $user->account->title }}</td>
</tr>
<tr>
<td>{{ __('First name') }}:</td>
<td>{{ $user->account->first_name }}</td>
</tr>
<tr>
<td>{{ __('Last Name') }}:</td>
<td>{{ $user->account->last_name }}</td>
</tr>
<tr>
<td>{{ __('Street') }} / {{ __('House number') }}:</td>
<td>{{ $user->account->street }}</td>
</tr>
<tr>
<td>{{ __('Postcode') }}:</td>
<td>{{ $user->account->postal_code }}</td>
</tr>
<tr>
<td>{{ __('City') }}:</td>
<td>{{ $user->account->city }}</td>
</tr>
<tr>
<td>{{ __('Country') }}:</td>
<td>@if($user->account->country_id){{ $user->account->country->getLocated() }}@endif</td>
</tr>
<tr>
<td>{{ __('Phone') }}:</td>
<td>@if($user->account->pre_phone_id) {{ $user->account->pre_phone->code }}@endif {{ $user->account->phone }}</td>
</tr>
<tr>
<td>{{ __('Mobile Phone') }}:</td>
<td>@if($user->account->pre_mobil_id) {{ $user->account->pre_mobil->code }}@endif {{ $user->account->mobil }}</td>
</tr>
<tr>
<td>{{ __('E-Mail Address') }}:</td>
<td>{{ $user->email }}</td>
</tr>
</tbody>
</table>
</div>
<hr class="border-primary mt-2">
<h5 class="mt-4 mb-3">{{ __('Your interests') }}</h5>
<div class="table-responsive">
<table class="table user-view-table m-0">
<tbody>
@foreach($user->account->user_interests as $user_interest)
<tr>
<td>{{ $user_interest->interest->getLang('name') }}:</td>
<td>
<span class="ion ion-md-checkmark-circle-outline text-primary"></span>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<hr class="border-primary mt-2">
<div class="table-responsive">
<table class="table user-view-table m-0">
<tbody>
<tr>
<td>{{ $user->account->contactpartner }}</td>
</tr>
</tbody>
</table>
</div>
--}}
</div>
</div>
</div>
</div>
@if($user->active == 0)
<a href="{{ route('user_edit') }}" class="btn btn-secondary"
onclick="$('#user-edit-info-btn').click();">{{ __('Adjust data') }}</a>
@endif
@if($user->active == 1)
<a href="{{ route('user_edit') }}" class="btn btn-secondary"
onclick="$('#user-edit-info-btn').click();">{{ __('Adjust data') }}</a>
<p>{{__('If you have checked your data, share your data here!')}}</p>
<div class="card mb-2">
<div class="card-body" style="background-color: #f5f5f5;">
{!! Form::open(['url' => route('user_data_store'), 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!}
<input type="hidden" name="user_id" id="user_id" value="@if($user->id>0){{$user->id}}@else new @endif">
@include('user.form')
@if(!$user->account->data_protection)
@include('user.data_confirm')
@endif
<div class="text-left mt-3">
<button type="submit" class="btn btn-warning">{{ __('yes, data checked and share') }}</button>&nbsp;
</div>
{!! Form::close() !!}
</div>
</div>
@else
<a href="{{ route('user_edit') }}" class="btn btn-secondary">{{ __('Adjust data') }}</a>
@endif
</div>
@if($user->active == 1 && !$user->user_shop)
<div class="card-body" style="background: #fff; border: 1px solid rgba(24, 28, 33, 0.06);">
<h4>{{__('Your Shop') }}</h4>
<a href="{{route('user_shop')}}" class="btn btn-secondary">{{__('open your shop')}}</a>
</div>
@endif
<div class="card-body" style="background: #fff; border: 1px solid rgba(24, 28, 33, 0.06);">
<h4>{{__('Activities') }}</h4>
@ -224,11 +79,11 @@
@if($user->active == 1)
@if($user->agreement)
<p><span class="ion ion-md-checkmark-circle-outline text-primary"></span>
<strong>{{__('Consent for further information')}}</strong> {{__('at')}} {{ $user->getAgreementFormat() }}
<strong>{{__('Einverständniserklärung')}}</strong> {{__('at')}} {{ $user->getAgreementFormat() }}
</p>
@else
<p><span class="ion ion-md-close-circle-outline text-danger"></span>
<strong>{{__('Consent for further information')}}</strong> {{ __('nicht akzeptiert') }}</p>
<strong>{{__('Einverständniserklärung')}}</strong> {{ __('nicht akzeptiert') }}</p>
@endif
@endif
@ -243,13 +98,14 @@
{!! Form::open(['url' => route('user_data_accepted_form'), 'class' => 'form-horizontal' , 'id'=>'data-privacy-form-validations']) !!}
<div class="form-group">
<label class="custom-control custom-checkbox m-0">
<input type="checkbox" class="custom-control-input" name="sender_accepted_infos"
id="sender_accepted_infos" @if($user->agreement) checked @endif>
<span class="custom-control-label"> {{ __('Yes, I agree that will send me more information.') }}</span>
<input type="checkbox" class="custom-control-input" name="accepted_active" id="accepted_active" @if($user->agreement) checked @endif>
<span class="custom-control-label">{!! __('Declaration of consent') !!}</span>
</label>
</div>
<div class="text-left mt-3">
<button type="submit" class="btn btn-secondary">{{__('save changes') }}</button>&nbsp;
@ -258,7 +114,7 @@
{!! Form::close() !!}
</div>
@endif
<div class="card-body" style="background: #fff; border: 1px solid rgba(24, 28, 33, 0.06);">
@ -274,6 +130,8 @@
<a href="{{route('user_update_email')}}" class="btn btn-secondary">{{__('Change E-Mail')}}</a>
</div>
@endif
<div class="card-body" style="background: #fff; border: 1px solid rgba(24, 28, 33, 0.06);">
<h4>{{ __('Logout') }}</h4>
<a href="{{route('logout')}}" class="btn btn-primary"><i class="ion ion-ios-log-out text-default"></i>

View file

@ -34,6 +34,8 @@
<link rel="stylesheet" href="{{ mix('/vendor/libs/bootstrap-select/bootstrap-select.css') }}">
<link rel="stylesheet" href="{{ mix('/vendor/libs/select2/select2.css') }}">
<link rel="stylesheet" href="{{ mix('/vendor/libs/datatables/datatables.css') }}">
<link rel="stylesheet" href="{{ mix('/vendor/libs/bootstrap-datepicker/bootstrap-datepicker.css') }}">
<link rel="stylesheet" href="{{ asset('/vendor/libs/summernote/dist/summernote-bs4.css') }}">
<link rel="stylesheet" href="{{ asset('/vendor/libs/slim-image-cropper/slim/slim.css') }}">
@ -85,7 +87,9 @@
margin-left: 0;
max-width: 1240px;
}
.note-toolbar {
z-index: auto;
}
</style>
</head>
@ -106,14 +110,17 @@
<script src="{{ mix('/vendor/libs/select2/select2.js') }}"></script>
<script src="{{ mix('/vendor/libs/datatables/datatables.js') }}"></script>
<script src="{{ mix('/vendor/libs/bootstrap-datepicker/bootstrap-datepicker.js') }}"></script>
<script src="{{asset('/js/bootstrap-datepicker.de.min.js')}}"></script>
<script src="{{ asset('/vendor/libs/summernote/dist/summernote-bs4.min.js') }}"></script>
<script src="{{ asset('/vendor/libs/summernote/lang/summernote-de-DE.js') }}"></script>
<script src="{{ asset('/js/forms_file-upload.js') }}"></script>
<script src="{{ asset('/vendor/libs/slim-image-cropper/slim/slim.kickstart.min.js') }}"></script>
<!-- Libs -->
<!-- `perfect-scrollbar` library required by SideNav plugin -->
@ -128,8 +135,241 @@
$(document).ready(function() {
$('.summernote').summernote({
height: 140,
lang: 'de-DE'
lang: 'de-DE',
});
$('.summernote-small').summernote({
height: 140,
lang: 'de-DE',
toolbar: [
// [groupName, [list of button]]
['style', ['style']],
['style', ['bold', 'italic', 'underline', 'clear']],
['fontsize', ['fontsize']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['height', ['height']]
]
});
});
</script>
<script>
function trigger_company($ele, $speed){
if($ele.val() == 1){
$('.show_company_holder').show($speed);
$('.show_company_holder').find('#company_name').prop('required', true);
$('.show_company_holder').find('#company_country_id').prop('required', true);
}else{
$('.show_company_holder').hide($speed);
$('.show_company_holder').find('#company_name').prop('required', false);
$('.show_company_holder').find('#company_country_id').prop('required', false);
}
}
$( document ).ready(function() {
$('.datepicker-birthday').datepicker({
todayBtn: 'linked',
daysOfWeekDisabled: '1',
multidate: false,
daysOfWeekHighlighted: '0,6',
autoclose: true,
format: 'dd.mm.yyyy',
language: 'de',
clearBtn: true,
startView:2,
});
$('.datepicker-base').datepicker({
orientation: 'auto right',
calendarWeeks: true,
todayBtn: 'linked',
daysOfWeekDisabled: '1',
todayHighlight: true,
multidate: false,
daysOfWeekHighlighted: '0,6',
autoclose: true,
format: 'dd.mm.yyyy',
language: 'de',
clearBtn: true,
});
// Set up validator
var message = 'Default error message';
$('#data-shop-form-validations').validate({
rules: {
'user_shop_name': {
required: true,
remote:
{
url: "{{ route('user_shop_name_check') }}",
type: "post",
data:
{
user_shop_name: function()
{
return $('#data-shop-form-validations :input[name="user_shop_name"]').val();
}
},
encode: true,
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
dataFilter: function(response) {
response = $.parseJSON(response);
console.log(response);
if (response.success === true) return true;
else {
message = response.errors.user_shop_name;
return false;
}
}
}
},
},
errorPlacement: function errorPlacement(error, element) {
$(element).parents('.form-group').find('.input-group').after(
error.addClass('invalid-feedback d-block font-weight-bold')
)
},
highlight: function (element) {
$(element).parent().find('button').removeClass('btn-success');
$(element).parent().find('button').addClass('btn-danger');
$(element).parent().find('button i').removeClass('fa-check');
$(element).parent().find('button i').addClass('fa-times');
$(element).removeClass('is-valid');
$(element).addClass('is-invalid');
},
unhighlight: function (element) {
$(element).removeClass('is-invalid');
$(element).addClass('is-valid');
$(element).parent().find('button').removeClass('btn-danger');
$(element).parent().find('button').addClass('btn-success');
$(element).parent().find('button i').removeClass('fa-times');
$(element).parent().find('button i').addClass('fa-check');
$(element).parents('.form-group').find('.is-invalid').removeClass('is-invalid');
},
messages : {
required: "{{__('This field is required.')}}",
user_shop_name: {
email: "{{ __('Please enter a valid email address.') }}",
remote : function(){ return message; }
},
},
onkeyup: function(element) {$(element).valid()},
});
// With validation
var $lead_form = $('#lead-form-validation');
$lead_form.find('#company').on('change', function () {
trigger_company($(this), 'slow');
});
trigger_company($lead_form.find('#company'), 0);
// Set up validator
$lead_form.validate({
rules: {
'email': {
required: true,
email: true,
remote:
{
url: "{{ route('user_check_mail') }}",
type: "post",
data:
{
user_id: function()
{
return $('#lead-form-validation :input[name="user_id"]').val();
},
email: function()
{
return $('#lead-form-validation :input[name="email"]').val();
}
},
encode: true,
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
}
},
'email-confirm': {
required: true,
equalTo: "#email"
},
'accepted_data_protection': {
required: true
},
'accepted_active': {
required: true
},
},
errorPlacement: function errorPlacement(error, element) {
$(element).parents('.form-group').append(
error.addClass('invalid-feedback small d-block')
)
},
highlight: function (element) {
if ($(element).hasClass('selectpicker')) {
$(element).parent().addClass('is-invalid');
}
$(element).addClass('is-invalid');
},
unhighlight: function (element) {
$(element).removeClass('is-invalid');
$(element).parents('.form-group').find('.is-invalid').removeClass('is-invalid');
},
messages : {
required: "{{__('This field is required.')}}",
company_country_id : {
required: "{{__('This field is required.')}}",
},
salutation : {
required: "{{__('This field is required.')}}",
},
accepted_data_protection : {
required: "{{__('This field is required.')}}",
},
accepted_active : {
required: "{{__('This field is required.')}}",
},
company_name : {
required: "{{__('This field is required.')}}",
},
last_name : {
required: "{{__('This field is required.')}}",
},
equalTo : "{{__('Please enter the same value again.')}}",
'email-confirm' : {
equalTo : "{{__('Please enter the same value again.')}}",
required: "{{__('This field is required.')}}",
},
email: {
required : "{{__('This field is required.')}}",
email: "{{ __('Please enter a valid email address.') }}",
remote : "{{ __('This E-mail is already in use.') }}"
},
},
onkeyup: false
});
});
</script>

View file

@ -12,11 +12,18 @@
<a href="{{ route('home') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-home"></i><div>{{__('Home')}}</div></a>
</li>
@if(Auth::user()->active == 1)
<li class="sidenav-item{{ Request::is('user/edit') ? ' active' : '' }}">
<a href="{{ route('user_edit') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-create"></i><div>{{ __('Your Data') }}</div></a>
</li>
<li class="sidenav-item{{ Request::is('user/shop') ? ' active' : '' }}">
<a href="{{ route('user_shop') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-basket"></i><div>{{ __('Your Shop') }}</div></a>
</li>
@endif
@if(Auth::user()->isAdmin())
<li class="sidenav-divider mb-1"></li>
<li class="sidenav-header small font-weight-semibold">ADMIN</li>
@ -40,7 +47,9 @@
</ul>
</li>
<li class="sidenav-item{{ Request::is('admin/leads') ? ' active' : '' }} {{ Request::is('admin/lead/edit/*') ? ' active' : '' }}">
<a href="{{ route('admin_leads') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-contacts"></i><div>{{ __('Leads') }}</div></a>
</li>
<li class="sidenav-item{{ Request::is('admin/translate/*') ? ' open' : '' }}">

View file

@ -0,0 +1,36 @@
@extends('layouts.auth')
@section('content')
<!-- Content -->
<div class="authentication-wrapper authentication-2 ui-bg-cover ui-bg-overlay-container px-4" style="background-color:#909c7c;">
<div class="ui-bg-overlay bg-dark opacity-25"></div>
<div class="authentication-inner py-5" style="max-width: none; ">
<div class="card">
<div class="p-4 p-sm-5">
<a class="btn btn-primary pull-right" href="{{url('/')}}">{{__('back')}}</a>
<!-- Logo -->
<div class="d-flex justify-content-center align-items-center pb-2 mb-4">
<div class="">
<div class="w-100 position-relative">
<a href="https://www.mivita.care"><img src="{{ asset('/images/logo_mivita.png') }}" alt="mivita.care" class=""></a>
</div>
</div>
</div>
<!-- / Logo -->
@include('legal.shop_term_of_use_de)
<a class="btn btn-primary pull-right" href="{{url('/')}}">{{__('back')}}</a>
</div>
</div>
</div>
</div>
@endsection

View file

@ -0,0 +1,15 @@
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h1 class="box-title m-b-0">Nutzungsbedingungen</h1>
</div>
<div class="modal-body">
<p>Nutzungsbedingungen ...</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default waves-effect" data-dismiss="modal">{{__('close')}}</button>
</div>

View file

@ -0,0 +1,39 @@
@extends('layouts.layout-2')
@section('content')
<div class="authentication-wrapper authentication-2 px-4" style="margin-top: 120px;">
<div class="authentication-inner py-5">
<!-- Form -->
<div class="card">
<div class="p-4 p-sm-5">
<style>
.ui-icon {
width: 90px;
height: 90px;
font-size: 50px;
line-height: calc(90px - 4px);
}
</style>
<div class="text-primary mx-auto mb-4 text-center">
<span class="ui-icon font-weight-bolder">
<i class="ion ion-ios-cog" style="color: #e48800;"></i>
</span>
</div>
<p class="text-center text-big mb-4"><strong>{{ __('Your registration has already been completed.') }}</strong></p>
<a href="{{route('login')}}" class="btn btn-lg btn-primary btn-block">{{ __('go to login') }}</a>
<a href="{{route('password.request')}}" class="btn btn-lg btn-secondary btn-block">{{ __('create new password') }}</a>
<hr>
<a href="{{route('/')}}" class="btn btn-default btn-block">{{ __('back to the homepage') }}</a>
</div>
</div>
<!-- / Form -->
</div>
</div>
@endsection

View file

@ -0,0 +1,36 @@
@extends('layouts.layout-2')
@section('content')
<div class="authentication-wrapper authentication-2 px-4" style="margin-top: 120px;">
<div class="authentication-inner py-5">
<!-- Form -->
<div class="card">
<div class="p-4 p-sm-5">
<style>
.ui-icon {
width: 90px;
height: 90px;
font-size: 50px;
line-height: calc(90px - 4px);
}
</style>
<div class="text-primary mx-auto mb-4 text-center">
<span class="ui-icon font-weight-bolder">
<i class="ion ion-md-close" style="color: #e48800;"></i>
</span>
</div>
<p class="text-center text-big mb-4"><strong>{{ __('Page not available') }}</strong></p>
<a href="{{route('/')}}" class="btn btn-primary btn-block">{{ __('back to the homepage') }}</a>
</div>
</div>
<!-- / Form -->
</div>
</div>
@endsection

View file

@ -0,0 +1,40 @@
@extends('layouts.layout-2')
@section('content')
<div class="authentication-wrapper authentication-2 px-4" style="margin-top: 120px;">
<div class="authentication-inner py-5">
<!-- Form -->
<div class="card">
<div class="p-4 p-sm-5">
<style>
.ui-icon {
width: 90px;
height: 90px;
font-size: 50px;
line-height: calc(90px - 4px);
}
</style>
<div class="text-primary mx-auto mb-4 text-center">
<span class="ui-icon font-weight-bolder">
<i class="ion ion-ios-paper-plane" style="color: #e48800;"></i>
</span>
</div>
<p class="text-center text-big mb-4"><strong>{{ __('Thank you for your registration!') }}</strong></p>
<p class="text-center text-big mb-4">{{ __('We have sent you an e-mail with a link to activate your data.') }}</p>
<a href="{{route('/')}}" class="btn btn-primary btn-block">{{ __('back to the homepage') }}</a>
</div>
</div>
<!-- / Form -->
</div>
</div>
@endsection

View file

@ -0,0 +1,38 @@
@extends('layouts.layout-2')
@section('content')
<div class="authentication-wrapper authentication-2 px-4" style="margin-top: 120px;">
<div class="authentication-inner py-5">
<!-- Form -->
<div class="card">
<div class="p-4 p-sm-5">
<style>
.ui-icon {
width: 90px;
height: 90px;
font-size: 50px;
line-height: calc(90px - 4px);
}
</style>
<div class="text-primary mx-auto mb-4 text-center">
<span class="ui-icon font-weight-bolder">
<i class="ion ion-ios-cog" style="color: #e48800;"></i>
</span>
</div>
<p class="text-center text-big mb-4"><strong>{{ __('You have successfully verified your account!') }}</strong></p>
<p class="text-center text-big mb-4">{{ __('Now check your data.') }}<br><br><a href="{{route('home')}}" class="btn btn btn-primary">{{ __('to your data') }}</a></p>
<hr>
<p class="text-center text-big mb-4">{{ __('Now assign a password.') }}<br><br><a href="{{route('user_update_password_first')}}" class="btn btn btn-primary">{{ __('create new password') }}</a></p>
<hr>
<a href="{{route('/')}}" class="btn btn-primary btn-block">{{ __('back to the homepage') }}</a>
</div>
</div>
<!-- / Form -->
</div>
</div>
@endsection

View file

@ -0,0 +1,24 @@
@extends('layouts.layout-2')
@section('content')
<div class="authentication-wrapper authentication-2 px-4" style="margin-top: 120px;">
<div class="authentication-inner py-5">
<!-- Form -->
<div class="card">
<div class="p-4 p-sm-5">
<div class="display-1 lnr lnr-checkmark-circle text-center text-success mb-4"></div>
<p class="text-center text-big mb-4">Your email address has been successfully confirmed.</p>
<button type="button" class="btn btn-primary btn-block">Proceed to your account</button>
</div>
</div>
<!-- / Form -->
</div>
</div>
@endsection

View file

@ -0,0 +1,98 @@
<div class="row">
<div class="col order-2 order-md-1">
<!-- Description -->
<div class="card mb-4">
<div class="card-body">
{!! Form::open(['url' => route('user_shop_store'), 'class' => 'form-horizontal', 'id'=>'']) !!}
<div class="form-group">
<label class="custom-control custom-checkbox float-right">
{!! Form::checkbox('active', 1, $user->shop->active, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">{{__('aktiv')}}</span>
</label>
<label class="form-label" for="title">{{ __('shop_title') }}</label>
{{ Form::text('title', $user->shop->title, array('placeholder'=>__('shop_title'), 'class'=>'form-control', 'id'=>'title')) }}
<small class="form-text text-muted">{{ __('shop_title_help') }}</small>
</div>
<div class="form-group">
<label class="form-label" for="copy">{{ __('shop_copy') }}</label>
{{ Form::textarea('copy', $user->shop->copy , array('placeholder'=>__('shop_copy'), 'class'=>'form-control summernote-small', 'id'=>'copy')) }}
<small class="form-text text-muted">{{ __('shop_copy_help') }}</small>
</div>
<div class="form-group">
<label class="form-label" for="info">{{ __('shop_info') }}</label>
{{ Form::textarea('info', $user->shop->info , array('placeholder'=>__('shop_info'), 'class'=>'form-control summernote-small', 'id'=>'info')) }}
<small class="form-text text-muted">{{ __('shop_info_help') }}</small>
</div>
<div class="text-left mt-0 mb-2">
<button type="submit" class="btn btn-secondary">{{ __('save') }}</button>&nbsp;
</div>
{!! Form::close() !!}
</div>
</div>
<!-- / Description -->
<!-- image files -->
<div class="card mb-4">
@include('user.components.user_shop_image')
</div>
<!-- / image files -->
</div>
<div class="col-md-5 col-xl-4 order-1 order-md-2">
<!-- Project details -->
<div class="card mb-4">
<h6 class="card-header">{{ __('Shop details') }}</h6>
<ul class="list-group list-group-flush">
<li class="list-group-item d-flex justify-content-between align-items-center">
<div class="text-muted">{{ __('name') }}</div>
<div>
{{ $user->shop->name }}
</div>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center">
<div class="text-muted">{{ __('Domain') }}</div>
<div>
<a href="{{ $user->shop->getSubdomain() }}" target="_blank">{{ $user->shop->getSubdomain() }}
</a>
</div>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center">
<div class="text-muted">{{ __('Status') }}</div>
<div>
@if($user->shop->getSubdomainStatus())
<span class="badge badge-pill badge-success"><i class="far fa-check"> {{ __('available') }} </i></span>
@else
<span class="badge badge-pill badge-danger"><i class="far fa-times"> {{ __('not available') }} </i></span>
@endif
</div>
</li>
@if(!$user->shop->getSubdomainStatus())
<li class="list-group-item d-flex justify-content-between align-items-center">
<small>{{ __('not available copy') }}</small>
</li>
@endif
<li class="list-group-item d-flex justify-content-between align-items-center">
<div class="text-muted">{{ __('active since') }}</div>
<div>
<strong>{{ $user->shop->getActiveDateFormat() }}</strong>
</div>
</li>
</ul>
</div>
<!-- / Project details -->
</div>
</div>

View file

@ -0,0 +1,61 @@
<h6 class="card-header">{{ __('shop image') }}<br><small>{{ __('shop image copy') }}</small>
</h6>
<div class="card-body p-3">
<style>
.dz-message {
margin: 2rem 0;
}
.default-style .dz-message {
font-size: 1.1em;
}
</style>
<div class="row">
@if($user->shop->isImage())
<div class="col-12 text-center">
<div class="text-center">
<img class="img-fluid" style="margin: 0 auto;" alt="" src="{{ url($user->shop->getImage()) }}">
<br><br>
<a href="{{ route('user_shop_delete_image') }}" class="btn btn-primary" onclick="return confirm('Bild wirklich löschen?');">Bild löschen</a>
</div>
</div>
@else
<div class="col-md-12">
<div class="card">
<div class="card-body">
<form method="POST" action="{{ route('user_shop_upload_image') }}" accept-charset="UTF-8" class="avatar" enctype="multipart/form-data">
@csrf
<div class="slim_holder text-center">
<div class="slim" style="margin:20px auto;"
data-label='<span class="text-green">Foto-Upload</span><br>(Datei suchen oder Drag & Drop)'
data-fetcher="fetch.php"
data-size="550,550"
data-min-size="200,200"
data-max-file-size="10"
data-status-image-too-small="Bild zu klein<br>min. $0 Pixel"
data-status-file-type="Ungültige Datei<br>bitte nur: $0"
data-status-file-size="Die Datei ist zu groß<br>max. $0 MB"
data-button-confirm-label="bestätigen"
data-button-cancel-label="abbrechen"
data-button-confirm-title="bestätigen"
data-button-cancel-title="abbrechen"
data-button-rotate-title="drehen"
data-ratio="1:1">
<input type="file" name="images[]" required />
</div>
<br>
<button class="btn btn-primary" type="submit">Bild speichern</button>
</div>
</form>
</div>
</div>
</div>
@endif
</div>
</div>

View file

@ -0,0 +1,68 @@
<div class="card-body" style="background: #fff; border: 1px solid rgba(24, 28, 33, 0.06);">
<h4>{{ __('open your shop') }}</h4>
{!! Form::open(['url' => route('user_shop_register_form'), 'class' => 'form-horizontal' , 'id'=>'data-shop-form-validations']) !!}
@php
$shop_name_btn_color = 'btn-secondary';
$shop_name_fa = '';
$shop_name_form_control = '';
@endphp
@if(Session::has('shop-name-error'))
@if(Session::get('shop-name-error') == 'check')
@php
$shop_name_btn_color = 'btn-success';
$shop_name_fa = 'fa-check';
$shop_name_form_control = ' is-valid';
@endphp
@endif
@if(Session::get('shop-name-error') == 'error')
@php
$shop_name_btn_color = 'btn-danger';
$shop_name_fa = 'fa-times';
$shop_name_form_control = ' is-invalid';
@endphp
@endif
@endif
<div class="form-group">
<label class="form-label" for="shop_name">{{ __('Choose Your Shop Name') }}</label><br>
<div class="input-group mt-2 mb-2 ">
{{ Form::text('user_shop_name', old('user_shop_name'), array('placeholder'=>__('Your Shop Name'), 'class'=>'form-control'.$shop_name_form_control.($errors->has('user_shop_name') ? ' is-invalid' : ''), 'id'=>'user_shop_name', 'tabindex' => 2)) }}
<span class="input-group-append">
<button class="btn {{ $shop_name_btn_color }}" type="submit" name="shop_submit" value="check"><i class="fa {{ $shop_name_fa }}"></i> prüfen!</button>
</span>
</div>
@if ($errors->has('user_shop_name'))
<span class="invalid-feedback" style="display: inline-block;">
<strong>{{ $errors->first('user_shop_name') }}</strong>
</span>
@endif
<p class="mt-2">{{__('shop_name_description')}}</p>
</div>
<hr>
<div class="form-group">
<label class="custom-control custom-checkbox m-0">
<input type="checkbox" class="custom-control-input {{ $errors->has('user_shop_active') ? 'is-invalid' : '' }}" name="user_shop_active" id="user_shop_active" tabindex = "1">
<span class="custom-control-label">{!! __('Declaration of shop') !!}
<button type="button" class="btn btn-outline-primary btn-sm update_modal_data_load" data-url="{{ route('loading_modal') }}" data-data="shop_term_of_use" data-target="#modal-loading">{{__('Terms of Use')}}</button>
</span>
</label>
@if ($errors->has('user_shop_active'))
<span class="invalid-feedback" style="display: inline-block;">
<strong>{{ $errors->first('user_shop_active') }}</strong>
</span>
@endif
</div>
<hr>
<div class="text-left mt-3">
<button type="submit" class="btn btn-secondary" name="shop_submit" value="action">{{__('save and continue') }}</button>&nbsp;
</div>
{!! Form::close() !!}
</div>

View file

@ -0,0 +1,20 @@
<div class="card mb-4">
<h5 class="card-header">
{{ __('Einwilligung & Datenschutz') }}
</h5>
<div class="card-body">
<div class="form-group">
<label class="custom-control custom-checkbox m-0">
<input type="checkbox" class="custom-control-input" name="accepted_data_protection" id="accepted_data_protection" required>
<span class="custom-control-label">{!! __('I have read the :link and accept it.*', ['link' => '<a href="#" class="update_modal_data_load" data-url="'.route('loading_modal').'" data-data="data_protection" data-target="#modal-loading">'.__('data protection').'</a>']) !!}</span>
</label>
</div>
<div class="form-group">
<label class="custom-control custom-checkbox m-0">
<input type="checkbox" class="custom-control-input" name="accepted_active" id="accepted_active" required>
<span class="custom-control-label">{!! __('Declaration of consent') !!}</span>
</label>
</div>
</div>
</div>

View file

@ -0,0 +1,14 @@
<div class="card mb-4">
<h5 class="card-header">
{{ __('Kontakt verifizieren') }}
</h5>
<div class="card-body">
<div class="form-group">
<label class="custom-control custom-checkbox m-0">
<input type="checkbox" class="custom-control-input" name="contact_verify" id="contact_verify" checked>
<span class="custom-control-label"> {{ __('Kontakt anlegen und dem Kontakt eine E-Mail zur Verifizierung senden!') }}</span>
</label>
</div>
</div>
</div>

View file

@ -16,7 +16,7 @@
</div>
@endif
<h4 class="font-weight-bold py-3 mb-4">
<h4 class="font-weight-bold py-2 mb-2">
{{ __('Your Data') }}
</h4>
@ -24,7 +24,7 @@
{!! Form::open(['url' => route('user_edit'), 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!}
<input type="hidden" name="user_id" id="user_id" value="@if($user->id>0){{$user->id}}@else new @endif">
{{-- @include('user.form') --}}
@include('user.form')
<div class="text-left mt-3">
<button type="submit" class="btn btn-secondary">{{ __('save changes') }}</button>&nbsp;

View file

@ -77,28 +77,12 @@
</div>
</div>
<div class="card mb-4 show_company_holder">
<h5 class="card-header">
{{ __('Industry') }}
</h5>
<div class="card-body">
<div class="row">
{!! HTMLHelper::getIndustrySectorForHTML($user->account->getUserIndustrySectorIds()) !!}
</div>
</div>
</div>
<div class="card mb-4">
<h5 class="card-header">
{{ __('Your Data') }}
{{ __('Personal Data') }}
</h5>
<div class="card-body">
<div class="form-group">
<label class="form-label" for="position_text">{{ __('Function') }}</label>
{{ Form::text('position_text', $user->account->position_text, array('placeholder'=>__('Function'), 'class'=>'form-control', 'id'=>'position_text', 'tabindex' => 9)) }}
</div>
<div class="form-row">
<div class="form-group col-md-4">
<label class="form-label">{{ __('Salutation') }}*</label>
@ -169,7 +153,7 @@
<div class="form-group col-md-8">
<label class="form-label" for="phone">{{ __('Phone') }}</label>
{{ Form::text('phone', $user->account->phone, array('placeholder'=>__('Mobile Phone'), 'class'=>'form-control', 'id'=>'phone', 'tabindex' => 18)) }}
{{ Form::text('phone', $user->account->phone, array('placeholder'=>__('Phone'), 'class'=>'form-control', 'id'=>'phone', 'tabindex' => 18)) }}
</div>
</div>
@ -205,11 +189,11 @@
@if(count($user->user_update_email) > 0)
<p class="badge badge-primary" style=" color:#fff;">{{ $user->user_update_email->first()->email }} {{__('waiting for activation since')}} | {{ $user->user_update_email->first()->created_at->format('d.m.Y H:i') }}</p><br>
@endif
<a href="{{ route('admin_lead_change_mail', [$user->id]) }}" class="btn btn-submit btn-sm"> {{ __('Contact') }} {{__('Change E-Mail')}}</a>
<a href="{{ route('admin_lead_change_mail', [$user->id]) }}" class="btn btn-default btn-sm"> {{ __('Contact') }} {{__('Change E-Mail')}}</a>
@else
<a href="{{ route('user_update_email', [$user->id]) }}" class="btn btn-submit btn-sm">{{__('Change E-Mail')}}</a>
<a href="{{ route('user_update_email', [$user->id]) }}" class="btn btn-default btn-sm">{{__('Change E-Mail')}}</a>
@endif
@ -229,24 +213,47 @@
</div>
</div>
<div class="card mb-4">
<div class="card mb-4 show_company_holder">
<h5 class="card-header">
{{ __('Your interests') }}
{{ __('weiteres') }}
</h5>
<div class="card-body">
<div class="row">
{!! HTMLHelper::getIntereststForHTML($user->account->getUserInterestIds()) !!}
</div>
</div>
</div>
<div class="card mb-4">
<h5 class="card-header">
{{ __('Your contact at JACKON') }}
</h5>
<div class="card-body">
<div class="form-group">
{{ Form::text('contactpartner', $user->account->contactpartner, array('placeholder'=>__('Name'), 'class'=>'form-control', 'id'=>'contactpartner', 'tabindex' => 22)) }}
<div class="form-row">
<div class="form-group col-md-4">
<label for="birthday" class="form-label">{{ __('birthday') }}</label>
{{ Form::text('birthday', $user->account->birthday, array('placeholder'=>Util::formatDate(), 'data-date-format'=>Util::formatDate(), 'data-start_view'=>2, 'class'=>'form-control datepicker-birthday')) }}
</div>
<div class="form-group col-md-4">
<label class="form-label" for="website">{{ __('website') }}</label>
{{ Form::text('website', $user->account->website, array('placeholder'=>__('website'), 'class'=>'form-control', 'id'=>'website')) }}
</div>
<div class="form-group col-md-4">
<label class="form-label" for="instagram">{{ __('instagram') }}</label>
{{ Form::text('instagram', $user->account->instagram, array('placeholder'=>__('instagram'), 'class'=>'form-control', 'id'=>'instagram')) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-md-6">
<label class="form-label" for="facebook">{{ __('facebook') }}</label>
{{ Form::text('facebook', $user->account->facebook, array('placeholder'=>__('facebook'), 'class'=>'form-control', 'id'=>'facebook')) }}
</div>
<div class="form-group col-md-6">
<label class="form-label" for="facebook_fanpage">{{ __('facebook_fanpage') }}</label>
{{ Form::text('facebook_fanpage', $user->account->facebook_fanpage, array('placeholder'=>__('facebook_fanpage'), 'class'=>'form-control', 'id'=>'facebook_fanpage')) }}
</div>
</div>
</div>
</div>

View file

@ -0,0 +1,29 @@
@extends('layouts.layout-2')
@section('content')
{{-- @if ($errors->any())
<div class="row">
<div class="col-sm-12">
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
</div>
</div>
@endif
--}}
<h4 class="font-weight-bold py-2 mb-2">
{{ __('Your Shop') }}
</h4>
@if($user->shop)
@include('user.components.user_shop_edit')
@else
@include('user.components.user_shop_register')
@endif
@endsection

View file

@ -12,19 +12,32 @@
*/
Route::get('storage/images/{from}/{slug}', function($from = null, $slug = null) {
if ($from == 'shop'){
$image = \App\Models\UserShop::where('filename', $slug)->first();
$path = storage_path('app/public').'/images/shop'.'/'.$image->filename;
Route::domain('mivita.local')->group(function () {
Route::get('/', 'Web\SiteController@index')->name('/');
Route::get('product/image/{slug}', function($slug = null)
{
$image = \App\Models\ProductImage::where('slug', $slug)->first();
$path = storage_path('app/public').'/images/product'.'/'.$image->product_id.'/'.$image->filename;
}
if (file_exists($path)) {
return Response::file($path);
}
})->name('product_image');
})->name('storage_images');
Route::domain('mivita.local')->group(function () {
Route::get('/', 'Web\SiteController@index')->name('/');
Route::get('product/image/{slug}', function($slug = null)
{
$image = \App\Models\ProductImage::where('slug', $slug)->first();
$path = storage_path('app/public').'/images/product'.'/'.$image->product_id.'/'.$image->filename;
if (file_exists($path)) {
return Response::file($path);
}
})->name('product_image');
Route::get('/card/add/{id}/{quantity?}/{product_slug?}', 'Web\CardController@addToCardGet')->name('card_add_get');
@ -43,10 +56,6 @@ Route::get('product/image/{slug}', function($slug = null)
Route::get('/{site}/{subsite?}/{product_slug?}', 'Web\SiteController@site')->name('site');
});
/* ROUTING FOR CRM / CMS*/
@ -73,6 +82,14 @@ Route::domain('mein.mivita.local')->group(function () {
Route::post('/loading/modal', 'HomeController@loadingModal')->name('loading_modal');
Route::get('/', 'HomeController@index')->name('home');
Route::get('/user/update_email_confirm/{token}', 'UserUpdateEmailController@activateMail')->name('user_update_email_confirm');
Route::post('/user/check/mail', 'HomeController@checkMail')->name('user_check_mail');
Route::get('/register/verify/{confirmationCode}', 'HomeController@verify')->name('register_verify');
Route::get('/status/register', 'HomeController@statusRegister')->name('status_register');
Route::get('/status/verify', 'HomeController@statusVerify')->name('status_verify');
Route::get('/status/error', 'HomeController@statusError')->name('status_error');
Route::get('/status/not/found', 'HomeController@notFound')->name('not_found');
Route::group(['middleware' => ['auth']], function()
@ -97,6 +114,7 @@ Route::domain('mein.mivita.local')->group(function () {
*/
Route::get('/user/edit', 'UserDataController@userEdit')->name('user_edit');
Route::post('/user/edit', 'UserDataController@userEditStore')->name('user_edit');
Route::post('/user/data/store', 'UserDataController@userDataStore')->name('user_data_store');
Route::get('/user/update_password', 'UserUpdatePasswordController@updatePassword')->name('user_update_password');
@ -113,9 +131,15 @@ Route::domain('mein.mivita.local')->group(function () {
Route::post('/user/data/accepted/form', 'UserDataController@userDataAcceptedForm')->name('user_data_accepted_form');
Route::get('/user/data/free', 'UserDataController@userDataFree')->name('user_data_free');
Route::post('/user/data/free/form', 'UserDataController@userDataFreeForm')->name('user_data_free_form');
Route::get('/user/shop', 'UserShopController@index')->name('user_shop');
Route::post('/user/shop/store', 'UserShopController@store')->name('user_shop_store');
Route::post('/user/shop/register/form', 'UserShopController@userShopRegisterForm')->name('user_shop_register_form');
Route::post('/user/shop/name/check', 'UserShopController@checkUserShopName')->name('user_shop_name_check');
Route::post('/user/shop/upload/image', 'UserShopController@uploadImage')->name('user_shop_upload_image');
Route::get('/user/shop/delete/image', 'UserShopController@deleteImage')->name('user_shop_delete_image');
});
@ -150,6 +174,17 @@ Route::domain('mein.mivita.local')->group(function () {
//Route::get('/admin/products/import', 'ImportProductController@import')->name('admin_product_import');
//leads
Route::get('datatables/leads', 'DataTableController@getLeads')->name('datatables-leads');
Route::get('/admin/leads', 'LeadController@index')->name('admin_leads');
Route::get('/admin/lead/edit/{id}', 'LeadController@edit')->name('admin_lead_edit');
Route::get('/admin/lead/change_mail/{id}', 'UserUpdateEmailController@adminChangeMail')->name('admin_lead_change_mail');
Route::post('/admin/lead/change_mail/{id}', 'UserUpdateEmailController@adminUpdateMail')->name('admin_lead_change_mail');
Route::post('/admin/lead/store', 'LeadController@store')->name('admin_lead_store');