Merge branch 'master' of https://github.com/bagisto/bagisto into sarga-v1
Conflicts: composer.lock
This commit is contained in:
commit
b6c46480aa
|
|
@ -8,7 +8,7 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
operating-system: [ubuntu-latest]
|
||||
php-versions: ['7.4', '8.0', '8.1']
|
||||
php-versions: ['8.0', '8.1']
|
||||
name: PHP ${{ matrix.php-versions }} test on ${{ matrix.operating-system }}
|
||||
|
||||
services:
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
.php_cs.cache
|
||||
.vscode
|
||||
.vagrant
|
||||
/stubs
|
||||
/data
|
||||
/docker-compose-collection
|
||||
Homestead.json
|
||||
|
|
@ -19,7 +20,7 @@ package-lock.json
|
|||
/public/storage
|
||||
/public/themes
|
||||
/public/vendor
|
||||
/resources/lang/vendor
|
||||
/lang/vendor
|
||||
/storage/*.key
|
||||
/storage/dcc-data/
|
||||
/vendor
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
namespace App\Http\Middleware;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Fideloper\Proxy\TrustProxies as Middleware;
|
||||
use Illuminate\Http\Middleware\TrustProxies as Middleware;
|
||||
|
||||
class TrustProxies extends Middleware
|
||||
{
|
||||
|
|
@ -19,5 +19,10 @@ class TrustProxies extends Middleware
|
|||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $headers = Request::HEADER_X_FORWARDED_ALL;
|
||||
protected $headers =
|
||||
Request::HEADER_X_FORWARDED_FOR |
|
||||
Request::HEADER_X_FORWARDED_HOST |
|
||||
Request::HEADER_X_FORWARDED_PORT |
|
||||
Request::HEADER_X_FORWARDED_PROTO |
|
||||
Request::HEADER_X_FORWARDED_AWS_ELB;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,30 +8,28 @@
|
|||
"license": "MIT",
|
||||
"type": "project",
|
||||
"require": {
|
||||
"php": "^7.4|^8.0",
|
||||
"php": "^8.0.2",
|
||||
"astrotomic/laravel-translatable": "^11.0.0",
|
||||
"aws/aws-sdk-php": "^3.171",
|
||||
"bagisto/legacy-api": "^1.0",
|
||||
"bagisto/rest-api": "dev-master",
|
||||
"bagistobrasil/bagisto-product-social-share": "^0.1.2",
|
||||
"barryvdh/laravel-debugbar": "^3.1",
|
||||
"barryvdh/laravel-dompdf": "^0.8.5|^0.9.0",
|
||||
"barryvdh/laravel-dompdf": "^1.0.0",
|
||||
"diglactic/laravel-breadcrumbs": "^7.0",
|
||||
"doctrine/dbal": "^2.9",
|
||||
"enshrined/svg-sanitize": "^0.15.0",
|
||||
"facade/ignition": "^2.3.6",
|
||||
"spatie/laravel-ignition": "^1.0",
|
||||
"fakerphp/faker": "^1.14",
|
||||
"fideloper/proxy": "^4.2",
|
||||
"flynsarmy/db-blade-compiler": "^5.5",
|
||||
"flynsarmy/db-blade-compiler": "dev-master",
|
||||
"guzzlehttp/guzzle": "^7.0.1",
|
||||
"intervention/image": "^2.4",
|
||||
"intervention/imagecache": "^2.3",
|
||||
"intervention/imagecache": "^2.5.2",
|
||||
"kalnoy/nestedset": "^6.0",
|
||||
"khaled.alshamaa/ar-php": "^6.0.0",
|
||||
"konekt/concord": "^1.2",
|
||||
"laravel/framework": "^8.75",
|
||||
"laravel/framework": "^9.0",
|
||||
"laravel/sanctum": "^2.12",
|
||||
"laravel/scout": "^8.0",
|
||||
"laravel/scout": "^9.0",
|
||||
"laravel/socialite": "^5.0",
|
||||
"laravel/tinker": "^2.0",
|
||||
"laravel/ui": "^3.0",
|
||||
|
|
@ -41,15 +39,15 @@
|
|||
"pusher/pusher-php-server": "^7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"codeception/codeception": "^4.1",
|
||||
"codeception/module-asserts": "^1.1",
|
||||
"codeception/module-filesystem": "^1.0",
|
||||
"codeception/module-laravel": "^2.0",
|
||||
"codeception/module-rest": "^1.4",
|
||||
"codeception/module-webdriver": "^1.0",
|
||||
"codeception/codeception": "*@dev",
|
||||
"codeception/module-asserts": "^3.0.0",
|
||||
"codeception/module-filesystem": "^3.0.0",
|
||||
"codeception/module-laravel": "*@dev",
|
||||
"codeception/module-rest": "^3.0.0",
|
||||
"codeception/module-webdriver": "^3.0.0",
|
||||
"filp/whoops": "^2.0",
|
||||
"mockery/mockery": "^1.3.1",
|
||||
"nunomaduro/collision": "^5.3",
|
||||
"nunomaduro/collision": "^6.1",
|
||||
"phpunit/phpunit": "^9.5"
|
||||
},
|
||||
"replace": {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ return [
|
|||
|
|
||||
*/
|
||||
|
||||
'default' => env('FILESYSTEM_DRIVER', 'public'),
|
||||
'default' => env('FILESYSTEM_DISK', 'public'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
|||
135
config/mail.php
135
config/mail.php
|
|
@ -4,45 +4,81 @@ return [
|
|||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Mail Driver
|
||||
| Default Mailer
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Laravel supports both SMTP and PHP's "mail" function as drivers for the
|
||||
| sending of e-mail. You may specify which one you're using throughout
|
||||
| your application here. By default, Laravel is setup for SMTP mail.
|
||||
|
|
||||
| Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses",
|
||||
| "sparkpost", "log", "array"
|
||||
| This option controls the default mailer that is used to send any email
|
||||
| messages sent by your application. Alternative mailers may be setup
|
||||
| and used as needed; however, this mailer will be used by default.
|
||||
|
|
||||
*/
|
||||
|
||||
'driver' => env('MAIL_DRIVER', 'smtp'),
|
||||
'default' => env('MAIL_MAILER', 'smtp'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| SMTP Host Address
|
||||
| Mailer Configurations
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may provide the host address of the SMTP server used by your
|
||||
| applications. A default option is provided that is compatible with
|
||||
| the Mailgun mail service which will provide reliable deliveries.
|
||||
| Here you may configure all of the mailers used by your application plus
|
||||
| their respective settings. Several examples have been configured for
|
||||
| you and you are free to add your own as your application requires.
|
||||
|
|
||||
| Laravel supports a variety of mail "transport" drivers to be used while
|
||||
| sending an e-mail. You will specify which one you are using for your
|
||||
| mailers below. You are free to add additional mailers as required.
|
||||
|
|
||||
| Supported: "smtp", "sendmail", "mailgun", "ses",
|
||||
| "postmark", "log", "array", "failover"
|
||||
|
|
||||
*/
|
||||
|
||||
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
|
||||
'mailers' => [
|
||||
'smtp' => [
|
||||
'transport' => 'smtp',
|
||||
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
|
||||
'port' => env('MAIL_PORT', 587),
|
||||
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
|
||||
'username' => env('MAIL_USERNAME'),
|
||||
'password' => env('MAIL_PASSWORD'),
|
||||
'timeout' => null,
|
||||
'verify_peer' => false,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| SMTP Host Port
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This is the SMTP port used by your application to deliver e-mails to
|
||||
| users of the application. Like the host we have set this value to
|
||||
| stay compatible with the Mailgun e-mail application by default.
|
||||
|
|
||||
*/
|
||||
'ses' => [
|
||||
'transport' => 'ses',
|
||||
],
|
||||
|
||||
'port' => env('MAIL_PORT', 587),
|
||||
'mailgun' => [
|
||||
'transport' => 'mailgun',
|
||||
],
|
||||
|
||||
'postmark' => [
|
||||
'transport' => 'postmark',
|
||||
],
|
||||
|
||||
'sendmail' => [
|
||||
'transport' => 'sendmail',
|
||||
'path' => env('MAIL_SENDMAIL_PATH', '/usr/sbin/sendmail -bs -i'),
|
||||
],
|
||||
|
||||
'log' => [
|
||||
'transport' => 'log',
|
||||
'channel' => env('MAIL_LOG_CHANNEL'),
|
||||
],
|
||||
|
||||
'array' => [
|
||||
'transport' => 'array',
|
||||
],
|
||||
|
||||
'failover' => [
|
||||
'transport' => 'failover',
|
||||
'mailers' => [
|
||||
'smtp',
|
||||
'log',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
@ -74,55 +110,6 @@ return [
|
|||
'name' => env('ADMIN_MAIL_NAME', 'Admin')
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| E-Mail Encryption Protocol
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify the encryption protocol that should be used when
|
||||
| the application send e-mail messages. A sensible default using the
|
||||
| transport layer security protocol should provide great security.
|
||||
|
|
||||
*/
|
||||
|
||||
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
|
||||
|
||||
'stream' => [
|
||||
'ssl' => [
|
||||
'allow_self_signed' => true,
|
||||
'verify_peer' => false,
|
||||
'verify_peer_name' => false,
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| SMTP Server Username
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If your SMTP server requires a username for authentication, you should
|
||||
| set it here. This will get used to authenticate with your server on
|
||||
| connection. You may also set the "password" value below this one.
|
||||
|
|
||||
*/
|
||||
|
||||
'username' => env('MAIL_USERNAME'),
|
||||
|
||||
'password' => env('MAIL_PASSWORD'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Sendmail System Path
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| When using the "sendmail" driver to send e-mails, we will need to know
|
||||
| the path to where Sendmail lives on this server. A default path has
|
||||
| been provided here, which will work well on most of your systems.
|
||||
|
|
||||
*/
|
||||
|
||||
'sendmail' => '/usr/sbin/sendmail -bs',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Markdown Mail Settings
|
||||
|
|
@ -142,4 +129,4 @@ return [
|
|||
],
|
||||
],
|
||||
|
||||
];
|
||||
];
|
||||
119
config/scout.php
119
config/scout.php
|
|
@ -1,119 +0,0 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Search Engine
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default search connection that gets used while
|
||||
| using Laravel Scout. This connection is used when syncing all models
|
||||
| to the search service. You should adjust this based on your needs.
|
||||
|
|
||||
| Supported: "algolia", "null"
|
||||
|
|
||||
*/
|
||||
|
||||
'driver' => env('SCOUT_DRIVER', null),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Index Prefix
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify a prefix that will be applied to all search index
|
||||
| names used by Scout. This prefix may be useful if you have multiple
|
||||
| "tenants" or applications sharing the same search infrastructure.
|
||||
|
|
||||
*/
|
||||
|
||||
'prefix' => env('SCOUT_PREFIX', ''),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Queue Data Syncing
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option allows you to control if the operations that sync your data
|
||||
| with your search engines are queued. When this is set to "true" then
|
||||
| all automatic data syncing will get queued for better performance.
|
||||
|
|
||||
*/
|
||||
|
||||
'queue' => env('SCOUT_QUEUE', false),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Database Transactions
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This configuration option determines if your data will only be synced
|
||||
| with your search indexes after every open database transaction has
|
||||
| been committed, thus preventing any discarded data from syncing.
|
||||
|
|
||||
*/
|
||||
|
||||
'after_commit' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Chunk Sizes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These options allow you to control the maximum chunk size when you are
|
||||
| mass importing data into the search engine. This allows you to fine
|
||||
| tune each of these chunk sizes based on the power of the servers.
|
||||
|
|
||||
*/
|
||||
|
||||
'chunk' => [
|
||||
'searchable' => 500,
|
||||
'unsearchable' => 500,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Soft Deletes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option allows to control whether to keep soft deleted records in
|
||||
| the search indexes. Maintaining soft deleted records can be useful
|
||||
| if your application still needs to search for the records later.
|
||||
|
|
||||
*/
|
||||
|
||||
'soft_delete' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Identify User
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option allows you to control whether to notify the search engine
|
||||
| of the user performing the search. This is sometimes useful if the
|
||||
| engine supports any analytics based on this application's users.
|
||||
|
|
||||
| Supported engines: "algolia"
|
||||
|
|
||||
*/
|
||||
|
||||
'identify' => env('SCOUT_IDENTIFY', false),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Algolia Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may configure your Algolia settings. Algolia is a cloud hosted
|
||||
| search engine which works great with Scout out of the box. Just plug
|
||||
| in your application ID and admin API key to get started searching.
|
||||
|
|
||||
*/
|
||||
|
||||
'algolia' => [
|
||||
'id' => env('ALGOLIA_APP_ID', ''),
|
||||
'secret' => env('ALGOLIA_SECRET', ''),
|
||||
],
|
||||
|
||||
];
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used during authentication for various
|
||||
| messages that we need to display to the user. You are free to modify
|
||||
| these language lines according to your application's requirements.
|
||||
|
|
||||
*/
|
||||
|
||||
'failed' => 'ये क्रेडेंशियल हमारे रिकॉर्ड से मेल नहीं खाते।',
|
||||
'throttle' => 'बहुत अधिक लॉगिन प्रयास। कृपया :seconds सेकंड में पुन: प्रयास करें।',
|
||||
|
||||
];
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Pagination Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used by the paginator library to build
|
||||
| the simple pagination links. You are free to change them to anything
|
||||
| you want to customize your views to better match your application.
|
||||
|
|
||||
*/
|
||||
|
||||
'previous' => '« पहले का',
|
||||
'next' => 'अगला »',
|
||||
|
||||
];
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Reset Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are the default lines which match reasons
|
||||
| that are given by the password broker for a password update attempt
|
||||
| has failed, such as for an invalid token or invalid new password.
|
||||
|
|
||||
*/
|
||||
|
||||
'password' => 'पासवर्ड कम से कम छह वर्णों का होना चाहिए और पुष्टि से मेल खाना चाहिए।',
|
||||
'reset' => 'आपका पासवर्ड बदला जा चुका है!',
|
||||
'sent' => 'हमने आपका पासवर्ड रीसेट लिंक ई-मेल कर दिया है!',
|
||||
'token' => 'यह पासवर्ड रीसेट टोकन अमान्य है।',
|
||||
'user' => "हम उस ई-मेल पते वाला उपयोगकर्ता नहीं ढूंढ सकते।",
|
||||
|
||||
];
|
||||
|
|
@ -0,0 +1,146 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Validation Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines contain the default error messages used by
|
||||
| the validator class. Some of these rules have multiple versions such
|
||||
| as the size rules. Feel free to tweak each of these messages here.
|
||||
|
|
||||
*/
|
||||
|
||||
'accepted' => ':attribute को स्वीकार किया जाना चाहिए।',
|
||||
'active_url' => ':attribute एक मान्य URL नहीं है।',
|
||||
'after' => 'द :attribute :डेट के बाद की तारीख होनी चाहिए।',
|
||||
'after_or_equal' => 'द :attribute :डेट के बाद या उसके बराबर की तारीख होनी चाहिए।',
|
||||
'alpha' => ':attribute में केवल अक्षर हो सकते हैं।',
|
||||
'alpha_dash' => ':attribute में केवल अक्षर, संख्याएं, डैश और अंडरस्कोर हो सकते हैं।',
|
||||
'alpha_num' => ':attribute में केवल अक्षर और संख्याएँ हो सकती हैं।',
|
||||
'array' => ':attribute एक सरणी होनी चाहिए।',
|
||||
'before' => 'द :attribute :डेट से पहले की तारीख होनी चाहिए।',
|
||||
'before_or_equal' => 'द :attribute :डेट से पहले या उसके बराबर की तारीख होनी चाहिए।',
|
||||
'between' => [
|
||||
'numeric' => ': विशेषता :min और :max के बीच होनी चाहिए।',
|
||||
'file' => ': विशेषता :min और :max किलोबाइट्स के बीच होनी चाहिए।',
|
||||
'string' => ': विशेषता :min और :max वर्णों के बीच होनी चाहिए।',
|
||||
'array' => ': विशेषता :min और :max आइटम के बीच होनी चाहिए।',
|
||||
],
|
||||
'boolean' => ':attribute क्षेत्र सही या गलत होना चाहिए।',
|
||||
'confirmed' => ':attribute पुष्टि मेल नहीं खाती।',
|
||||
'date' => ':attribute मान्य तिथि नहीं है।',
|
||||
'date_format' => ':attribute प्रारूप :format से मेल नहीं खाती।',
|
||||
'different' => ':attribute और :अन्य अलग-अलग होने चाहिए।',
|
||||
'digits' => ':attribute :अंक अंक होना चाहिए।',
|
||||
'digits_between' => ':attribute :मिनट और :अधिकतम अंकों के बीच होनी चाहिए।',
|
||||
'dimensions' => ':attribute में अमान्य छवि आयाम हैं।',
|
||||
'distinct' => ':attribute फ़ील्ड में एक डुप्लिकेट मान होता है।',
|
||||
'email' => ':attribute एक मान्य ईमेल पता होना चाहिए।',
|
||||
'exists' => 'चयनित :attribute अमान्य है।',
|
||||
'file' => ':attribute एक फ़ाइल होनी चाहिए।',
|
||||
'filled' => ':attribute फ़ील्ड में एक मान होना चाहिए।',
|
||||
'gt' => [
|
||||
'numeric' => ':attribute :value से बड़ी होनी चाहिए।',
|
||||
'file' => 'द :attribute :value किलोबाइट्स से बड़ा होना चाहिए।',
|
||||
'string' => 'द :attribute :value कैरेक्टर्स से बड़ा होना चाहिए।',
|
||||
'array' => 'द :attribute में :value आइटम्स से अधिक होना चाहिए।',
|
||||
],
|
||||
'gte' => [
|
||||
'numeric' => ':attribute :value से अधिक या बराबर होनी चाहिए।',
|
||||
'file' => ':attribute से बड़ा या बराबर होना चाहिए:value किलोबाइट्स।',
|
||||
'string' => ': attribute इससे बड़ा या बराबर होना चाहिए:value वर्ण।',
|
||||
'array' => 'द :attribute में :value आइटम्स या अधिक होना चाहिए।',
|
||||
],
|
||||
'image' => ':attribute एक छवि होनी चाहिए।',
|
||||
'in' => 'चयनित :attribute अमान्य है।',
|
||||
'in_array' => "द :attribute फील्ड :other' में मौजूद नहीं है।",
|
||||
'integer' => ':attribute एक पूर्णांक होना चाहिए।',
|
||||
'ip' => ':attribute एक वैध आईपी पता होना चाहिए।',
|
||||
'ipv4' => ':attribute एक मान्य IPv4 पता होना चाहिए।',
|
||||
'ipv6' => ':attribute एक मान्य IPv6 पता होना चाहिए।',
|
||||
'json' => ':attribute एक वैध JSON स्ट्रिंग होनी चाहिए।',
|
||||
'lt' => [
|
||||
'numeric' => ':attribute :value से कम होनी चाहिए।',
|
||||
'file' => ':attribute :value किलोबाइट से कम होनी चाहिए।',
|
||||
'string' => ':attribute :value वर्णों से कम होनी चाहिए।',
|
||||
'array' => ':attribute में :value आइटम से कम होना चाहिए।',
|
||||
],
|
||||
'lte' => [
|
||||
'numeric' => ': attribute कम या बराबर होनी चाहिए: मान।',
|
||||
'file' => ': attribute कम या बराबर होनी चाहिए: मान किलोबाइट्स।',
|
||||
'string' => ': attribute कम या बराबर होनी चाहिए: मान वर्ण।',
|
||||
'array' => ': attribute में :value आइटम्स से अधिक नहीं होना चाहिए।',
|
||||
],
|
||||
'max' => [
|
||||
'numeric' => ":attribute :max' से अधिक नहीं हो सकती है।",
|
||||
'file' => ':attribute :max किलोबाइट से अधिक नहीं हो सकती है।',
|
||||
'string' => ':attribute :max वर्णों से अधिक नहीं हो सकती है।',
|
||||
'array' => ':attribute में :max आइटम्स से अधिक नहीं हो सकते हैं।',
|
||||
],
|
||||
'mimes' => ':attribute एक प्रकार की फ़ाइल होनी चाहिए::value',
|
||||
'mimetypes' => ':attribute एक प्रकार की फ़ाइल होनी चाहिए::value',
|
||||
'min' => [
|
||||
'numeric' => ':attribute कम से कम :min होनी चाहिए।',
|
||||
'file' => ':attribute कम से कम :min किलोबाइट्स होनी चाहिए।',
|
||||
'string' => ':attribute कम से कम :min कैरेक्टर का होना चाहिए।',
|
||||
'array' => ':attribute में कम से कम :min आइटम होना चाहिए।',
|
||||
],
|
||||
'not_in' => 'चयनित :attribute अमान्य है।',
|
||||
'not_regex' => ':attribute प्रारूप अमान्य है।',
|
||||
'numeric' => ':attribute एक संख्या होनी चाहिए।',
|
||||
'present' => ':attribute फ़ील्ड मौजूद होना चाहिए।',
|
||||
'regex' => ':attribute प्रारूप अमान्य है।',
|
||||
'required' => ':attribute फ़ील्ड आवश्यक है।',
|
||||
'required_if' => ':attribute फ़ील्ड आवश्यक है जब:other है: value',
|
||||
'required_unless' => ':attribute फ़ील्ड आवश्यक है जब तक कि :other :values में न हो।',
|
||||
'required_with' => ':attribute फ़ील्ड आवश्यक है जब:value मौजूद है।',
|
||||
'required_with_all' => ':attribute फ़ील्ड आवश्यक है जब:value मौजूद है।',
|
||||
'required_without' => ':attribute फ़ील्ड आवश्यक है जब:value मौजूद नहीं है।',
|
||||
'required_without_all' => ':attribute फ़ील्ड आवश्यक है जब कोई भी: value मौजूद नहीं है।',
|
||||
'same' => 'द :attribute और :other मैच होना चाहिए।',
|
||||
'size' => [
|
||||
'numeric' => ':attribute होना चाहिए:size',
|
||||
'file' => ':attribute होना चाहिए:size किलोबाइट्स।',
|
||||
'string' => ':attribute होना चाहिए:size वर्ण।',
|
||||
'array' => 'इस विशेषता में :size के आइटम शामिल होने चाहिए।',
|
||||
],
|
||||
'string' => ':attribute एक स्ट्रिंग होनी चाहिए।',
|
||||
'timezone' => ':attribute एक मान्य क्षेत्र होना चाहिए।',
|
||||
'unique' => ':attribute पहले ही ली जा चुकी है।',
|
||||
'uploaded' => ':attribute अपलोड करने में विफल रही।',
|
||||
'url' => ':attribute प्रारूप अमान्य है।',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Validation Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify custom validation messages for attributes using the
|
||||
| convention "attribute.rule" to name the lines. This makes it quick to
|
||||
| specify a specific custom language line for a given attribute rule.
|
||||
|
|
||||
*/
|
||||
|
||||
'custom' => [
|
||||
'attribute-name' => [
|
||||
'rule-name' => 'सीमा शुल्क संदेश',
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Validation Attributes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used to swap attribute place-holders
|
||||
| with something more reader friendly such as E-Mail Address instead
|
||||
| of "email". This simply helps us make messages a little cleaner.
|
||||
|
|
||||
*/
|
||||
|
||||
'attributes' => [],
|
||||
|
||||
];
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/js/admin.js": "/js/admin.js?id=7d73f64f6f160ecd8a23",
|
||||
"/css/admin.css": "/css/admin.css?id=5fc68c20019f02de7af3"
|
||||
"/js/admin.js": "/js/admin.js?id=cd52020d82033197d2a5",
|
||||
"/css/admin.css": "/css/admin.css?id=15d0ab8d01403f912469"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,8 @@ class ProductDataGrid extends DataGrid
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct() {
|
||||
public function __construct()
|
||||
{
|
||||
/* locale */
|
||||
$this->locale = core()->getRequestedLocaleCode();
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ namespace Webkul\Admin\DataGrids;
|
|||
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Webkul\Ui\DataGrid\DataGrid;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
class UserDataGrid extends DataGrid
|
||||
{
|
||||
|
|
@ -30,7 +31,7 @@ class UserDataGrid extends DataGrid
|
|||
{
|
||||
$queryBuilder = DB::table('admins as u')
|
||||
->leftJoin('roles as ro', 'u.role_id', '=', 'ro.id')
|
||||
->addSelect('u.id as user_id', 'u.name as user_name', 'u.status', 'u.email', 'ro.name as role_name');
|
||||
->addSelect('u.id as user_id', 'u.name as user_name', 'u.image as user_image', 'u.status', 'u.email', 'ro.name as role_name');
|
||||
|
||||
$this->addFilter('user_id', 'u.id');
|
||||
$this->addFilter('user_name', 'u.name');
|
||||
|
|
@ -63,6 +64,13 @@ class UserDataGrid extends DataGrid
|
|||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'filterable' => true,
|
||||
'closure' => function ($row) {
|
||||
if ($row->user_image) {
|
||||
return '<div class="avatar"><img src="' . Storage::url($row->user_image) . '"></div>' . $row->user_name;
|
||||
} else {
|
||||
return '<div class="avatar"><span class="icon profile-pic-icon"></span></div>' . $row->user_name;
|
||||
}
|
||||
},
|
||||
]);
|
||||
|
||||
$this->addColumn([
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ class AdminServiceProvider extends ServiceProvider
|
|||
*/
|
||||
protected function loadPublishers(): void
|
||||
{
|
||||
$this->publishes([__DIR__ . '/../Resources/lang' => resource_path('lang/vendor/admin')]);
|
||||
$this->publishes([__DIR__ . '/../Resources/lang' => lang_path('vendor/admin')]);
|
||||
|
||||
$this->publishes([__DIR__ . '/../../publishable/assets' => public_path('vendor/webkul/admin/assets')], 'public');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,7 +114,6 @@ body {
|
|||
height: 31px;
|
||||
width: 30px;
|
||||
background: $profile-info-icon;
|
||||
padding: 6px;
|
||||
text-align: center;
|
||||
font-size: 17px;
|
||||
font-weight: 600;
|
||||
|
|
@ -122,6 +121,17 @@ body {
|
|||
border-radius: 50%;
|
||||
margin-right: 6px;
|
||||
margin-top: 3px;
|
||||
overflow: hidden;
|
||||
|
||||
span {
|
||||
margin-top: 6px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -919,3 +929,86 @@ body {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.image-upload-brick {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
position: relative;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border-radius: 5px;
|
||||
border: dashed 1px #3a3a3a;
|
||||
overflow: hidden;
|
||||
margin-right: 15px;
|
||||
transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
|
||||
input[type="file"] {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.upload-icon {
|
||||
position: absolute;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin-left: -20px;
|
||||
margin-top: -20px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
display: block;
|
||||
background: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
.image-info-brick {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin: 10px 0px;
|
||||
|
||||
.field-info {
|
||||
width: 305px;
|
||||
display: block;
|
||||
font-style: italic;
|
||||
color: $role-text-color;
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.table {
|
||||
td {
|
||||
.avatar {
|
||||
display: inline-block;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 43px;
|
||||
background-color: $body-background;
|
||||
border: 1px solid $border-color;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
margin-right: 10px;
|
||||
overflow: hidden;
|
||||
|
||||
img {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.icon {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -251,15 +251,18 @@ return [
|
|||
],
|
||||
|
||||
'account' => [
|
||||
'title' => 'حسابي',
|
||||
'save-btn-title' => 'احفظ',
|
||||
'general' => 'عام',
|
||||
'name' => 'اسم',
|
||||
'email' => 'البريد الإلكتروني',
|
||||
'password' => 'كلمه المرور',
|
||||
'confirm-password' => 'تأكيد كلمة المرور',
|
||||
'change-password' => 'غير كلمة سر الحساب',
|
||||
'current-password' => 'كلمة المرور الحالية',
|
||||
'title' => 'حسابي',
|
||||
'save-btn-title' => 'احفظ',
|
||||
'general' => 'عام',
|
||||
'upload-image-info' => 'Upload a Profile Image (100px x 100px) in PNG or JPG Format',
|
||||
'remove-image' => 'Remove Image',
|
||||
'image-upload-message' => 'Only images (.jpeg, .jpg, .png, ..) are allowed.',
|
||||
'name' => 'اسم',
|
||||
'email' => 'البريد الإلكتروني',
|
||||
'password' => 'كلمه المرور',
|
||||
'confirm-password' => 'تأكيد كلمة المرور',
|
||||
'change-password' => 'غير كلمة سر الحساب',
|
||||
'current-password' => 'كلمة المرور الحالية',
|
||||
],
|
||||
|
||||
'users' => [
|
||||
|
|
|
|||
|
|
@ -250,15 +250,18 @@ return [
|
|||
],
|
||||
'account' =>
|
||||
[
|
||||
'title' => 'Mein Konto',
|
||||
'save-btn-title' => 'Speichern',
|
||||
'general' => 'Allgemein',
|
||||
'name' => 'Name',
|
||||
'email' => 'E-Mail',
|
||||
'password' => 'Passwort',
|
||||
'confirm-password' => 'Passwort bestätigen',
|
||||
'change-password' => 'Änderung des Account-Passworts',
|
||||
'current-password' => 'Aktuelles Passwort',
|
||||
'title' => 'Mein Konto',
|
||||
'save-btn-title' => 'Speichern',
|
||||
'general' => 'Allgemein',
|
||||
'upload-image-info' => 'Upload a Profile Image (100px x 100px) in PNG or JPG Format',
|
||||
'remove-image' => 'Remove Image',
|
||||
'image-upload-message' => 'Only images (.jpeg, .jpg, .png, ..) are allowed.',
|
||||
'name' => 'Name',
|
||||
'email' => 'E-Mail',
|
||||
'password' => 'Passwort',
|
||||
'confirm-password' => 'Passwort bestätigen',
|
||||
'change-password' => 'Änderung des Account-Passworts',
|
||||
'current-password' => 'Aktuelles Passwort',
|
||||
],
|
||||
'users' =>
|
||||
[
|
||||
|
|
|
|||
|
|
@ -260,15 +260,18 @@ return [
|
|||
],
|
||||
|
||||
'account' => [
|
||||
'title' => 'My Account',
|
||||
'save-btn-title' => 'Save',
|
||||
'general' => 'General',
|
||||
'name' => 'Name',
|
||||
'email' => 'Email',
|
||||
'password' => 'Password',
|
||||
'confirm-password' => 'Confirm Password',
|
||||
'change-password' => 'Change Account Password',
|
||||
'current-password' => 'Current Password',
|
||||
'title' => 'My Account',
|
||||
'save-btn-title' => 'Save',
|
||||
'general' => 'General',
|
||||
'upload-image-info' => 'Upload a Profile Image (100px x 100px) in PNG or JPG Format',
|
||||
'remove-image' => 'Remove Image',
|
||||
'image-upload-message' => 'Only images (.jpeg, .jpg, .png, ..) are allowed.',
|
||||
'name' => 'Name',
|
||||
'email' => 'Email',
|
||||
'password' => 'Password',
|
||||
'confirm-password' => 'Confirm Password',
|
||||
'change-password' => 'Change Account Password',
|
||||
'current-password' => 'Current Password',
|
||||
],
|
||||
|
||||
'users' => [
|
||||
|
|
|
|||
|
|
@ -260,15 +260,18 @@ return [
|
|||
],
|
||||
|
||||
'account' => [
|
||||
'title' => 'Mi cuenta',
|
||||
'save-btn-title' => 'Guardar',
|
||||
'general' => 'General',
|
||||
'name' => 'Nombre',
|
||||
'email' => 'Email',
|
||||
'password' => 'Contraseña',
|
||||
'confirm-password' => 'Confirmar contraseña',
|
||||
'change-password' => 'Cambiar contraseña de cuenta',
|
||||
'current-password' => 'Contraseña actual',
|
||||
'title' => 'Mi cuenta',
|
||||
'save-btn-title' => 'Guardar',
|
||||
'general' => 'General',
|
||||
'upload-image-info' => 'Upload a Profile Image (100px x 100px) in PNG or JPG Format',
|
||||
'remove-image' => 'Remove Image',
|
||||
'image-upload-message' => 'Only images (.jpeg, .jpg, .png, ..) are allowed.',
|
||||
'name' => 'Nombre',
|
||||
'email' => 'Email',
|
||||
'password' => 'Contraseña',
|
||||
'confirm-password' => 'Confirmar contraseña',
|
||||
'change-password' => 'Cambiar contraseña de cuenta',
|
||||
'current-password' => 'Contraseña actual',
|
||||
],
|
||||
|
||||
'users' => [
|
||||
|
|
|
|||
|
|
@ -250,15 +250,18 @@ return [
|
|||
],
|
||||
|
||||
'account' => [
|
||||
'title' => 'حساب من',
|
||||
'save-btn-title' => 'ذخیره',
|
||||
'general' => 'عمومی',
|
||||
'name' => 'نام',
|
||||
'email' => 'پست الکترونیک',
|
||||
'password' => 'رمز عبور',
|
||||
'confirm-password' => 'تاید رمز عبور',
|
||||
'change-password' => 'تغیر رمز عبور',
|
||||
'current-password' => 'گذرواژه فعلی',
|
||||
'title' => 'حساب من',
|
||||
'save-btn-title' => 'ذخیره',
|
||||
'general' => 'عمومی',
|
||||
'upload-image-info' => 'Upload a Profile Image (100px x 100px) in PNG or JPG Format',
|
||||
'remove-image' => 'Remove Image',
|
||||
'image-upload-message' => 'Only images (.jpeg, .jpg, .png, ..) are allowed.',
|
||||
'name' => 'نام',
|
||||
'email' => 'پست الکترونیک',
|
||||
'password' => 'رمز عبور',
|
||||
'confirm-password' => 'تاید رمز عبور',
|
||||
'change-password' => 'تغیر رمز عبور',
|
||||
'current-password' => 'گذرواژه فعلی',
|
||||
],
|
||||
|
||||
'users' => [
|
||||
|
|
|
|||
|
|
@ -260,15 +260,18 @@ return [
|
|||
],
|
||||
|
||||
'account' => [
|
||||
'title' => 'Mon compte',
|
||||
'save-btn-title' => 'Sauvegarder',
|
||||
'general' => 'Général',
|
||||
'name' => 'Nom',
|
||||
'email' => 'E-mail',
|
||||
'password' => 'Mot de passe',
|
||||
'confirm-password' => 'Confirmez le mot de passe',
|
||||
'change-password' => 'Changer le mot de passe du compte',
|
||||
'current-password' => 'Mot de passe actuel',
|
||||
'title' => 'Mon compte',
|
||||
'save-btn-title' => 'Sauvegarder',
|
||||
'general' => 'Général',
|
||||
'upload-image-info' => 'Upload a Profile Image (100px x 100px) in PNG or JPG Format',
|
||||
'remove-image' => 'Remove Image',
|
||||
'image-upload-message' => 'Only images (.jpeg, .jpg, .png, ..) are allowed.',
|
||||
'name' => 'Nom',
|
||||
'email' => 'E-mail',
|
||||
'password' => 'Mot de passe',
|
||||
'confirm-password' => 'Confirmez le mot de passe',
|
||||
'change-password' => 'Changer le mot de passe du compte',
|
||||
'current-password' => 'Mot de passe actuel',
|
||||
],
|
||||
|
||||
'users' => [
|
||||
|
|
|
|||
|
|
@ -260,15 +260,18 @@ return [
|
|||
],
|
||||
|
||||
'account' => [
|
||||
'title' => 'मेरा खाता',
|
||||
'save-btn-title' => 'सहेजें',
|
||||
'general' => 'आम',
|
||||
'name' => 'नाम',
|
||||
'email' => 'ईमेल',
|
||||
'password' => 'कुंजिका',
|
||||
'confirm-password' => 'पासवर्ड की पुष्टि कीजिये',
|
||||
'change-password' => 'खाते का पासवर्ड बदलें',
|
||||
'current-password' => 'वर्तमान पासवर्ड',
|
||||
'title' => 'मेरा खाता',
|
||||
'save-btn-title' => 'सहेजें',
|
||||
'general' => 'आम',
|
||||
'upload-image-info' => 'Upload a Profile Image (100px x 100px) in PNG or JPG Format',
|
||||
'remove-image' => 'Remove Image',
|
||||
'image-upload-message' => 'Only images (.jpeg, .jpg, .png, ..) are allowed.',
|
||||
'name' => 'नाम',
|
||||
'email' => 'ईमेल',
|
||||
'password' => 'कुंजिका',
|
||||
'confirm-password' => 'पासवर्ड की पुष्टि कीजिये',
|
||||
'change-password' => 'खाते का पासवर्ड बदलें',
|
||||
'current-password' => 'वर्तमान पासवर्ड',
|
||||
],
|
||||
|
||||
'users' => [
|
||||
|
|
|
|||
|
|
@ -248,15 +248,18 @@ return [
|
|||
],
|
||||
|
||||
'account' => [
|
||||
'title' => 'Il Mio Account',
|
||||
'save-btn-title' => 'Salva',
|
||||
'general' => 'Generale',
|
||||
'name' => 'Nome',
|
||||
'email' => 'Email',
|
||||
'password' => 'Password',
|
||||
'confirm-password' => 'Conferma Password',
|
||||
'change-password' => 'Modifica Password',
|
||||
'current-password' => 'Attuale Password',
|
||||
'title' => 'Il Mio Account',
|
||||
'save-btn-title' => 'Salva',
|
||||
'general' => 'Generale',
|
||||
'upload-image-info' => 'Upload a Profile Image (100px x 100px) in PNG or JPG Format',
|
||||
'remove-image' => 'Remove Image',
|
||||
'image-upload-message' => 'Only images (.jpeg, .jpg, .png, ..) are allowed.',
|
||||
'name' => 'Nome',
|
||||
'email' => 'Email',
|
||||
'password' => 'Password',
|
||||
'confirm-password' => 'Conferma Password',
|
||||
'change-password' => 'Modifica Password',
|
||||
'current-password' => 'Attuale Password',
|
||||
],
|
||||
|
||||
'users' => [
|
||||
|
|
|
|||
|
|
@ -248,15 +248,18 @@ return [
|
|||
],
|
||||
|
||||
'account' => [
|
||||
'title' => 'Mijn Profiel',
|
||||
'save-btn-title' => 'Opslaan',
|
||||
'general' => 'Algemeen',
|
||||
'name' => 'Naam',
|
||||
'email' => 'Email',
|
||||
'password' => 'Wachtwoord',
|
||||
'confirm-password' => 'Wachtwoord bevestigen',
|
||||
'change-password' => 'Wachtwoord wijzigen',
|
||||
'current-password' => 'Huidig wachtwoord',
|
||||
'title' => 'Mijn Profiel',
|
||||
'save-btn-title' => 'Opslaan',
|
||||
'general' => 'Algemeen',
|
||||
'upload-image-info' => 'Upload a Profile Image (100px x 100px) in PNG or JPG Format',
|
||||
'remove-image' => 'Remove Image',
|
||||
'image-upload-message' => 'Only images (.jpeg, .jpg, .png, ..) are allowed.',
|
||||
'name' => 'Naam',
|
||||
'email' => 'Email',
|
||||
'password' => 'Wachtwoord',
|
||||
'confirm-password' => 'Wachtwoord bevestigen',
|
||||
'change-password' => 'Wachtwoord wijzigen',
|
||||
'current-password' => 'Huidig wachtwoord',
|
||||
],
|
||||
|
||||
'users' => [
|
||||
|
|
|
|||
|
|
@ -246,15 +246,18 @@ return [
|
|||
],
|
||||
|
||||
'account' => [
|
||||
'title' => 'Moje konto',
|
||||
'save-btn-title' => 'Zapisz',
|
||||
'general' => 'Ogólny',
|
||||
'name' => 'Nazwa',
|
||||
'email' => 'Email',
|
||||
'password' => 'Hasło',
|
||||
'confirm-password' => 'Potwierdź hasło',
|
||||
'change-password' => 'Zmień hasło do konta',
|
||||
'current-password' => 'Bieżące hasło',
|
||||
'title' => 'Moje konto',
|
||||
'save-btn-title' => 'Zapisz',
|
||||
'general' => 'Ogólny',
|
||||
'upload-image-info' => 'Upload a Profile Image (100px x 100px) in PNG or JPG Format',
|
||||
'remove-image' => 'Remove Image',
|
||||
'image-upload-message' => 'Only images (.jpeg, .jpg, .png, ..) are allowed.',
|
||||
'name' => 'Nazwa',
|
||||
'email' => 'Email',
|
||||
'password' => 'Hasło',
|
||||
'confirm-password' => 'Potwierdź hasło',
|
||||
'change-password' => 'Zmień hasło do konta',
|
||||
'current-password' => 'Bieżące hasło',
|
||||
],
|
||||
|
||||
'users' => [
|
||||
|
|
|
|||
|
|
@ -247,15 +247,18 @@ return [
|
|||
],
|
||||
|
||||
'account' => [
|
||||
'title' => 'Minha Conta',
|
||||
'save-btn-title' => 'Salvar',
|
||||
'general' => 'Geral',
|
||||
'name' => 'Nome',
|
||||
'email' => 'Email',
|
||||
'password' => 'Senha',
|
||||
'confirm-password' => 'Confirmar Senha',
|
||||
'change-password' => 'Mudar Senha da Conta',
|
||||
'current-password' => 'Senha Atual',
|
||||
'title' => 'Minha Conta',
|
||||
'save-btn-title' => 'Salvar',
|
||||
'general' => 'Geral',
|
||||
'upload-image-info' => 'Upload a Profile Image (100px x 100px) in PNG or JPG Format',
|
||||
'remove-image' => 'Remove Image',
|
||||
'image-upload-message' => 'Only images (.jpeg, .jpg, .png, ..) are allowed.',
|
||||
'name' => 'Nome',
|
||||
'email' => 'Email',
|
||||
'password' => 'Senha',
|
||||
'confirm-password' => 'Confirmar Senha',
|
||||
'change-password' => 'Mudar Senha da Conta',
|
||||
'current-password' => 'Senha Atual',
|
||||
],
|
||||
|
||||
'users' => [
|
||||
|
|
|
|||
|
|
@ -247,15 +247,18 @@ return [
|
|||
],
|
||||
|
||||
'account' => [
|
||||
'title' => 'Hesabım',
|
||||
'save-btn-title' => 'Kaydet',
|
||||
'general' => 'Genel',
|
||||
'name' => 'Adı',
|
||||
'email' => 'E-Mail',
|
||||
'password' => 'Parola',
|
||||
'confirm-password' => 'Parolayı Doğrula',
|
||||
'change-password' => 'Parla Değiştir',
|
||||
'current-password' => 'Mevcut Parola',
|
||||
'title' => 'Hesabım',
|
||||
'save-btn-title' => 'Kaydet',
|
||||
'general' => 'Genel',
|
||||
'upload-image-info' => 'Upload a Profile Image (100px x 100px) in PNG or JPG Format',
|
||||
'remove-image' => 'Remove Image',
|
||||
'image-upload-message' => 'Only images (.jpeg, .jpg, .png, ..) are allowed.',
|
||||
'name' => 'Adı',
|
||||
'email' => 'E-Mail',
|
||||
'password' => 'Parola',
|
||||
'confirm-password' => 'Parolayı Doğrula',
|
||||
'change-password' => 'Parla Değiştir',
|
||||
'current-password' => 'Mevcut Parola',
|
||||
],
|
||||
|
||||
'users' => [
|
||||
|
|
|
|||
|
|
@ -258,15 +258,18 @@ return [
|
|||
],
|
||||
|
||||
'account' => [
|
||||
'title' => '我的帐户',
|
||||
'save-btn-title' => '保存',
|
||||
'general' => '一般的',
|
||||
'name' => '名称',
|
||||
'email' => '电子邮件',
|
||||
'password' => '密码',
|
||||
'confirm-password' => '确认密码',
|
||||
'change-password' => '修改密码',
|
||||
'current-password' => '当前密码'
|
||||
'title' => '我的帐户',
|
||||
'save-btn-title' => '保存',
|
||||
'general' => '一般的',
|
||||
'upload-image-info' => 'Upload a Profile Image (100px x 100px) in PNG or JPG Format',
|
||||
'remove-image' => 'Remove Image',
|
||||
'image-upload-message' => 'Only images (.jpeg, .jpg, .png, ..) are allowed.',
|
||||
'name' => '名称',
|
||||
'email' => '电子邮件',
|
||||
'password' => '密码',
|
||||
'confirm-password' => '确认密码',
|
||||
'change-password' => '修改密码',
|
||||
'current-password' => '当前密码'
|
||||
],
|
||||
|
||||
'users' => [
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
@section('content-wrapper')
|
||||
<div class="content full-page">
|
||||
<form method="POST" action="" @submit.prevent="onSubmit">
|
||||
<form method="POST" action="" enctype="multipart/form-data" @submit.prevent="onSubmit">
|
||||
<div class="page-header">
|
||||
<div class="page-title">
|
||||
<h1>
|
||||
|
|
@ -30,6 +30,8 @@
|
|||
|
||||
<accordian :title="'{{ __('admin::app.account.general') }}'" :active="true">
|
||||
<div slot="body">
|
||||
<upload-profile-image></upload-profile-image>
|
||||
|
||||
<div class="control-group" :class="[errors.has('name') ? 'has-error' : '']">
|
||||
<label for="name" class="required">{{ __('admin::app.account.name') }}</label>
|
||||
<input type="text" v-validate="'required'" class="control" id="name" name="name" value="{{ old('name') ?: $user->name }}" data-vv-as=""{{ __('admin::app.account.name') }}""/>
|
||||
|
|
@ -73,4 +75,77 @@
|
|||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@stop
|
||||
@stop
|
||||
|
||||
@push('scripts')
|
||||
<script type="text/x-template" id="upload-profile-image-template">
|
||||
<div class="form-group" style="margin-bottom: 40px;">
|
||||
<div class="image-upload-brick">
|
||||
<input
|
||||
type="file"
|
||||
name="image"
|
||||
id="upload-profile"
|
||||
ref="imageInput"
|
||||
@change="addImageView($event)"
|
||||
>
|
||||
|
||||
<i class="icon upload-icon"></i>
|
||||
|
||||
<img class="preview" :src="imageData" v-if="imageData.length > 0">
|
||||
</div>
|
||||
|
||||
<div class="image-info-brick">
|
||||
<span class="field-info">
|
||||
{{ __('admin::app.account.upload-image-info') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@if ($user->image_url)
|
||||
<div style="margin-top: 10px;">
|
||||
<input
|
||||
type="checkbox"
|
||||
name="remove_image"
|
||||
/>
|
||||
|
||||
<label for="remove" class="">
|
||||
{{ __('admin::app.account.remove-image') }}
|
||||
</label>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
Vue.component('upload-profile-image', {
|
||||
template: '#upload-profile-image-template',
|
||||
|
||||
data: function() {
|
||||
return {
|
||||
imageData: "{{ $user->image_url }}",
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
addImageView () {
|
||||
var imageInput = this.$refs.imageInput;
|
||||
|
||||
if (imageInput.files && imageInput.files[0]) {
|
||||
if (imageInput.files[0].type.includes('image/')) {
|
||||
var reader = new FileReader();
|
||||
|
||||
reader.onload = (e) => {
|
||||
this.imageData = e.target.result;
|
||||
}
|
||||
|
||||
reader.readAsDataURL(imageInput.files[0]);
|
||||
} else {
|
||||
imageInput.value = '';
|
||||
|
||||
alert('{{ __('admin::app.account.image_upload_message') }}');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@
|
|||
|
||||
<div class="control-group">
|
||||
<label for="is_filterable">{{ __('admin::app.catalog.attributes.is_filterable') }}</label>
|
||||
<select class="control" id="is_filterable" name="is_filterable">
|
||||
<select class="control" id="is_filterable" name="is_filterable" disabled="disabled">
|
||||
<option value="0">{{ __('admin::app.catalog.attributes.no') }}</option>
|
||||
<option value="1">{{ __('admin::app.catalog.attributes.yes') }}</option>
|
||||
</select>
|
||||
|
|
@ -352,15 +352,23 @@
|
|||
$(document).ready(function () {
|
||||
$('#type').on('change', function (e) {
|
||||
if (['select', 'multiselect', 'checkbox'].indexOf($(e.target).val()) === -1) {
|
||||
$('#options').parent().addClass('hide')
|
||||
$('#options').parent().addClass('hide');
|
||||
} else {
|
||||
$('#options').parent().removeClass('hide')
|
||||
$('#options').parent().removeClass('hide');
|
||||
}
|
||||
|
||||
if (['select', 'multiselect', 'checkbox', 'checkbox', 'price'].indexOf($(e.target).val()) === -1) {
|
||||
$('#options').parent().addClass('hide');
|
||||
$('#is_filterable').attr('disabled', 'disabled');
|
||||
} else {
|
||||
$('#options').parent().removeClass('hide');
|
||||
$('#is_filterable').removeAttr('disabled');
|
||||
}
|
||||
|
||||
if (['textarea'].indexOf($(e.target).val()) > -1) {
|
||||
$('#enable_wysiwyg').parents('.control-group').removeClass('hide')
|
||||
$('#enable_wysiwyg').parents('.control-group').removeClass('hide');
|
||||
} else {
|
||||
$('#enable_wysiwyg').parents('.control-group').addClass('hide')
|
||||
$('#enable_wysiwyg').parents('.control-group').addClass('hide');
|
||||
}
|
||||
})
|
||||
});
|
||||
|
|
|
|||
|
|
@ -106,15 +106,6 @@
|
|||
<th class="sku">{{ __('admin::app.catalog.products.sku') }}</th>
|
||||
<th>{{ __('admin::app.catalog.products.name') }}</th>
|
||||
<th>{{ __('admin::app.catalog.products.images') }}</th>
|
||||
|
||||
@foreach ($product->super_attributes as $attribute)
|
||||
<th
|
||||
class="{{ $attribute->code }}"
|
||||
style="width: 150px">
|
||||
{{ $attribute->admin_name }}
|
||||
</th>
|
||||
@endforeach
|
||||
|
||||
<th class="qty">{{ __('admin::app.catalog.products.qty') }}</th>
|
||||
<th class="price">{{ __('admin::app.catalog.products.price') }}</th>
|
||||
<th class="weight">{{ __('admin::app.catalog.products.weight') }}</th>
|
||||
|
|
@ -188,6 +179,18 @@
|
|||
v-if="errors.has(variantInputName + '[name]')">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="item-options" style="margin-top: 10px">
|
||||
<div v-for='(attribute, index) in superAttributes'>
|
||||
<b>@{{ attribute.admin_name }} : </b>@{{ optionName(variant[attribute.code]) }}
|
||||
|
||||
<input
|
||||
type="hidden"
|
||||
:name="[variantInputName + '[' + attribute.code + ']']"
|
||||
:value="variant[attribute.code]"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
|
|
@ -224,21 +227,6 @@
|
|||
</div>
|
||||
</td>
|
||||
|
||||
<td v-for='(attribute, index) in superAttributes'>
|
||||
<div class="control-group">
|
||||
<input
|
||||
type="hidden"
|
||||
:name="[variantInputName + '[' + attribute.code + ']']"
|
||||
:value="variant[attribute.code]"/>
|
||||
|
||||
<input
|
||||
type="text"
|
||||
class="control"
|
||||
:value="optionName(variant[attribute.code])"
|
||||
readonly/>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<button style="width: 100%;" type="button" class="dropdown-btn dropdown-toggle">
|
||||
@{{ totalQty }}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
'completed'=> trans('admin::app.notification.order-status-messages.completed'),
|
||||
'processing' => trans('admin::app.notification.order-status-messages.processing')
|
||||
];
|
||||
|
||||
$allLocales = core()->getAllLocales()->pluck('name', 'code');
|
||||
|
||||
$currentLocaleCode = core()->getRequestedLocaleCode('admin_locale');
|
||||
|
|
@ -92,9 +91,17 @@
|
|||
<div class="dropdown-toggle">
|
||||
<div style="display: inline-block; vertical-align: middle;">
|
||||
<div class="profile-info-div">
|
||||
<div class="profile-info-icon">
|
||||
<span>{{ substr(auth()->guard('admin')->user()->name, 0, 1) }}</span>
|
||||
</div>
|
||||
@if (auth()->guard('admin')->user()->image)
|
||||
<div class="profile-info-icon">
|
||||
<img src="{{ auth()->guard('admin')->user()->image_url }}"/>
|
||||
</div>
|
||||
@else
|
||||
<div class="profile-info-icon">
|
||||
<span>{{ substr(auth()->guard('admin')->user()->name, 0, 1) }}</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
<div class="profile-info-desc">
|
||||
<span class="name">
|
||||
{{ auth()->guard('admin')->user()->name }}
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@
|
|||
</accordian>
|
||||
|
||||
{{-- home page seo --}}
|
||||
<accordian :title="'{{ __('admin::app.settings.channels.seo') }}'" :active="true">
|
||||
<accordian title="{{ __('admin::app.settings.channels.seo') }}" :active="true">
|
||||
<div slot="body">
|
||||
<div class="control-group" :class="[errors.has('seo_title') ? 'has-error' : '']">
|
||||
<label for="seo_title" class="required">{{ __('admin::app.settings.channels.seo-title') }}</label>
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@
|
|||
@endphp
|
||||
|
||||
{{-- home page seo --}}
|
||||
<accordian :title="'{{ __('admin::app.settings.channels.seo') }}'" :active="true">
|
||||
<accordian title="{{ __('admin::app.settings.channels.seo') }}" :active="true">
|
||||
<div slot="body">
|
||||
<div class="control-group" :class="[errors.has('{{$locale}}[seo_title]') ? 'has-error' : '']">
|
||||
<label for="seo_title" class="required">
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ class AttributeController extends Controller
|
|||
public function store()
|
||||
{
|
||||
$this->validate(request(), [
|
||||
'code' => ['required', 'unique:attributes,code', new \Webkul\Core\Contracts\Validations\Code],
|
||||
'code' => ['required', 'not_in:type,attribute_family_id', 'unique:attributes,code', new \Webkul\Core\Contracts\Validations\Code],
|
||||
'admin_name' => 'required',
|
||||
'type' => 'required',
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -296,7 +296,7 @@ class Core
|
|||
return $locales;
|
||||
}
|
||||
|
||||
return $locales = $this->localeRepository->all();
|
||||
return $locales = $this->localeRepository->orderBy('name')->all();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -316,7 +316,7 @@ class Core
|
|||
|
||||
return $data = [
|
||||
'channel' => $channel,
|
||||
'locales' => $channel->locales,
|
||||
'locales' => $channel->locales()->orderBy('name')->get()
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -177,6 +177,6 @@ class ProductImage extends AbstractProduct
|
|||
*/
|
||||
private function isDriverLocal(): bool
|
||||
{
|
||||
return Storage::getAdapter() instanceof \League\Flysystem\Adapter\Local;
|
||||
return Storage::getAdapter() instanceof \League\Flysystem\Local\LocalFilesystemAdapter;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
"vue-template-compiler": "^2.6.11"
|
||||
},
|
||||
"dependencies": {
|
||||
"@inotom/vue-go-top": "^1.3.0",
|
||||
"accounting": "^0.4.1",
|
||||
"ez-plus": "^1.2.1",
|
||||
"lazysizes": "^5.2.2",
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -40,6 +40,25 @@
|
|||
* Date: 2021-03-02T17:08Z
|
||||
*/
|
||||
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||||
this file except in compliance with the License. You may obtain a copy of the
|
||||
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
||||
|
||||
See the Apache Version 2.0 License for specific language governing permissions
|
||||
and limitations under the License.
|
||||
***************************************************************************** */
|
||||
|
||||
/*! @inotom/vue-go-top v1.3.0 inotom (http://www.serendip.ws/) | MIT */
|
||||
|
||||
/*! @preserve sweet-scroll v4.0.0 - tsuyoshiwada | MIT License */
|
||||
|
||||
/**
|
||||
* vue-class-component v7.0.1
|
||||
* (c) 2015-present Evan You
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/js/shop.js": "/js/shop.js?id=f4cfa6bfa7a408f0ce86",
|
||||
"/js/shop.js": "/js/shop.js?id=2540ab945983d7183d89",
|
||||
"/css/shop.css": "/css/shop.css?id=0198b96b5e7871291a68"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ class ShopServiceProvider extends ServiceProvider
|
|||
$this->publishes([
|
||||
__DIR__ . '/../../publishable/assets' => public_path('themes/default/assets'),
|
||||
__DIR__ . '/../Resources/views' => resource_path('themes/default/views'),
|
||||
__DIR__ . '/../Resources/lang' => resource_path('lang/vendor/shop'),
|
||||
__DIR__ . '/../Resources/lang' => lang_path('vendor/shop'),
|
||||
]);
|
||||
|
||||
/* loaders */
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import axios from 'axios';
|
|||
import VueSlider from 'vue-slider-component';
|
||||
import accounting from 'accounting';
|
||||
import ImageSlider from './components/image-slider';
|
||||
import GoTop from '@inotom/vue-go-top';
|
||||
import 'lazysizes';
|
||||
|
||||
window.jQuery = window.$ = $;
|
||||
|
|
@ -41,6 +42,7 @@ Vue.component('image-slider', ImageSlider);
|
|||
Vue.component('vue-slider', VueSlider);
|
||||
Vue.component('proceed-to-checkout', require('./components/checkout/proceed-to-checkout').default);
|
||||
Vue.component('wishlist-component-with-badge', require('./components/header-compare-with-badge').default);
|
||||
Vue.component('go-top', require('@inotom/vue-go-top').default);
|
||||
|
||||
Vue.filter('currency', function (value, argument) {
|
||||
return accounting.formatMoney(value, argument);
|
||||
|
|
|
|||
|
|
@ -88,6 +88,8 @@
|
|||
@endif
|
||||
|
||||
<overlay-loader :is-open="show_loader"></overlay-loader>
|
||||
|
||||
<go-top bg-color="#0041ff"></go-top>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M4 19h16v-7h2v8a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-8h2v7zM14 9v6h-4V9H5l7-7 7 7h-5z" fill="#8184AB"/></svg>
|
||||
|
After Width: | Height: | Size: 232 B |
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/js/ui.js": "/js/ui.js?id=b3cbdf5567c0a5800de1",
|
||||
"/css/ui.css": "/css/ui.css?id=bd09631c82c50b02445f"
|
||||
"/js/ui.js": "/js/ui.js?id=a45138406e848b98ad5d",
|
||||
"/css/ui.css": "/css/ui.css?id=8d793a6d94eb4db0298b"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ abstract class DataGrid
|
|||
$this->checkPermissions($action, $specialPermission, function ($action, $eventName) {
|
||||
$this->fireEvent('action.before.' . $eventName);
|
||||
|
||||
$action['key'] = Str::slug($action['title'], '_');
|
||||
$action['key'] = Str::slug($action['title'], '_', app()->getLocale());
|
||||
|
||||
$this->actions[] = $action;
|
||||
$this->enableAction = true;
|
||||
|
|
|
|||
|
|
@ -275,6 +275,7 @@ trait ProvideCollection
|
|||
|
||||
if ($toDisplay) {
|
||||
$urlKey = $this->generateKeyFromActionTitle($action['title'], '_url');
|
||||
|
||||
$record->$urlKey = route($action['route'], $record->{$action['index'] ?? $this->index});
|
||||
}
|
||||
}
|
||||
|
|
@ -306,7 +307,7 @@ trait ProvideCollection
|
|||
*/
|
||||
private function generateKeyFromActionTitle($title, $suffix)
|
||||
{
|
||||
$validatedStrings = Str::slug($title, '_');
|
||||
$validatedStrings = Str::slug($title, '_', app()->getLocale());
|
||||
|
||||
return strtolower($validatedStrings) . $suffix;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ trait ProvideDataGridPlus
|
|||
|
||||
/* handling cases for new locale if not present in current channel */
|
||||
if ($channel !== 'all') {
|
||||
$channelLocales = app('Webkul\Core\Repositories\ChannelRepository')->findOneByField('code', $channel)->locales;
|
||||
$channelLocales = app('Webkul\Core\Repositories\ChannelRepository')->findOneByField('code', $channel)->locales()->orderBy('name')->get();
|
||||
|
||||
if ($channelLocales->contains('code', $locale)) {
|
||||
$locales = $channelLocales;
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M4 19h16v-7h2v8a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-8h2v7zM14 9v6h-4V9H5l7-7 7 7h-5z" fill="#8184AB"/></svg>
|
||||
|
After Width: | Height: | Size: 232 B |
|
|
@ -251,7 +251,7 @@ h5 {
|
|||
&[disabled='disabled']:hover,
|
||||
&[disabled='disabled']:active {
|
||||
cursor: not-allowed;
|
||||
background: #b1b1ae;
|
||||
background: #b1b1ae !important;
|
||||
box-shadow: none;
|
||||
opacity: 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -453,3 +453,9 @@
|
|||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.upload-icon {
|
||||
background-image: url("../images/upload-icon.svg");
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddImageColumnInAdminsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('admins', function (Blueprint $table) {
|
||||
$table->string('image')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('admins', function (Blueprint $table) {
|
||||
$table->dropColumn('image');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -68,6 +68,14 @@ class AccountController extends Controller
|
|||
$data['password'] = bcrypt($data['password']);
|
||||
}
|
||||
|
||||
if (request()->hasFile('image')) {
|
||||
$data['image'] = request()->file('image')->store('admins/' . $user->id);
|
||||
}
|
||||
|
||||
if (isset($data['remove_image']) && $data['remove_image'] !== '') {
|
||||
$data['image'] = null;
|
||||
}
|
||||
|
||||
$user->update($data);
|
||||
|
||||
if ($isPasswordChanged) {
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Laravel\Sanctum\HasApiTokens;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use PHPOpenSourceSaver\JWTAuth\Contracts\JWTSubject;
|
||||
use Webkul\User\Contracts\Admin as AdminContract;
|
||||
use Webkul\User\Database\Factories\AdminFactory;
|
||||
|
|
@ -25,6 +26,7 @@ class Admin extends Authenticatable implements AdminContract, JWTSubject
|
|||
'name',
|
||||
'email',
|
||||
'password',
|
||||
'image',
|
||||
'api_token',
|
||||
'role_id',
|
||||
'status',
|
||||
|
|
@ -41,6 +43,38 @@ class Admin extends Authenticatable implements AdminContract, JWTSubject
|
|||
'remember_token',
|
||||
];
|
||||
|
||||
/**
|
||||
* Get image url for the product image.
|
||||
*/
|
||||
public function image_url()
|
||||
{
|
||||
if (! $this->image) {
|
||||
return;
|
||||
}
|
||||
|
||||
return Storage::url($this->image);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get image url for the product image.
|
||||
*/
|
||||
public function getImageUrlAttribute()
|
||||
{
|
||||
return $this->image_url();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function toArray()
|
||||
{
|
||||
$array = parent::toArray();
|
||||
|
||||
$array['image_url'] = $this->image_url;
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the role that owns the admin.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
"vue-template-compiler": "^2.6.14"
|
||||
},
|
||||
"dependencies": {
|
||||
"@inotom/vue-go-top": "^1.3.0",
|
||||
"accounting": "^0.4.1",
|
||||
"bootstrap-sass": "^3.4.1",
|
||||
"font-awesome": "^4.7.0",
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -52,6 +52,25 @@
|
|||
* https://github.com/ssense/vue-carousel#readme
|
||||
*/
|
||||
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||||
this file except in compliance with the License. You may obtain a copy of the
|
||||
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
||||
|
||||
See the Apache Version 2.0 License for specific language governing permissions
|
||||
and limitations under the License.
|
||||
***************************************************************************** */
|
||||
|
||||
/*! @inotom/vue-go-top v1.3.0 inotom (http://www.serendip.ws/) | MIT */
|
||||
|
||||
/*! @preserve sweet-scroll v4.0.0 - tsuyoshiwada | MIT License */
|
||||
|
||||
/**
|
||||
* vee-validate v2.2.15
|
||||
* (c) 2019 Abdelrahman Awad
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue