mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
Merge branches 'fatihalp' and 'master' of https://github.com/openclassify/openclassify into fatihalp
This commit is contained in:
commit
5b03d458ec
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
use Anomaly\Streams\Platform\Database\Migration\Migration;
|
||||
|
||||
class VisiosoftModuleAdvsAddDocFilesField extends Migration
|
||||
{
|
||||
protected $delete = false;
|
||||
|
||||
protected $stream = [
|
||||
'slug' => 'advs',
|
||||
];
|
||||
|
||||
protected $fields = [
|
||||
'doc_files' => [
|
||||
'type' => 'visiosoft.field_type.media',
|
||||
'config' => [
|
||||
'folders' => ["ads_documents"],
|
||||
'mode' => 'upload',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
protected $assignments = [
|
||||
'doc_files'
|
||||
];
|
||||
}
|
||||
@ -31,6 +31,7 @@ return [
|
||||
'estimated_pending_time',
|
||||
'default_published_time',
|
||||
'default_GET',
|
||||
'get_categories',
|
||||
'listing_page_image',
|
||||
'show_ads_count',
|
||||
],
|
||||
|
||||
@ -373,4 +373,12 @@ return [
|
||||
'bind' => 'advs.lang_switcher_for_browser',
|
||||
'env' => 'LANG_SWITCHER_FOR_BROWSER',
|
||||
],
|
||||
'get_categories' => [
|
||||
'type' => 'anomaly.field_type.checkboxes',
|
||||
'config' => [
|
||||
'options' => function (\Visiosoft\CatsModule\Category\Contract\CategoryRepositoryInterface $categoryRepository) {
|
||||
return $categoryRepository->mainCats()->pluck('name', 'id')->all();
|
||||
},
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
@ -319,6 +319,7 @@ return [
|
||||
'congratulations' => 'Congratulations',
|
||||
'ad_desc' => 'Ad Description',
|
||||
'upload_photos' => 'Upload Photos',
|
||||
'upload_files' => 'Upload Files',
|
||||
'additional_fields' => 'Additional Fields',
|
||||
'ad_location' => 'Ad Location',
|
||||
|
||||
|
||||
@ -223,4 +223,8 @@ return [
|
||||
'name' => 'Lang Switcher For Browser',
|
||||
'instructions' => 'Allows you to choose browser language as active language'
|
||||
],
|
||||
'get_categories' => [
|
||||
'name' => 'GET Categories',
|
||||
'instructions' => 'It represents the categories in which the GET property will be valid.'
|
||||
],
|
||||
];
|
||||
|
||||
@ -223,4 +223,8 @@ return [
|
||||
'name' => 'Tarayıcı Diline Geç',
|
||||
'instructions' => 'Seçili aktif bir dil olmadığında tarayıcı dilini aktif dil olarak seçmenize izin verir'
|
||||
],
|
||||
'get_categories' => [
|
||||
'name' => 'GET Kategorileri',
|
||||
'instructions' => 'GET özelliğinin geçerli olacağı kategorileri temsil eder.'
|
||||
],
|
||||
];
|
||||
|
||||
@ -36,6 +36,12 @@
|
||||
</div>
|
||||
<!--detail-ad -->
|
||||
|
||||
<ul class="docs list-unstyled">
|
||||
{% for doc in adv.doc_files %}
|
||||
<li><a class="text-dark small" href="{{ doc.url }}" download><i class="fa fa-lg fa-download small"></i> {{ doc.name }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
{% if setting_value('visiosoft.theme.base::ad_details_tab') %}
|
||||
|
||||
{% if blocks('ad-item-content-block-area') is null %}
|
||||
|
||||
@ -178,6 +178,15 @@
|
||||
<div class="row form-group images">
|
||||
<div class="col-md-12">
|
||||
{{ form.fields.files.input |raw }}
|
||||
<input name="doc_files" value="{{ form.fields.doc_files.value.pluck('id').all()|join(',') }}" hidden>
|
||||
<div class="doc_list small">
|
||||
{% for docs in form.fields.doc_files.value %}
|
||||
<a id="{{ docs.id }}" href="javascript:void(0)" onclick="deleteDocs({{ docs.id }})" class="text-dark">
|
||||
{{ docs.name }}
|
||||
<i class="fa fa-trash text-danger pl-2"></i>
|
||||
</a><br>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Adv;
|
||||
|
||||
use Anomaly\Streams\Platform\Image\Command\MakeImageInstance;
|
||||
use Anomaly\Streams\Platform\Message\MessageBag;
|
||||
use Anomaly\Streams\Platform\Model\Advs\AdvsCustomFieldsEntryModel;
|
||||
use Carbon\Carbon;
|
||||
use GuzzleHttp\Client;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Visiosoft\AdvsModule\Adv\Contract\AdvInterface;
|
||||
@ -112,10 +112,9 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
|
||||
public function foreignCurrency($currency, $price, $isUpdate, $settings)
|
||||
{
|
||||
$currencies = setting_value('visiosoft.module.advs::enabled_currencies');
|
||||
$messages = app(MessageBag::class);
|
||||
$foreign_currency = array();
|
||||
|
||||
$client = new Client();
|
||||
|
||||
foreach ($currencies as $currencyIn) {
|
||||
if ($currencyIn == $currency) {
|
||||
$foreign_currency[$currency] = (int)$price;
|
||||
@ -123,8 +122,14 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
|
||||
try {
|
||||
$url = $currency . "_" . $currencyIn;
|
||||
$freeCurrencyKey = $settings->value('visiosoft.module.advs::free_currencyconverterapi_key');
|
||||
$response = $client->get('http://free.currencyconverterapi.com/api/v6/convert?q='
|
||||
. $url . '&compact=y&apiKey=' . $freeCurrencyKey);
|
||||
|
||||
$client = new \GuzzleHttp\Client();
|
||||
$response = $client->request('GET', 'http://free.currencyconverterapi.com/api/v6/convert', ['query' => [
|
||||
'q' => $url,
|
||||
'compact' => 'y',
|
||||
'apiKey' => $freeCurrencyKey
|
||||
]]);
|
||||
|
||||
if ($response->getStatusCode() == '200') {
|
||||
$response = (array)\GuzzleHttp\json_decode($response->getBody()->getContents());
|
||||
if (!empty($response)) {
|
||||
@ -132,8 +137,11 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
|
||||
$foreign_currency[$currencyIn] = $price * $rate;
|
||||
}
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
$this->messages->error((!is_null($e->getMessage())) ? $e->getMessage() : trans('streams::error.500.message'));
|
||||
} catch (\GuzzleHttp\Exception\ClientException $e) {
|
||||
$response = $e->getResponse();
|
||||
$responseBodyAsString = $response->getBody()->getContents();
|
||||
$response = json_decode($responseBodyAsString, true);
|
||||
$messages->error($response['error']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -102,20 +102,26 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface
|
||||
if (!empty($param['user'])) {
|
||||
$query = $query->where('advs_advs.created_by_id', $param['user']);
|
||||
}
|
||||
$currency = setting_value('streams::currency');
|
||||
|
||||
if (!empty($param['currency'])) {
|
||||
if (!empty($param['min_price'])) {
|
||||
$num = $param['min_price'];
|
||||
$int = (int)$num;
|
||||
$column = "JSON_EXTRACT(foreign_currencies, '$." . $param['currency'] . "') >=" . $int;
|
||||
$query = $query->whereRaw($column);
|
||||
}
|
||||
if (!empty($param['max_price'])) {
|
||||
$num = $param['max_price'];
|
||||
$int = (int)$num;
|
||||
$column = "JSON_EXTRACT(foreign_currencies, '$." . $param['currency'] . "') <=" . $int;
|
||||
$query = $query->whereRaw($column);
|
||||
}
|
||||
$currency = $param['currency'];
|
||||
}
|
||||
|
||||
if (!empty($param['min_price'])) {
|
||||
$num = $param['min_price'];
|
||||
$int = (int)$num;
|
||||
$column = "JSON_EXTRACT(foreign_currencies, '$." . $currency . "') >= " . $int;
|
||||
$query = $query->whereRaw($column);
|
||||
}
|
||||
|
||||
if (!empty($param['max_price'])) {
|
||||
$num = $param['max_price'];
|
||||
$int = (int)$num;
|
||||
$column = "JSON_EXTRACT(foreign_currencies, '$." . $currency . "') <= " . $int;
|
||||
$query = $query->whereRaw($column);
|
||||
}
|
||||
|
||||
if (!empty($param['date'])) {
|
||||
if ($param['date'] === 'day') {
|
||||
$query = $query->where('advs_advs.publish_at', '>=', Carbon::now()->subDay());
|
||||
|
||||
@ -53,7 +53,8 @@ class AdvFormBuilder extends FormBuilder
|
||||
'class' => 'hidden d-none mapVal'
|
||||
],
|
||||
'files',
|
||||
'popular_adv',
|
||||
'doc_files',
|
||||
'popular_adv',
|
||||
'adv_day',
|
||||
'product_options_value'
|
||||
];
|
||||
|
||||
@ -13,7 +13,9 @@ class ConvertCurrency extends ActionHandler
|
||||
|
||||
foreach ($selected as $id) {
|
||||
$entry = $model->newQuery()->find($id);
|
||||
$model->foreignCurrency($entry->currency, $entry->price, $id, $settingRepository);
|
||||
if ($entry) {
|
||||
$model->foreignCurrency($entry->currency, $entry->price, $id, $settingRepository);
|
||||
}
|
||||
}
|
||||
if ($selected) {
|
||||
$this->messages->success(trans('visiosoft.module.advs::message.currency_converted'));
|
||||
|
||||
@ -120,4 +120,22 @@ class AdvsModulePlugin extends Plugin
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the filters.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getFilters()
|
||||
{
|
||||
return [
|
||||
new \Twig_SimpleFilter(
|
||||
'ksort',
|
||||
function (array $array) {
|
||||
ksort($array);
|
||||
return $array;
|
||||
}
|
||||
),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<?php namespace Visiosoft\AdvsModule\Http\Controller;
|
||||
|
||||
use Anomaly\FilesModule\File\Contract\FileRepositoryInterface;
|
||||
use Anomaly\SettingsModule\Setting\Contract\SettingRepositoryInterface;
|
||||
use Anomaly\Streams\Platform\Http\Controller\PublicController;
|
||||
use Anomaly\Streams\Platform\Message\MessageBag;
|
||||
@ -45,8 +46,8 @@ class AdvsController extends PublicController
|
||||
private $adv_repository;
|
||||
|
||||
private $optionConfigurationRepository;
|
||||
private $productOptionRepository;
|
||||
private $productOptionsValueRepository;
|
||||
private $productOptionRepository;
|
||||
private $productOptionsValueRepository;
|
||||
|
||||
private $country_repository;
|
||||
|
||||
@ -75,8 +76,8 @@ class AdvsController extends PublicController
|
||||
AdvRepositoryInterface $advRepository,
|
||||
|
||||
OptionConfigurationRepositoryInterface $optionConfigurationRepository,
|
||||
ProductoptionRepositoryInterface $productOptionRepository,
|
||||
ProductoptionsValueRepositoryInterface $productOptionsValueRepository,
|
||||
ProductoptionRepositoryInterface $productOptionRepository,
|
||||
ProductoptionsValueRepositoryInterface $productOptionsValueRepository,
|
||||
|
||||
CountryRepositoryInterface $country_repository,
|
||||
|
||||
@ -108,7 +109,7 @@ class AdvsController extends PublicController
|
||||
|
||||
$this->optionConfigurationRepository = $optionConfigurationRepository;
|
||||
$this->productOptionRepository = $productOptionRepository;
|
||||
$this->productOptionsValueRepository = $productOptionsValueRepository;
|
||||
$this->productOptionsValueRepository = $productOptionsValueRepository;
|
||||
|
||||
$this->country_repository = $country_repository;
|
||||
|
||||
@ -581,15 +582,15 @@ class AdvsController extends PublicController
|
||||
$this->template->set('showTitle', false);
|
||||
$this->template->set('meta_title', $metaTitle);
|
||||
|
||||
$configurations = $this->optionConfigurationRepository->getConf($adv->id);
|
||||
$configurations = $this->optionConfigurationRepository->getConf($adv->id);
|
||||
|
||||
|
||||
if ($adv->created_by_id == isset(auth()->user()->id) or $adv->status == "approved") {
|
||||
return $this->view->make('visiosoft.module.advs::ad-detail/detail', compact('adv', 'complaints',
|
||||
'recommended_advs', 'categories', 'features', 'options', 'configurations'));
|
||||
} else {
|
||||
return back();
|
||||
}
|
||||
if ($adv->created_by_id == isset(auth()->user()->id) or $adv->status == "approved") {
|
||||
return $this->view->make('visiosoft.module.advs::ad-detail/detail', compact('adv', 'complaints',
|
||||
'recommended_advs', 'categories', 'features', 'options', 'configurations'));
|
||||
} else {
|
||||
return back();
|
||||
}
|
||||
} else {
|
||||
$this->messages->error(trans('visiosoft.module.advs::message.ad_doesnt_exist'));
|
||||
return redirect()->route('visiosoft.module.advs::list');
|
||||
@ -782,7 +783,12 @@ class AdvsController extends PublicController
|
||||
}
|
||||
}
|
||||
|
||||
$adv->is_get_adv = $request->is_get_adv;
|
||||
$get_categories_status = false;
|
||||
if ($get_categories = setting_value('visiosoft.module.advs::get_categories') and $get_categories = in_array($adv->cat1, $get_categories)) {
|
||||
$get_categories_status = true;
|
||||
}
|
||||
|
||||
$adv->is_get_adv = ($request->is_get_adv and $get_categories_status) ? true : false;
|
||||
$adv->save();
|
||||
|
||||
//Cloudinary Module
|
||||
@ -792,7 +798,9 @@ class AdvsController extends PublicController
|
||||
$CloudinaryModel = new VideoModel();
|
||||
$CloudinaryModel->updateRequest($request);
|
||||
|
||||
if ($request->url != "") { $adv->save(); }
|
||||
if ($request->url != "") {
|
||||
$adv->save();
|
||||
}
|
||||
}
|
||||
if ($this->adv_model->is_enabled('customfields')) {
|
||||
app('Visiosoft\CustomfieldsModule\Http\Controller\cfController')->store($adv, $request);
|
||||
@ -853,7 +861,7 @@ class AdvsController extends PublicController
|
||||
return redirect(route('advs_preview', [$request->update_id]));
|
||||
}
|
||||
|
||||
/* New Create Adv */
|
||||
/* New Create Adv */
|
||||
$request->publish_at = date('Y-m-d H:i:s');
|
||||
$all = $request->all();
|
||||
|
||||
@ -968,13 +976,13 @@ class AdvsController extends PublicController
|
||||
|
||||
$this->adv_model->statusAds($id, $type);
|
||||
event(new ChangedStatusAd($ad));//Create Notify
|
||||
if ($type === 'approved') {
|
||||
$message = trans('visiosoft.module.advs::message.approve_status_change');
|
||||
} elseif ($type === 'sold') {
|
||||
$message = trans('visiosoft.module.advs::message.sold_status_change');
|
||||
} else {
|
||||
trans('visiosoft.module.advs::message.passive_status_change');
|
||||
}
|
||||
if ($type === 'approved') {
|
||||
$message = trans('visiosoft.module.advs::message.approve_status_change');
|
||||
} elseif ($type === 'sold') {
|
||||
$message = trans('visiosoft.module.advs::message.sold_status_change');
|
||||
} else {
|
||||
trans('visiosoft.module.advs::message.passive_status_change');
|
||||
}
|
||||
$this->messages->success($message);
|
||||
return back();
|
||||
}
|
||||
@ -1256,12 +1264,12 @@ class AdvsController extends PublicController
|
||||
return $this->redirect->back();
|
||||
}
|
||||
|
||||
public function sold($id, Request $request, AdvModel $advModel)
|
||||
{
|
||||
if ($request->sold == 'sold') {
|
||||
$advModel->find($id)->update(['status' => 'sold']);
|
||||
} elseif ($request->sold = 'not-sold') {
|
||||
$advModel->find($id)->update(['status' => 'approved']);
|
||||
}
|
||||
}
|
||||
public function sold($id, Request $request, AdvModel $advModel)
|
||||
{
|
||||
if ($request->sold == 'sold') {
|
||||
$advModel->find($id)->update(['status' => 'sold']);
|
||||
} elseif ($request->sold = 'not-sold') {
|
||||
$advModel->find($id)->update(['status' => 'approved']);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -11,7 +11,6 @@ class CategorySeeder extends Seeder
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
DB::table('cats_category')->truncate();
|
||||
DB::table('cats_category_translations')->truncate();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ Dropzone.autoDiscover = false;
|
||||
$("div#myDrop").dropzone({url: "/file/post"});
|
||||
|
||||
var uploaded = $('input[name="files"]').val().split(',').map(Number);
|
||||
var docsUploaded = $('input[name="doc_files"]').val().split(',').map(Number);
|
||||
|
||||
$(function () {
|
||||
|
||||
@ -67,23 +68,41 @@ $(function () {
|
||||
dropzone.on('success', function (file) {
|
||||
|
||||
var response = JSON.parse(file.xhr.response);
|
||||
var mimeType = response.mime_type.split('/')
|
||||
if (mimeType[0] === 'image'){
|
||||
uploaded.push(response.id);
|
||||
|
||||
uploaded.push(response.id);
|
||||
$('.media-selected-wrapper').load(
|
||||
REQUEST_ROOT_PATH + '/streams/media-field_type/selected?uploaded=' + uploaded.join(','),
|
||||
function () {
|
||||
$('input[name="files"]').val(uploaded.join(','))
|
||||
}
|
||||
);
|
||||
|
||||
$('.media-selected-wrapper').load(
|
||||
REQUEST_ROOT_PATH + '/streams/media-field_type/selected?uploaded=' + uploaded.join(','),
|
||||
function () {
|
||||
$('input[name="files"]').val(uploaded.join(','))
|
||||
}
|
||||
);
|
||||
file.previewElement.querySelector('[data-dz-uploadprogress]').setAttribute('class', 'progress progress-success');
|
||||
|
||||
file.previewElement.querySelector('[data-dz-uploadprogress]').setAttribute('class', 'progress progress-success');
|
||||
setTimeout(function () {
|
||||
|
||||
setTimeout(function () {
|
||||
addAppendByData(uploaded[0])
|
||||
file.previewElement.remove();
|
||||
}, 500);
|
||||
} else {
|
||||
docsUploaded.push(response.id);
|
||||
$('input[name="doc_files"]').val(docsUploaded.join(','))
|
||||
|
||||
addAppendByData(uploaded[0])
|
||||
file.previewElement.remove();
|
||||
}, 500);
|
||||
$('.doc_list').append(`
|
||||
<a id="${ response.id }" href="javascript:void(0)" onclick="deleteDocs(${ response.id })" class="text-dark">
|
||||
${ response.name }
|
||||
<i class="fa fa-trash text-danger"></i>
|
||||
</a><br>
|
||||
`)
|
||||
|
||||
setTimeout(function () {
|
||||
|
||||
addAppendByData(docsUploaded[0])
|
||||
file.previewElement.remove();
|
||||
}, 500);
|
||||
}
|
||||
});
|
||||
|
||||
// When file fails to upload.
|
||||
@ -109,6 +128,13 @@ function deleteImage(e, id) {
|
||||
$('.imageList').find('div[data-id="' + id + '"]').remove()
|
||||
}
|
||||
|
||||
function deleteDocs(id) {
|
||||
var key_item = $.inArray(id, docsUploaded);
|
||||
docsUploaded.splice(key_item, 1);
|
||||
$('input[name="doc_files"]').val(docsUploaded.join(','))
|
||||
$('.doc_list').find('#' + id).remove()
|
||||
}
|
||||
|
||||
function rotateImage(e, id) {
|
||||
e.preventDefault()
|
||||
|
||||
|
||||
@ -10,4 +10,5 @@ return [
|
||||
'uploading' => 'Uploading',
|
||||
'loading' => 'Loading',
|
||||
'error_upload' => 'There was a problem uploading the file.',
|
||||
'error_upload_docs' => 'There is no document upload support. Please contact your system administrator!',
|
||||
];
|
||||
|
||||
@ -10,4 +10,5 @@ return [
|
||||
'uploading' => 'Yükleme',
|
||||
'loading' => 'Yükleniyor',
|
||||
'error_upload' => 'Dosyayı yüklerken bir sorun oluştu.',
|
||||
'error_upload_docs' => 'Döküman yükleme desteği bulunmamaktadır.Lütfen sistem yöneticiniz ile iletişim kurunuz!',
|
||||
];
|
||||
|
||||
@ -50,93 +50,104 @@ class UploadController extends AdminController
|
||||
|
||||
public function upload()
|
||||
{
|
||||
$file = $this->uploader->upload($this->request->file('upload'), $this->folders->find($this->request->get('folder')));
|
||||
$mimes = explode('/', $this->request->file('upload')->getMimeType());
|
||||
|
||||
if ($mimes[0] == 'image') {
|
||||
$file = $this->uploader->upload($this->request->file('upload'), $this->folders->find($this->request->get('folder')));
|
||||
} else if ($doc_folder = app(FolderRepositoryInterface::class)->findBySlug('ads_documents')) {
|
||||
$file = $this->uploader->upload($this->request->file('upload'), $doc_folder);
|
||||
} else {
|
||||
return $this->response->json(['error' => trans('visiosoft.field_type.media::message.error_upload_docs')], 500);
|
||||
}
|
||||
|
||||
if ($file) {
|
||||
if ($mimes[0] == 'image') {
|
||||
|
||||
$settings_key = [
|
||||
'image_resize_backend',
|
||||
'full_image_width',
|
||||
'full_image_height',
|
||||
'medium_image_width',
|
||||
'medium_image_height',
|
||||
'thumbnail_width',
|
||||
'thumbnail_height',
|
||||
'add_canvas',
|
||||
'image_canvas_width',
|
||||
'image_canvas_height',
|
||||
'watermark_type',
|
||||
'watermark_text',
|
||||
'watermark_image',
|
||||
'watermark_position'
|
||||
];
|
||||
$settings_key = [
|
||||
'image_resize_backend',
|
||||
'full_image_width',
|
||||
'full_image_height',
|
||||
'medium_image_width',
|
||||
'medium_image_height',
|
||||
'thumbnail_width',
|
||||
'thumbnail_height',
|
||||
'add_canvas',
|
||||
'image_canvas_width',
|
||||
'image_canvas_height',
|
||||
'watermark_type',
|
||||
'watermark_text',
|
||||
'watermark_image',
|
||||
'watermark_position'
|
||||
];
|
||||
|
||||
$settings_value = array();
|
||||
$settings_value = array();
|
||||
|
||||
foreach ($settings_key as $key) {
|
||||
$settings_value[$key] = setting_value('visiosoft.module.advs::' . $key);
|
||||
}
|
||||
foreach ($settings_key as $key) {
|
||||
$settings_value[$key] = setting_value('visiosoft.module.advs::' . $key);
|
||||
}
|
||||
|
||||
|
||||
$fullImg = WaterMark::make($this->request->file('upload')->getRealPath());
|
||||
$fullImg = WaterMark::make($this->request->file('upload')->getRealPath());
|
||||
|
||||
if ($settings_value['image_resize_backend']) {
|
||||
$fullImg = $fullImg->resize(null, $settings_value['full_image_height'],
|
||||
function ($constraint) {
|
||||
if ($settings_value['image_resize_backend']) {
|
||||
$fullImg = $fullImg->resize(null, $settings_value['full_image_height'],
|
||||
function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
});
|
||||
}
|
||||
|
||||
$mdImg = WaterMark::make($this->request->file('upload')->getRealPath())
|
||||
->resize(null, $settings_value['medium_image_height'], function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
});
|
||||
}
|
||||
|
||||
$mdImg = WaterMark::make($this->request->file('upload')->getRealPath())
|
||||
->resize(null, $settings_value['medium_image_height'], function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
});
|
||||
|
||||
|
||||
if ($settings_value['add_canvas']) {
|
||||
if ($settings_value['add_canvas']) {
|
||||
|
||||
$fullImg->resizeCanvas(
|
||||
$settings_value['image_canvas_width'], $settings_value['image_canvas_height'],
|
||||
'center', false, 'fff'
|
||||
);
|
||||
$fullImg->resizeCanvas(
|
||||
$settings_value['image_canvas_width'], $settings_value['image_canvas_height'],
|
||||
'center', false, 'fff'
|
||||
);
|
||||
|
||||
$mdImg->resizeCanvas(
|
||||
$settings_value['medium_image_width'], $settings_value['medium_image_height'],
|
||||
'center', false, 'fff'
|
||||
);
|
||||
}
|
||||
$mdImg->resizeCanvas(
|
||||
$settings_value['medium_image_width'], $settings_value['medium_image_height'],
|
||||
'center', false, 'fff'
|
||||
);
|
||||
}
|
||||
|
||||
$image_types = array('full' => $fullImg, 'medium' => $mdImg);
|
||||
$image_types = array('full' => $fullImg, 'medium' => $mdImg);
|
||||
|
||||
foreach ($image_types as $key => $image) {
|
||||
foreach ($image_types as $key => $image) {
|
||||
|
||||
if ($settings_value['watermark_type'] == 'image') {
|
||||
if ($settings_value['watermark_type'] == 'image') {
|
||||
|
||||
if ($watermarkimage = $this->files->find($settings_value['watermark_image'])) {
|
||||
$watermark = WaterMark::make(app_storage_path() . '/files-module/local/' . $watermarkimage->path());
|
||||
$image->insert($watermark, $settings_value['watermark_position']);
|
||||
if ($watermarkimage = $this->files->find($settings_value['watermark_image'])) {
|
||||
$watermark = WaterMark::make(app_storage_path() . '/files-module/local/' . $watermarkimage->path());
|
||||
$image->insert($watermark, $settings_value['watermark_position']);
|
||||
}
|
||||
|
||||
} else {
|
||||
$v = "top";
|
||||
$h = "center";
|
||||
$w = $image->width() / 2;
|
||||
$h1 = $image->height() / 2;
|
||||
$font_size = $w / 20;
|
||||
$image->text($settings_value['watermark_text'], $w, $h1, function ($font) use ($v, $h, $font_size) {
|
||||
$font->file(public_path('Antonio-Bold.ttf'));
|
||||
$font->size($font_size);
|
||||
$font->align($h);
|
||||
$font->valign($v);
|
||||
});
|
||||
}
|
||||
if ($key === "full") {
|
||||
$fileName = $file->getAttributes()['name'];
|
||||
} else {
|
||||
$fileName = 'md-' . $file->getAttributes()['name'];
|
||||
|
||||
} else {
|
||||
$v = "top";
|
||||
$h = "center";
|
||||
$w = $image->width() / 2;
|
||||
$h1 = $image->height() / 2;
|
||||
$font_size = $w / 20;
|
||||
$image->text($settings_value['watermark_text'], $w, $h1, function ($font) use ($v, $h, $font_size) {
|
||||
$font->file(public_path('Antonio-Bold.ttf'));
|
||||
$font->size($font_size);
|
||||
$font->align($h);
|
||||
$font->valign($v);
|
||||
});
|
||||
$this->createFile($this->request->get('folder'), $fileName, $image);
|
||||
}
|
||||
$image->save(app_storage_path() . '/files-module/local/images/' . $fileName);
|
||||
}
|
||||
if ($key === "full") {
|
||||
$fileName = $file->getAttributes()['name'];
|
||||
} else {
|
||||
$fileName = 'md-' . $file->getAttributes()['name'];
|
||||
|
||||
$this->createFile($this->request->get('folder'),$fileName,$image);
|
||||
}
|
||||
$image->save(app_storage_path() . '/files-module/local/images/' . $fileName);
|
||||
}
|
||||
return $this->response->json($file->getAttributes());
|
||||
}
|
||||
@ -173,7 +184,7 @@ class UploadController extends AdminController
|
||||
return response()->json(['status' => 'error']);
|
||||
}
|
||||
|
||||
public function createFile($folder, $filename, $image)
|
||||
public function createFile($folder, $filename, $image = null)
|
||||
{
|
||||
$this->files->create([
|
||||
'folder_id' => $folder,
|
||||
|
||||
@ -1,2 +1,9 @@
|
||||
<?xml version="1.0"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="512px" height="512px"><g><g id="Address"><path d="M13,10H9a1,1,0,0,0-1,1v4a1,1,0,0,0,1,1h4a1,1,0,0,0,1-1V11A1,1,0,0,0,13,10Zm-1,4H10V12h2Z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="M17,16h4a1,1,0,0,0,1-1V11a1,1,0,0,0-1-1H17a1,1,0,0,0-1,1v4A1,1,0,0,0,17,16Zm1-4h2v2H18Z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="M25,16h4a1,1,0,0,0,1-1V11a1,1,0,0,0-1-1H25a1,1,0,0,0-1,1v4A1,1,0,0,0,25,16Zm1-4h2v2H26Z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="M33,16h4a1,1,0,0,0,1-1V11a1,1,0,0,0-1-1H33a1,1,0,0,0-1,1v4A1,1,0,0,0,33,16Zm1-4h2v2H34Z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="M41,16h4a1,1,0,0,0,1-1V11a1,1,0,0,0-1-1H41a1,1,0,0,0-1,1v4A1,1,0,0,0,41,16Zm1-4h2v2H42Z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="M13,18H9a1,1,0,0,0-1,1v4a1,1,0,0,0,1,1h4a1,1,0,0,0,1-1V19A1,1,0,0,0,13,18Zm-1,4H10V20h2Z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="M13,26H9a1,1,0,0,0-1,1v4a1,1,0,0,0,1,1h4a1,1,0,0,0,1-1V27A1,1,0,0,0,13,26Zm-1,4H10V28h2Z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="M13,34H9a1,1,0,0,0-1,1v4a1,1,0,0,0,1,1h4a1,1,0,0,0,1-1V35A1,1,0,0,0,13,34Zm-1,4H10V36h2Z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="M13,42H9a1,1,0,0,0-1,1v4a1,1,0,0,0,1,1h4a1,1,0,0,0,1-1V43A1,1,0,0,0,13,42Zm-1,4H10V44h2Z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="M17,24h4a1,1,0,0,0,1-1V19a1,1,0,0,0-1-1H17a1,1,0,0,0-1,1v4A1,1,0,0,0,17,24Zm1-4h2v2H18Z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="M25,24h4a1,1,0,0,0,1-1V19a1,1,0,0,0-1-1H25a1,1,0,0,0-1,1v4A1,1,0,0,0,25,24Zm1-4h2v2H26Z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="M33,24h4a1,1,0,0,0,1-1V19a1,1,0,0,0-1-1H33a1,1,0,0,0-1,1v4A1,1,0,0,0,33,24Zm1-4h2v2H34Z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="M41,24h4a1,1,0,0,0,1-1V19a1,1,0,0,0-1-1H41a1,1,0,0,0-1,1v4A1,1,0,0,0,41,24Zm1-4h2v2H42Z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="M50,28.051V8h1a1,1,0,0,0,1-1V3a1,1,0,0,0-1-1H3A1,1,0,0,0,2,3V7A1,1,0,0,0,3,8H4V53a1,1,0,0,0,1,1H41.751a72.309,72.309,0,0,0,6.542,7.707,1,1,0,0,0,1.414,0C50.209,61.205,62,49.318,62,41A13.008,13.008,0,0,0,50,28.051ZM4,4H50V6H4ZM6,8H48V28.051A13.008,13.008,0,0,0,36,41a11.625,11.625,0,0,0,.441,3H36V27a1,1,0,0,0-1-1H19a1,1,0,0,0-1,1V44H17a1,1,0,0,0-1,1v3a1,1,0,0,0-1,1v3H6ZM34,44H32V31a1,1,0,0,0-1-1H23a1,1,0,0,0-1,1V44H20V28H34Zm-4,0H24V32h6Zm7.109,2c.265.665.572,1.333.906,2H18V46ZM17,52V50H39.1c.4.677.817,1.346,1.251,2Zm32,7.558C46.466,56.869,38,47.4,38,41a11,11,0,0,1,22,0C60,47.4,51.534,56.869,49,59.558Z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="M49,32a9,9,0,1,0,9,9A9.011,9.011,0,0,0,49,32Zm0,16a7,7,0,1,1,7-7A7.008,7.008,0,0,1,49,48Z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/></g></g> </svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 22 22">
|
||||
<g id="address" transform="translate(-551 -13941)">
|
||||
<rect id="Rectangle_2604" data-name="Rectangle 2604" width="22" height="22" transform="translate(551 13941)" fill="#fff" opacity="0"/>
|
||||
<g id="Group_3507" data-name="Group 3507" transform="translate(69.891 90.662)">
|
||||
<path id="address_1_" data-name="address (1)" d="M7.688,17.24v1.95l-.471-.381a31.6,31.6,0,0,1-3.563-3.484C1.229,12.542,0,10.044,0,7.9V7.687a7.688,7.688,0,0,1,15.376,0V7.9c0,.18-.01.363-.027.548l-1.5-1.372A6.188,6.188,0,0,0,1.5,7.687V7.9c0,3.623,4.668,8.009,6.188,9.341Zm0-12.741A3.188,3.188,0,1,1,4.5,7.687,3.191,3.191,0,0,1,7.688,4.5Zm0,1.5A1.688,1.688,0,1,0,9.376,7.687,1.69,1.69,0,0,0,7.688,6Z" transform="translate(483 13852.001)" fill="#505050"/>
|
||||
<path id="address_2_" data-name="address (2)" d="M53.095,54.693a.756.756,0,0,1-1.068.048l-.095-.087v2.5a2.132,2.132,0,0,1-2.129,2.13H45.554a2.132,2.132,0,0,1-2.129-2.13V54.689l-.057.052a.756.756,0,1,1-1.02-1.116l3.9-3.568a2.133,2.133,0,0,1,2.893,0l2.5,2.286a.757.757,0,0,1,.078.071l1.324,1.211a.756.756,0,0,1,.048,1.068Zm-2.675-1.421-2.3-2.1a.628.628,0,0,0-.852,0l-2.334,2.133v3.85a.618.618,0,0,0,.617.618H49.8a.618.618,0,0,0,.616-.618Zm0,0" transform="translate(448.87 13812.108)" fill="#505050"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 1.3 KiB |
@ -1,2 +1,12 @@
|
||||
<?xml version="1.0"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="512px" viewBox="0 0 512 512" width="512px"><g><path d="m512 256c0-141.488281-114.496094-256-256-256-141.488281 0-256 114.496094-256 256 0 140.234375 113.539062 256 256 256 141.875 0 256-115.121094 256-256zm-256-226c124.617188 0 226 101.382812 226 226 0 45.585938-13.558594 89.402344-38.703125 126.515625-100.96875-108.609375-273.441406-108.804687-374.59375 0-25.144531-37.113281-38.703125-80.929687-38.703125-126.515625 0-124.617188 101.382812-226 226-226zm-168.585938 376.5c89.773438-100.695312 247.421876-100.671875 337.167969 0-90.074219 100.773438-247.054687 100.804688-337.167969 0zm0 0" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m256 271c49.625 0 90-40.375 90-90v-30c0-49.625-40.375-90-90-90s-90 40.375-90 90v30c0 49.625 40.375 90 90 90zm-60-120c0-33.085938 26.914062-60 60-60s60 26.914062 60 60v30c0 33.085938-26.914062 60-60 60s-60-26.914062-60-60zm0 0" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/></g> </svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 22 22">
|
||||
<g id="profile" transform="translate(-551 -13874)">
|
||||
<g id="Group_3523" data-name="Group 3523">
|
||||
<rect id="Rectangle_2607" data-name="Rectangle 2607" width="22" height="22" transform="translate(551 13874)" fill="#fff" opacity="0"/>
|
||||
<g id="social" transform="translate(552.5 13875.662)">
|
||||
<g id="Group_2839" data-name="Group 2839" transform="translate(0)">
|
||||
<path id="Path_4053" data-name="Path 4053" d="M19.346,16.619a.758.758,0,0,0-1.483.309.792.792,0,0,1-.16.664.77.77,0,0,1-.606.288H2.3a.77.77,0,0,1-.606-.288.791.791,0,0,1-.16-.664A8.371,8.371,0,0,1,9.5,10.3q.1,0,.2,0t.2,0A8.334,8.334,0,0,1,16.63,14a.758.758,0,1,0,1.259-.844,9.855,9.855,0,0,0-5.106-3.88,5.152,5.152,0,1,0-6.167,0A9.854,9.854,0,0,0,.05,16.619,2.3,2.3,0,0,0,2.3,19.395H17.1a2.3,2.3,0,0,0,2.25-2.776ZM6.061,5.152A3.637,3.637,0,1,1,9.882,8.784l-.184,0-.183,0A3.641,3.641,0,0,1,6.061,5.152Z" transform="translate(0)" fill="#505050"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.0 KiB |
@ -1,2 +1,14 @@
|
||||
<?xml version="1.0"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="512px" viewBox="0 0 512 512" width="512px"><g><g id="Outline"><path d="m56 208a24.027 24.027 0 0 1 24-24h88v-16h-88a40.045 40.045 0 0 0 -40 40v48h16z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m244 88a28 28 0 1 0 28 28 28.032 28.032 0 0 0 -28-28zm0 40a12 12 0 1 1 12-12 12.013 12.013 0 0 1 -12 12z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m488 16h-169.353a48.246 48.246 0 0 0 -41.16 23.305l-10.017 16.695h-59.47a24.028 24.028 0 0 0 -24 24v144a24.027 24.027 0 0 0 24 24h48v32a8 8 0 0 0 13.121 6.146l45.779-38.146h109.1a24.027 24.027 0 0 0 24-24v-113.554a85.486 85.486 0 0 0 44.533-23.665l1.124-1.124a8 8 0 0 0 2.343-5.657v-56a8 8 0 0 0 -8-8zm-56 208a8.009 8.009 0 0 1 -8 8h-112a8 8 0 0 0 -5.121 1.854l-34.879 29.065v-22.919a8 8 0 0 0 -8-8h-56a8.009 8.009 0 0 1 -8-8v-11.471l71.774-43.064 67.788 45.191a8 8 0 0 0 8.016.5l43.847-21.924 40.575 27.049zm0-22.948-35.562-23.708a8 8 0 0 0 -8.016-.5l-43.847 21.924-68.137-45.425a8 8 0 0 0 -8.554-.2l-67.884 40.727v-113.87a8.009 8.009 0 0 1 8-8h124.687l-26.2 26.2a27.8 27.8 0 0 0 39.313 39.315l39.227-39.228a85.82 85.82 0 0 0 46.621 13.713c.118 0 .234-.008.352-.009zm48-124.394a70.106 70.106 0 0 1 -87.239 7.568l-4.323-2.882a8 8 0 0 0 -10.095 1l-43.857 43.856a11.858 11.858 0 0 1 -15.424 1.1 11.8 11.8 0 0 1 -1.262-17.782l39.857-39.858 16-16-11.314-11.317-13.657 13.657h-62.556l5.077-8.463a32.164 32.164 0 0 1 27.44-15.537h161.353z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m472 272h-144a24.028 24.028 0 0 0 -24 24v44.686l-29.657 29.657a8 8 0 0 0 5.657 13.657h24v8a24.028 24.028 0 0 0 24 24h144a24.028 24.028 0 0 0 24-24v-96a24.028 24.028 0 0 0 -24-24zm8 120a8.009 8.009 0 0 1 -8 8h-144a8.009 8.009 0 0 1 -8-8v-16a8 8 0 0 0 -8-8h-12.687l18.344-18.343a8 8 0 0 0 2.343-5.657v-48a8.009 8.009 0 0 1 8-8h144a8.009 8.009 0 0 1 8 8z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m336 304h80v16h-80z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m432 304h32v16h-32z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m336 368h128v16h-128z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m336 336h128v16h-128z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m72 200h16v16h-16z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m104 200h16v16h-16z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m136 200h16v16h-16z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m72 232h96v16h-96z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m40 416h144a24.028 24.028 0 0 0 24-24v-32h24a8 8 0 0 0 5.657-13.657l-29.657-29.657v-20.686a24.028 24.028 0 0 0 -24-24h-144a24.028 24.028 0 0 0 -24 24v96a24.028 24.028 0 0 0 24 24zm-8-120a8.009 8.009 0 0 1 8-8h144a8.009 8.009 0 0 1 8 8v24a8 8 0 0 0 2.343 5.657l18.344 18.343h-12.687a8 8 0 0 0 -8 8v40a8.009 8.009 0 0 1 -8 8h-144a8.009 8.009 0 0 1 -8-8z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m48 304h16v16h-16z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m48 336h16v16h-16z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m48 368h16v16h-16z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m80 304h96v16h-96z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m80 336h96v16h-96z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m80 368h96v16h-96z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/><path d="m424 432h-140.687a35.08 35.08 0 0 0 -24.97 10.343 19.185 19.185 0 0 1 -13.656 5.657h-41.374a19.185 19.185 0 0 1 -13.656-5.657 35.08 35.08 0 0 0 -24.97-10.343h-140.687a8 8 0 0 0 -8 8v24a32.036 32.036 0 0 0 32 32h352a32.036 32.036 0 0 0 32-32v-24a8 8 0 0 0 -8-8zm-8 32a16.019 16.019 0 0 1 -16 16h-352a16.019 16.019 0 0 1 -16-16v-16h132.687a19.185 19.185 0 0 1 13.656 5.657 35.08 35.08 0 0 0 24.97 10.343h41.374a35.08 35.08 0 0 0 24.97-10.343 19.185 19.185 0 0 1 13.656-5.657h132.687z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#707070"/></g></g> </svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 22 22">
|
||||
<g id="ads" transform="translate(-551 -13906)">
|
||||
<rect id="Rectangle_2615" data-name="Rectangle 2615" width="22" height="22" transform="translate(551 13906)" fill="#fff" opacity="0"/>
|
||||
<g id="XMLID_1531_" transform="translate(551.73 13904.936)">
|
||||
<g id="XMLID_49_" transform="translate(0 2.383)">
|
||||
<path id="XMLID_317_" d="M14.385,84.833a.425.425,0,0,0-.737.425l1.74,3.014a.6.6,0,0,1-1.031.6L9.083,79.734a.6.6,0,0,1,1.031-.6l1.62,2.805a.425.425,0,0,0,.737-.425l-1.62-2.805a1.446,1.446,0,0,0-2.677.971L2.811,86.2,1.4,87.016a2.807,2.807,0,0,0,.677,5.142,2.822,2.822,0,0,0,.731.1,2.771,2.771,0,0,0,.524-.05L7.1,96a1.515,1.515,0,1,0,2.152-2.133l-.607-.613.417-.241a1.268,1.268,0,0,0,.267-1.991l-.488-.492,5.107-.849a1.446,1.446,0,0,0,2.179-1.833ZM1.113,90.424a1.958,1.958,0,0,1,.716-2.672l1.1-.638L4.891,90.5l-1.105.638a1.958,1.958,0,0,1-2.672-.716Zm7.718,4.6A.665.665,0,0,1,7.7,95.4L4.21,91.877,5.4,91.19l3.245,3.274A.66.66,0,0,1,8.832,95.021Zm-.11-3.4a.418.418,0,0,1-.088.656l-.61.352L6.352,90.943,7.81,90.7ZM5.692,90.19,3.606,86.576l4.963-6.033,4.83,8.365Z" transform="translate(0 -76.99)" fill="#505050" stroke="#505050" stroke-width="0.4"/>
|
||||
<path id="XMLID_321_" d="M.2,2.571a.425.425,0,0,0,.588-.128L2.306.655A.425.425,0,0,0,1.591.2L.068,1.983A.425.425,0,0,0,.2,2.571Z" transform="translate(12.502 0.371) rotate(-9)" fill="#505050" stroke="#505050" stroke-width="0.4"/>
|
||||
<path id="XMLID_322_" d="M384.809,238.193h-3.4a.427.427,0,0,0,0,.851h3.4a.427.427,0,0,0,0-.851Z" transform="translate(-364.816 -230.38)" fill="#505050" stroke="#505050" stroke-width="0.4"/>
|
||||
<path id="XMLID_326_" d="M297.524,195.768a.425.425,0,1,0-.3-.125A.428.428,0,0,0,297.524,195.768Z" transform="translate(-284.465 -188.944)" fill="#505050" stroke="#505050" stroke-width="0.4"/>
|
||||
<path id="XMLID_321_2" data-name="XMLID_321_" d="M.2,3.31a.425.425,0,0,0,.588-.128L2.465.655A.425.425,0,0,0,1.75.2L.068,2.722A.425.425,0,0,0,.2,3.31Z" transform="translate(16.425 2.187) rotate(30)" fill="#505050" stroke="#505050" stroke-width="0.4"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 2.1 KiB |
@ -92,7 +92,7 @@
|
||||
<p class="mb-0 mr-4">
|
||||
{{ trans('visiosoft.module.profile::message.disable_account') }}
|
||||
</p>
|
||||
<a href="{{ url_route("visiosoft.module.profile::profile_close_account") }}" class="btn btn-danger text-white">
|
||||
<a href="{{ url_route("visiosoft.module.profile::profile_close_account") }}" class="btn btn-danger account-freeze text-white">
|
||||
{{ trans("visiosoft.module.profile::field.disable_account.name") }}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@ -109,8 +109,6 @@ class DatabaseSeeder extends Seeder
|
||||
]
|
||||
);
|
||||
|
||||
DB::table('files_files')->truncate();
|
||||
|
||||
$repository = "https://raw.githubusercontent.com/openclassify/Openclassify-Demo-Data/master/";
|
||||
file_put_contents(storage_path('advs.sql'), fopen($repository . "advs.sql", 'r'));
|
||||
file_put_contents(storage_path('settings.sql'), fopen($repository . "settings.sql", 'r'));
|
||||
@ -156,5 +154,41 @@ class DatabaseSeeder extends Seeder
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
//Favicon Folder
|
||||
if (is_null($this->folders->findBy('slug', 'favicon'))) {
|
||||
$disk = $this->disks->findBySlug('local');
|
||||
|
||||
$this->folders->create([
|
||||
'en' => [
|
||||
'name' => 'Favicon',
|
||||
'description' => 'A folder for Favicon.',
|
||||
],
|
||||
'slug' => 'favicon',
|
||||
'disk' => $disk,
|
||||
'allowed_types' => [
|
||||
'ico','png',
|
||||
],
|
||||
]);
|
||||
};
|
||||
|
||||
|
||||
//Create Ads Documents Folder
|
||||
if (!$this->folders->findBySlug('ads_documents')) {
|
||||
$disk = $this->disks->findBySlug('local');
|
||||
|
||||
$this->folders->create([
|
||||
'en' => [
|
||||
'name' => 'Ads Documents',
|
||||
'description' => 'A folder for Ads Documents.',
|
||||
],
|
||||
'slug' => 'ads_documents',
|
||||
'disk' => $disk,
|
||||
'allowed_types' => [
|
||||
'pdf', 'doc', 'docx', 'xls', 'xlsx',
|
||||
],
|
||||
]);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user