Compare commits

..

121 Commits
mater ... dev

Author SHA1 Message Date
saeid a8366d0944 test
1 year ago
saeid 4356871ac4 fix
2 years ago
saeid 4497bed50f Merge branch 'dev' of https://git.willaspace.com/WillaEngine-Project/WillaEngine into dev
2 years ago
saeid d7c4071344 add audit
2 years ago
saeid bf3cf09e68 fix
2 years ago
saeid 5c4ba969eb fix"
2 years ago
saeid e0aceea1f7 Merge branch 'master' of https://git.willaspace.com/WillaEngine-Project/WillaEngine
2 years ago
saeid 02dbfff4d6 fix
2 years ago
saeid 07396ee656 fix
2 years ago
farid d2e5ec8544 feat: update composer repository
2 years ago
saeid c3b29b16af fix
2 years ago
saeid ef31b2e296 add minify to composer
2 years ago
saeid_01 b1b8d3fb8c Update '.drone.yml'
2 years ago
saeid_01 efc348589e Update '.drone.yml'
2 years ago
Alireza Azizi d3a1f20001 fix
2 years ago
Alireza Azizi fa1350b252 fix
2 years ago
saeid 7f758bdefc fix
2 years ago
saeid 0bcbc89510 fix
2 years ago
Alireza Azizi e7a2633523 fix
2 years ago
Alireza Azizi 35bf5d4db6 fix
2 years ago
Alireza Azizi dea3de3b0c fix
2 years ago
Alireza Azizi 0e3119be6f fix
2 years ago
Alireza Azizi d156c44f81 fix
2 years ago
Alireza Azizi 5160316ad8 fix
2 years ago
Alireza Azizi 3fbbff05ec Merge branch 'master' of git.willaspace.com:WillaEngine-Project/WillaEngine
2 years ago
Alireza Azizi d7f86993dc fix
2 years ago
saeid b2ff2ce4ce fix
2 years ago
Alireza Azizi b8a3cf99aa fix update drone file
2 years ago
Alireza Azizi 1329c62200 fix
2 years ago
saeid 8d640032e5 fix
2 years ago
Alireza Azizi 2b14878998 fix
2 years ago
Alireza Azizi 6001a9abd8 fix
2 years ago
Alireza Azizi d4fcb7e2bc fix
2 years ago
Alireza Azizi 32e33e12e5 fix conflict
2 years ago
azizi ecaeb95de5 Update 'composer-prod.json'
2 years ago
saeid_01 ebb96fc3f5 Merge pull request 'Fixed validation message' (#152) from BE.test into dev
2 years ago
Mohammadreza Malekli 6e9803f6ba Fixed validation message
2 years ago
azizi 5a1121f889 feature: add worker create store product
2 years ago
Alireza Azizi 273eaaaf56 fix solve conflict
2 years ago
Alireza Azizi d20c599cde fix
2 years ago
azizi b79c13b3cf Update 'Jenkinsfile'
2 years ago
saeid 9a9dc60b7b fix seeder
2 years ago
saeid_01 633aff51c6 Merge pull request 'dev' (#151) from dev into master
2 years ago
saeid efc6264fdd feat add sentry
2 years ago
azizi 209fab69b6 Update '.drone.yml'
2 years ago
azizi 369712fe7e Update '.drone.yml'
2 years ago
saeid 23ef28994c fix: add global seeder
2 years ago
azizi 98cb49ea6b Update '.drone.yml'
2 years ago
Alireza Azizi be134af558 fix
2 years ago
Alireza Azizi ede5bcca7c fix
2 years ago
Alireza Azizi c75e76f2ca fix
2 years ago
Alireza Azizi 38e5e973bc fix
2 years ago
Alireza Azizi 916084dc45 fix
2 years ago
Alireza Azizi 37fb23da5c fix
2 years ago
Alireza Azizi bf445e9952 fix
2 years ago
Alireza Azizi 32510c74a7 fix
2 years ago
Alireza Azizi 37523f7f73 fix conflic and edit drone file
2 years ago
Alireza Azizi 1db81550e1 fix .drone
2 years ago
azizi 073419ed8b Update '.drone.yml'
2 years ago
Alireza Azizi 35fbcc4883 fix
2 years ago
Alireza Azizi 9b9bc446c7 fix
2 years ago
saeid_01 792aa30097 Update 'composer-staging.json'
2 years ago
azizi 7ce782b280 Update '.drone.yml'
2 years ago
azizi 0d02c71efa Update '.drone.yml'
2 years ago
azizi 8415d3905a Update '.drone.yml'
2 years ago
azizi 4eb072b653 Update '.drone.yml'
2 years ago
azizi 1439386522 Update '.drone.yml'
2 years ago
azizi a422e9971b Update '.drone.yml'
2 years ago
azizi 9c19dd844a Update '.drone.yml'
2 years ago
saeid_01 a0570fa149 Update '.drone.yml'
2 years ago
aliqasemi 262a0b79d4 Merge pull request 'BE.drone' (#150) from BE.drone into master
2 years ago
Ali Qasemi c9de905bc2 Merge remote-tracking branch 'origin/master' into BE.drone
2 years ago
Ali Qasemi 48afbc1b0a delete worker conf
2 years ago
Ali Qasemi 1acc9d3caf add drone
2 years ago
Alireza 76309a02d8 add supervisor worker
2 years ago
saeid c9b66064b7 fix
2 years ago
saeid e663bf9126 feat: add custom page for error 404
2 years ago
saeid eb793458e6 fix
2 years ago
farid 307e2eaf6f feat: add worker file
3 years ago
farid 5254a98f0b fix: remove cron command from drone file
3 years ago
farid 951d2f90be feat: merge dev into master
3 years ago
farid 1f4a2c5061 Merge branch 'dev'
3 years ago
farid a03cc9bdfd fix: conflict in gitignore file
3 years ago
farid e502435524 feat: update Dockerfile structure and minor change in drone file
3 years ago
Alireza Azizi a081af688b Merge branch 'dev' of https://git.willaspace.com/WillaEngine-Project/WillaEngine into dev
3 years ago
Alireza Azizi 136cb025f1 add custom http test request
3 years ago
saeid 7b706e7bb5 fix
3 years ago
saeid 201f991dc6 Merge branch 'dev' of https://git.willaspace.com/WillaEngine-Project/WillaEngine into dev
3 years ago
saeid d301781312 fix:
3 years ago
f.saravi 0583d4c8af Update 'Dockerfile.nginx'
3 years ago
f.saravi 8f11c7587c Update 'Dockerfile.nginx'
3 years ago
f.saravi 790de962f4 Update '.drone.yml'
3 years ago
f.saravi 41e33e9a46 Update 'Dockerfile.staging'
3 years ago
f.saravi 1c57845c16 Update '.drone.yml'
3 years ago
f.saravi cb83460edd Update '.drone.yml'
3 years ago
f.saravi aebb816db5 Update '.drone.yml'
3 years ago
saeid_01 3007508443 Update 'Dockerfile.staging'
3 years ago
Saeid b72ea3d3cf Merge branch 'dev'
3 years ago
Saeid 653b1f54b5 fix
3 years ago
Saeid 82619d5d4c fix
3 years ago
Alireza Azizi cbe5c3dd0c drone
3 years ago
Alireza Azizi 645852a6d6 drone
3 years ago
Alireza Azizi 5c6c919ba8 fix
3 years ago
Alireza Azizi 2b318b4ef7 fix
3 years ago
saeid d1fb36949b fix
3 years ago
azizi 6bac03e6fc Merge pull request 'Update '.editorconfig'' (#143) from dev into master
3 years ago
saeid_01 20b34ba512 Merge pull request 'feat: add translate' (#142) from dev into master
3 years ago
azizi 67d7717653 Update 'Jenkinsfile'
3 years ago
saeid_01 348a71eb13 Merge pull request 'dev' (#139) from dev into master
3 years ago
azizi c5645d65a8 Merge pull request 'Update '.gitignore'' (#138) from dev into master
3 years ago
azizi 326a539988 Merge pull request 'Update 'app/Exceptions/Handler.php'' (#137) from dev into master
3 years ago
azizi b61f7a3ad8 Merge pull request 'Update 'app/Exceptions/Handler.php'' (#136) from dev into master
3 years ago
azizi 9fb850cf84 Merge pull request 'Update 'app/Console/Kernel.php'' (#135) from dev into master
3 years ago
azizi 3e4618b8f6 Update '.gitignore'
3 years ago
f.saravi 3eb11a615f Merge pull request 'dev' (#134) from dev into master
3 years ago
farid 0d4eade00a Merge branch 'master' of https://git.willaspace.com/WillaEngine-Project/WillaEngine
3 years ago
f.saravi 153b049f32 Update 'Dockerfile'
3 years ago
f.saravi 28f7d12a8e Update 'Dockerfile'
3 years ago
azizi 4c699ffdb0 Update '.gitattributes'
3 years ago
saeid_01 b7c027015c Update 'Dockerfile'
3 years ago
azizi db952e98ab Merge pull request 'dev' (#133) from dev into master
3 years ago

@ -3,5 +3,3 @@ vendor
node_modules
modules
composer.lock
Dockerfile*
Jenkinsfile

@ -5,25 +5,28 @@ name: default
steps:
- name: build to production
commands:
- docker build -t registry.willaspace.com/willaspace/willaengine:latest .
- docker build -t registry.willaspace.com/willaspace/willaengine-test:latest --build-arg COMPOSER_FILE_NAME=composer-prod .
when:
branch:
- master
- name: deploy to production
commands:
- cd /home/administrator/apps/willaengine/ ; docker-compose up -d
- docker exec willaengine bash -c "COMPOSER=composer-prod.json composer update"
- docker exec willaengine service cron start
- docker exec willaengine php artisan config:cache
- docker exec willaengine php artisan route:cache
- cd /apps/willaengine/ ; docker-compose up -d
- docker exec willaengine-test bash -c "COMPOSER=composer-prod.json composer update"
- docker exec willaengine-test php artisan config:cache
- docker exec willaengine-test php artisan route:cache
# - docker exec willaengine_worker bash -c "COMPOSER=composer-prod.json composer update"
# - docker exec willaengine_worker service supervisor start
# - docker network connect nginx_default willaengine
when:
branch:
- master
- name: build to staging
commands:
- docker build -t registry.willaspace.com/willaspace/willaengine-staging:latest -f Dockerfile.staging .
- docker build -t registry.willaspace.com/willaspace/willaengine-staging:latest --build-arg COMPOSER_FILE_NAME=composer-staging -f Dockerfile.staging .
- docker build -t registry.willaspace.com/willaspace/willaengine-staging-nginx:latest -f Dockerfile.nginx .
when:
branch:
@ -32,6 +35,13 @@ steps:
- name: deploy to staging
commands:
- cd /apps/willaengine-staging/ ; docker-compose up -d
- docker exec willaengine-staging_php bash -c "COMPOSER=composer-staging.json composer update"
- docker exec willaengine-staging_php bash -c "php artisan route:cache"
- docker exec willaengine-staging_php bash -c "php artisan config:cache"
- docker exec willaengine-staging_worker bash -c "COMPOSER=composer-staging.json composer update"
- docker exec willaengine-staging_worker service supervisor start
- docker exec willaengine-staging_php php artisan migrate --path=vendor/wm/finance/database/migrations --force
- docker exec willaengine-staging_php php artisan migrate --path=vendor/wm/store/database/migrations --force
when:
branch:
- dev
@ -40,3 +50,4 @@ trigger:
branch:
- master
- dev

4
.gitignore vendored

@ -2,7 +2,9 @@
/development/
# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,laravel,vuejs,phpstorm
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,laravel,vuejs,phpstorm
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,laravel,vuejs, phpstorm
resources/views/sites
### Laravel ###
/vendor/

@ -1,35 +1,28 @@
FROM dfs1368/laravel-php-fpm:7.4
FROM willaengine/standard-laravel:7.4
ARG ssh_prv_key
ARG COMPOSER_FILE_NAME=composer
WORKDIR /var/www
WORKDIR /var/www/html
RUN apt install -y sendmail openssh-server libpng-dev
#####################################
# Composer:
#####################################
# Authorize SSH Host
RUN mkdir -p /root/.ssh && \
chmod 0700 /root/.ssh && \
echo "$ssh_prv_key" > /root/.ssh/id_rsa && \
ssh-keyscan git.willaspace.com > /root/.ssh/known_hosts && \
chmod 600 /root/.ssh/id_rsa
COPY database /var/www/html/database
RUN docker-php-ext-install gd
COPY $COMPOSER_FILE_NAME.* /var/www/html/
RUN printf 'upload_max_filesize=300M;\npost_max_size=300M;\nmax_execution_time=600;\nmax_input_time=600;\n' >> /usr/local/etc/php/conf.d/docker-php-memlimit.ini;
RUN echo 'pm.max_children = 100' >> /usr/local/etc/php-fpm.d/zz-docker.conf
RUN COMPOSER=$COMPOSER_FILE_NAME.json composer install --no-scripts
COPY database /var/www/database
COPY . /var/www/html
COPY composer-prod.* /var/www/
RUN composer clearcache && COMPOSER=composer-prod.json composer install --no-scripts
RUN chown -R www-data:www-data \
/var/www/html/public \
/var/www/html/storage \
/var/www/html/bootstrap/cache \
/var/www/.ssh \
/var/www/html/storage/letsencrypt && \
chmod 755 /var/www/html/storage/letsencrypt/Bash/auth-hook.sh
COPY . /var/www
RUN php artisan morphmap:cache
RUN chown -R www-data:www-data \
/var/www/public \
/var/www/storage \
/var/www/bootstrap/cache

@ -1,8 +1,3 @@
FROM registry.willaspace.com/willaspace/willaengine-staging:latest AS php_builder
WORKDIR /var/www/html/
RUN npm install
RUN npm run staging
FROM nginx:1.21.1
COPY --from=php_builder /var/www/html /var/www/html
COPY public /var/www/html/public

@ -1,38 +1,6 @@
FROM dfs1368/laravel-php-fpm:7.4
ARG ssh_prv_key
FROM fsaravi/standard-laravel:7.4
WORKDIR /var/www/html
RUN apt install -y sendmail openssh-server libpng-dev
# Authorize SSH Host
RUN mkdir -p /root/.ssh && \
chmod 0700 /root/.ssh && \
echo "$ssh_prv_key" > /root/.ssh/id_rsa && \
ssh-keyscan git.willaspace.com > /root/.ssh/known_hosts && \
chmod 600 /root/.ssh/id_rsa
RUN docker-php-ext-install gd
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \
apt-get install -y nodejs
RUN printf 'upload_max_filesize=300M;\npost_max_size=300M;\nmax_execution_time=600;\nmax_input_time=600;\n' >> /usr/local/etc/php/conf.d/docker-php-memlimit.ini;
RUN echo 'pm.max_children = 100' >> /usr/local/etc/php-fpm.d/zz-docker.conf
COPY database /var/www/html/database
COPY composer-staging.* /var/www/html/
RUN composer clearcache && COMPOSER=composer-staging.json composer install --no-scripts
COPY . /var/www/html
RUN php artisan morphmap:cache
RUN chown -R www-data:www-data \
/var/www/html/public \
/var/www/html/storage \
/var/www/html/bootstrap/cache

16
Jenkinsfile vendored

@ -5,24 +5,15 @@ pipeline {
}
}
stages {
stage('build for production') {
stage('build') {
when {
branch 'master'
}
steps {
sh 'docker build -t registry.willaspace.com/willaspace/${IMAGE_NAME}:latest --build-arg ssh_prv_key="$(cat /home/administrator/.ssh/id_rsa)" .'
sh 'cd /home/administrator/apps/${IMAGE_NAME}/;docker build -t registry.willaspace.com/willaspace/${IMAGE_NAME}:latest .'
sh 'cd /home/administrator/apps/${IMAGE_NAME}/;sudo ./BuildDocker'
}
}
stage('build for staging') {
when {
branch 'dev'
}
steps {
sh 'docker build -t registry.willaspace.com/willaspace/${IMAGE_NAME}-staging:latest -f Dockerfile.staging --build-arg ssh_prv_key="$(cat /home/administrator/.ssh/id_rsa)" .'
sh 'docker build -t registry.willaspace.com/willaspace/${IMAGE_NAME}-staging-nginx:latest -f Dockerfile.nginx .'
}
}
stage('deploy to production') {
when {
branch 'master'
@ -40,7 +31,7 @@ pipeline {
branch 'dev'
}
steps {
sh 'cd /apps/${IMAGE_NAME}-staging/ ; docker-compose up -d'
sh 'echo ${IMAGE_NAME}-staging comming soon ...'
}
}
}
@ -48,3 +39,4 @@ pipeline {
IMAGE_NAME = 'willaengine'
}
}

@ -60,6 +60,10 @@ class Handler extends ExceptionHandler
return response()->view('webBuilder::errors.template_disabled', ['error' => 'business banned']);
} elseif ($exception instanceof HasRelationException) {
return response()->json(Responser::error([$exception->getMessage()]), 422);
} elseif ($this->isHttpException($exception)) {
if ($exception->getStatusCode() == 404 and in_array("web",$request->route()->middleware())) {
return response()->view('webBuilder::errors.404', [], 404);
}
}
return parent::render($request, $exception);

@ -1,44 +1,45 @@
{
"name": "laravel/laravel",
"name": "willaengine/laravel",
"type": "project",
"description": "The Laravel Framework.",
"description": "The WillaEngine Applications.",
"keywords": [
"framework",
"laravel"
"laravel",
"WillaEngine"
],
"license": "MIT",
"require": {
"php": "^7.4",
"coraxster/flysystem-aws-s3-v3-minio": "^1.0",
"fideloper/proxy": "^4.0",
"io-developer/php-whois": "^4.0",
"kalnoy/nestedset": "^6.0",
"laravel/framework": "^8.0",
"laravel/passport": "^10",
"laravel/tinker": "^2.0",
"predis/predis": "^1.1",
"maatwebsite/excel": "^3.1",
"kalnoy/nestedset": "^6.0",
"owen-it/laravel-auditing": "^13.5",
"sentry/sentry-laravel": "^2.3",
"spatie/laravel-medialibrary": "^8.0.0",
"io-developer/php-whois": "^4.0",
"silber/bouncer": "v1.0.0-rc.10",
"spatie/laravel-medialibrary": "^8.0.0",
"wm/admin": "dev-master",
"wm/app-management": "dev-master",
"wm/blog": "dev-master",
"wm/common": "dev-master",
"wm/contact-us": "dev-master",
"wm/core": "dev-master",
"wm/crm": "dev-master",
"wm/finance": "dev-master",
"wm/lms": "dev-master",
"wm/notification": "dev-master",
"wm/portfolio": "dev-master",
"wm/product": "dev-master",
"wm/roll-call": "dev-master",
"wm/service": "dev-master",
"wm/service-store": "dev-master",
"wm/store": "dev-master",
"wm/finance": "dev-master",
"wm/admin": "dev-master",
"wm/web-builder": "dev-master",
"wm/app-management": "dev-master",
"wm/notification": "dev-master",
"wm/roll-call": "dev-master",
"wm/lms": "dev-master",
"wm/service-store": "dev-master",
"wm/contact-us": "dev-master",
"zircote/swagger-php": "^3.0"
"zircote/swagger-php": "^3.0"
},
"provide": {
"ext-imagick": "*"
@ -53,7 +54,10 @@
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
"sort-packages": true,
"allow-plugins": {
"php-http/discovery": true
}
},
"extra": {
"laravel": {
@ -117,7 +121,7 @@
"url": "git@git.willaspace.com:WillaEngine-Project/product.git"
},
{
"type": "vcs",
c "type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/service.git"
},
{
@ -156,7 +160,7 @@
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/lms.git"
},
{
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/contact-us.git"
}

@ -15,6 +15,7 @@
"laravel/passport": "^10",
"laravel/tinker": "^2.0",
"maatwebsite/excel": "^3.1",
"matthiasmullie/minify": "^1.3",
"kalnoy/nestedset": "^6.0",
"sentry/sentry-laravel": "^2.3",
"spatie/laravel-medialibrary": "^8.0.0",
@ -24,6 +25,20 @@
"wm/common": "dev-dev",
"wm/core": "dev-dev",
"wm/crm": "dev-dev",
"wm/portfolio": "dev-dev",
"wm/product": "dev-dev",
"wm/service": "dev-dev",
"wm/store": "dev-dev",
"wm/finance": "dev-dev",
"wm/admin": "dev-dev",
"wm/web-builder": "dev-dev",
"wm/app-management": "dev-dev",
"wm/notification": "dev-dev",
"wm/roll-call": "dev-dev",
"wm/lms": "dev-dev",
"wm/service-store": "dev-dev",
"predis/predis": "^1.1",
"wm/contact-us": "dev-dev",
"zircote/swagger-php": "^3.0"
},
"provide": {
@ -93,6 +108,59 @@
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/blog.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/portfolio.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/product.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/service.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/store.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/notification.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/roll-call.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/app-management.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/web-builder.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/finance.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/service-store.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/admin.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/lms.git"
},
{
"type": "vcs",
"url": "git@git.willaspace.com:WillaEngine-Project/contact-us.git"
}
]
}

@ -11,28 +11,31 @@
"php": "^7.4",
"coraxster/flysystem-aws-s3-v3-minio": "^1.0",
"fideloper/proxy": "^4.0",
"io-developer/php-whois": "^4.0",
"kalnoy/nestedset": "^6.0",
"laravel/framework": "^8.0",
"laravel/passport": "^10",
"laravel/tinker": "^2.0",
"maatwebsite/excel": "^3.1",
"kalnoy/nestedset": "^6.0",
"matthiasmullie/minify": "^1.3",
"owen-it/laravel-auditing": "^13.0",
"predis/predis": "^1.1",
"sentry/sentry-laravel": "^2.3",
"spatie/laravel-medialibrary": "^8.0.0",
"io-developer/php-whois": "^4.0",
"silber/bouncer": "v1.0.0-rc.10",
"spatie/laravel-medialibrary": "^8.0.0",
"wm/admin": "dev-master",
"wm/blog": "dev-master",
"wm/common": "dev-master",
"wm/core": "dev-master",
"wm/crm": "dev-master",
"wm/finance": "dev-master",
"wm/notification": "dev-master",
"wm/portfolio": "dev-master",
"wm/product": "dev-master",
"wm/roll-call": "dev-master",
"wm/service": "dev-master",
"wm/store": "dev-master",
"wm/finance": "dev-master",
"wm/admin": "dev-master",
"wm/web-builder": "dev-master",
"wm/notification": "dev-master",
"wm/roll-call": "dev-master",
"zircote/swagger-php": "^3.0"
},
"provide": {

3682
composer.lock generated

File diff suppressed because it is too large Load Diff

@ -0,0 +1,52 @@
<?php
return [
/*
* If set to false, no activities will be saved to the database.
*/
'enabled' => env('ACTIVITY_LOGGER_ENABLED', true),
/*
* When the clean-command is executed, all recording activities older than
* the number of days specified here will be deleted.
*/
'delete_records_older_than_days' => 365,
/*
* If no log name is passed to the activity() helper
* we use this default log name.
*/
'default_log_name' => 'default',
/*
* You can specify an auth driver here that gets user models.
* If this is null we'll use the default Laravel auth driver.
*/
'default_auth_driver' => null,
/*
* If set to true, the subject returns soft deleted models.
*/
'subject_returns_soft_deleted_models' => false,
/*
* This model will be used to log activity.
* It should be implements the Spatie\Activitylog\Contracts\Activity interface
* and extend Illuminate\Database\Eloquent\Model.
*/
'activity_model' => \Spatie\Activitylog\Models\Activity::class,
/*
* This is the name of the table that will be created by the migration and
* used by the Activity model shipped with this package.
*/
'table_name' => 'activity_log',
/*
* This is the database connection that will be used by the migration and
* the Activity model shipped with this package. In case it's not set
* Laravel database.default will be used instead.
*/
'database_connection' => env('ACTIVITY_LOGGER_DB_CONNECTION'),
];

@ -0,0 +1,171 @@
<?php
return [
'enabled' => env('AUDITING_ENABLED', true),
/*
|--------------------------------------------------------------------------
| Audit Implementation
|--------------------------------------------------------------------------
|
| Define which Audit model implementation should be used.
|
*/
'implementation' => OwenIt\Auditing\Models\Audit::class,
/*
|--------------------------------------------------------------------------
| User Morph prefix & Guards
|--------------------------------------------------------------------------
|
| Define the morph prefix and authentication guards for the User resolver.
|
*/
'user' => [
'morph_prefix' => 'user',
'guards' => [
'web',
'api',
'apicore'
],
'resolver' => OwenIt\Auditing\Resolvers\UserResolver::class
],
/*
|--------------------------------------------------------------------------
| Audit Resolvers
|--------------------------------------------------------------------------
|
| Define the User, IP Address, User Agent and URL resolver implementations.
|
*/
'resolvers' => [
'ip_address' => OwenIt\Auditing\Resolvers\IpAddressResolver::class,
'user_agent' => OwenIt\Auditing\Resolvers\UserAgentResolver::class,
'url' => OwenIt\Auditing\Resolvers\UrlResolver::class,
'business_id'=> WM\Common\Services\Audit\BusinessResolver::class,
],
/*
|--------------------------------------------------------------------------
| Audit Events
|--------------------------------------------------------------------------
|
| The Eloquent events that trigger an Audit.
|
*/
'events' => [
'created',
'updated',
'deleted',
'restored'
],
/*
|--------------------------------------------------------------------------
| Strict Mode
|--------------------------------------------------------------------------
|
| Enable the strict mode when auditing?
|
*/
'strict' => false,
/*
|--------------------------------------------------------------------------
| Global exclude
|--------------------------------------------------------------------------
|
| Have something you always want to exclude by default? - add it here.
| Note that this is overwritten (not merged) with local exclude
|
*/
'exclude' => [],
/*
|--------------------------------------------------------------------------
| Empty Values
|--------------------------------------------------------------------------
|
| Should Audit records be stored when the recorded old_values & new_values
| are both empty?
|
| Some events may be empty on purpose. Use allowed_empty_values to exclude
| those from the empty values check. For example when auditing
| model retrieved events which will never have new and old values.
|
|
*/
'empty_values' => true,
'allowed_empty_values' => [
'retrieved'
],
/*
|--------------------------------------------------------------------------
| Audit Timestamps
|--------------------------------------------------------------------------
|
| Should the created_at, updated_at and deleted_at timestamps be audited?
|
*/
'timestamps' => false,
/*
|--------------------------------------------------------------------------
| Audit Threshold
|--------------------------------------------------------------------------
|
| Specify a threshold for the amount of Audit records a model can have.
| Zero means no limit.
|
*/
'threshold' => 0,
/*
|--------------------------------------------------------------------------
| Audit Driver
|--------------------------------------------------------------------------
|
| The default audit driver used to keep track of changes.
|
*/
'driver' => 'database',
/*
|--------------------------------------------------------------------------
| Audit Driver Configurations
|--------------------------------------------------------------------------
|
| Available audit drivers and respective configurations.
|
*/
'drivers' => [
'database' => [
'table' => 'audits',
'connection' => null,
],
],
/*
|--------------------------------------------------------------------------
| Audit Console
|--------------------------------------------------------------------------
|
| Whether console events should be audited (eg. php artisan db:seed).
|
*/
'console' => true,
];

@ -127,7 +127,7 @@ return [
'redis' => [
'client' => env('REDIS_CLIENT', 'phpredis'),
'client' => env('REDIS_CLIENT', 'predis'),
'options' => [
'cluster' => env('REDIS_CLUSTER', 'redis'),

@ -99,6 +99,11 @@ return [
'emergency' => [
'path' => storage_path('logs/laravel.log'),
],
'sentry' => [
'driver' => 'sentry',
'level' => 'debug',
'bubble' => true,
],
],
];

@ -12,15 +12,12 @@ class DatabaseSeeder extends Seeder
*/
public function run()
{
$this->call(ModuleSeeder::class);
$this->call(CategorySeeder::class);
$this->call(BusinessSeeder::class);
$this->call(UserSeeder::class);
$this->call(CitySeeder::class);
$this->call(DistrictSeeder::class);
$this->call(DomainSeeder::class);
$this->call(HelpSeeder::class);
$this->call(PermissionCategorySeeder::class);
$this->call(RoleSeeder::class);
$this->call(CoreSeeder::class);
$this->call(CommonSeeder::class);
$this->call(CRMSeeder::class);
$this->call(ProductSeeder::class);
$this->call(StoreSeeder::class);
$this->call(ServiceSeeder::class);
$this->call(FinanceSeeder::class);
}
}

@ -36,7 +36,7 @@ return [
"digits" => ":attribute باید :digits رقم باشد.",
"digits_between" => ":attribute باید بین :min و :max رقم باشد.",
"email" => "فرمت :attribute معتبر نیست.",
"exists" => "این :attribute وجود دارد.",
"exists" => "این :attribute معتبر نمی باشد.",
"image" => ":attribute باید تصویر باشد.",
"in" => ":attribute انتخاب شده، معتبر نیست.",
"integer" => ":attribute باید نوع داده ای عددی باشد.",

@ -3,8 +3,17 @@
namespace Tests;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
use Illuminate\Support\Facades\Http;
abstract class TestCase extends BaseTestCase
{
use CreatesApplication;
/**
* @return \WM\Core\Services\HttpTestProvider Http request provider for test enviroment
*/
public function makeHttpReqeust($url)
{
return \WM\Core\Services\HttpTestProvider::init($url);
}
}

@ -35,11 +35,25 @@ mix.webpackConfig({
mix.js('resources/js/Home/app.js', 'public/js/vue/Home').vue({version: 2});
require('./vendor/wm/core/webpack.mix');
require('./vendor/wm/common/webpack.mix');
require('./vendor/wm/crm/webpack.mix');
require('./vendor/wm/blog/webpack.mix');
// require('./vendor/wm/warehouse/webpack.mix');
// require('./vendor/wm/reservation/webpack.mix');
require('./vendeor/wm/core/webpack.mix');
require('./vendeor/wm/common/webpack.mix');
require('./vendeor/wm/crm/webpack.mix');
require('./vendeor/wm/blog/webpack.mix');
require('./vendeor/wm/portfolio/webpack.mix');
require('./vendeor/wm/product/webpack.mix');
require('./vendeor/wm/service/webpack.mix');
require('./vendeor/wm/store/webpack.mix');
require('./vendeor/wm/admin/webpack.mix');
require('./vendeor/wm/notification/webpack.mix');
require('./vendeor/wm/roll-call/webpack.mix');
require('./vendeor/wm/finance/webpack.mix');
require('./vendeor/wm/app-management/webpack.mix');
require('./vendeor/wm/web-builder/webpack.mix');
require('./vendeor/wm/service-store/webpack.mix');
require('./vendeor/wm/lms/webpack.mix');
require('./vendeor/wm/service-store/webpack.mix');
require('./vendeor/wm/contact-us/webpack.mix');
// require('./vendeor/wm/warehouse/webpack.mix');
// require('./vendeor/wm/reservation/webpack.mix');
mix.version();

@ -0,0 +1,55 @@
[supervisord]
nodaemon=true
user = root
[supervisorctl]
[inet_http_server]
port = 127.0.0.1:9001
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[program:scheduler]
process_name=%(program_name)s_%(process_num)02d
command=/bin/sh -c "while [ true ]; do (php /var/www/html/artisan schedule:run --verbose --no-interaction &); sleep 60; done"
autostart=true
autorestart=true
numprocs=1
user=www-data
redirect_stderr=true
stdout_logfile=/var/log/supervisor/scheduler.log
[program:change-store-order-status]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/html/artisan queue:work redis --queue=change_to_successful_store_order --sleep=3 --tries=3 --max-time=3600
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
user=www-data
numprocs=3
redirect_stderr=true
stopwaitsecs=3600
stdout_logfile=/var/log/supervisor/change-store-order-status.log
[program:create-store-product]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/html/artisan queue:work redis --queue=create_store_product --sleep=3 --tries=3 --max-time=3600
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
user=www-data
numprocs=3
redirect_stderr=true
stopwaitsecs=3600
stdout_logfile=/var/log/supervisor/create-store-product.log
# [program:check-sms-status]
# command=php /var/www/html/artisan queue:work redis --queue=check-sms-status --tries=3
# process_name=%(program_name)s_%(process_num)02d
# autostart=true
# autorestart=true
# user=www-data
# numprocs=3
# redirect_stderr=true
# stdout_logfile=/var/log/supervisor/sms-status.log
Loading…
Cancel
Save