mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-13 00:36:04 -06:00
Merge branch 'master' of https://github.com/openclassify/openclassify
This commit is contained in:
commit
97f97c4b6d
@ -23,6 +23,7 @@ return [
|
|||||||
'latest-limit',
|
'latest-limit',
|
||||||
'popular_ads_limit',
|
'popular_ads_limit',
|
||||||
'default_view_type',
|
'default_view_type',
|
||||||
|
'price_area_hidden',
|
||||||
'hide_listing_standard_price',
|
'hide_listing_standard_price',
|
||||||
'hide_zero_price',
|
'hide_zero_price',
|
||||||
'auto_approve',
|
'auto_approve',
|
||||||
@ -67,7 +68,7 @@ return [
|
|||||||
'user' => [
|
'user' => [
|
||||||
'title' => 'visiosoft.module.advs::section.user',
|
'title' => 'visiosoft.module.advs::section.user',
|
||||||
'fields' => [
|
'fields' => [
|
||||||
'register_email_field',
|
'register_email_field'
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'filter' => [
|
'filter' => [
|
||||||
@ -76,6 +77,12 @@ return [
|
|||||||
'hide_price_filter', 'hide_date_filter', 'hide_photo_filter', 'hide_map_filter', 'user_filter_limit'
|
'hide_price_filter', 'hide_date_filter', 'hide_photo_filter', 'hide_map_filter', 'user_filter_limit'
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
'translations' => [
|
||||||
|
'title' => 'visiosoft.module.advs::section.translations',
|
||||||
|
'fields' => [
|
||||||
|
'override_text',
|
||||||
|
],
|
||||||
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@ -153,6 +153,12 @@ return [
|
|||||||
'mode' => 'checkbox'
|
'mode' => 'checkbox'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
'price_area_hidden' => [
|
||||||
|
'type' => 'anomaly.field_type.boolean',
|
||||||
|
'config' => [
|
||||||
|
'default_value' => false,
|
||||||
|
]
|
||||||
|
],
|
||||||
'enabled_currencies' => [
|
'enabled_currencies' => [
|
||||||
'bind' => 'streams::currencies.enabled',
|
'bind' => 'streams::currencies.enabled',
|
||||||
'env' => 'ADV_ENABLED_CURRENCIES',
|
'env' => 'ADV_ENABLED_CURRENCIES',
|
||||||
@ -339,4 +345,9 @@ return [
|
|||||||
'mode' => 'checkbox'
|
'mode' => 'checkbox'
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
'override_text' => [
|
||||||
|
'type' => 'anomaly.field_type.tags',
|
||||||
|
'bind' => 'override_text',
|
||||||
|
'env' => 'OVERRIDE_TEXT',
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@ -42,4 +42,5 @@ return [
|
|||||||
'replicate' => 'Replicate',
|
'replicate' => 'Replicate',
|
||||||
'fast_create' => 'Fast create',
|
'fast_create' => 'Fast create',
|
||||||
'publish' => 'Publish',
|
'publish' => 'Publish',
|
||||||
|
'import' => 'Import',
|
||||||
];
|
];
|
||||||
|
|||||||
@ -55,4 +55,5 @@ return [
|
|||||||
'option_configuration' => [
|
'option_configuration' => [
|
||||||
'title' => 'Configuration',
|
'title' => 'Configuration',
|
||||||
],
|
],
|
||||||
|
'translations' => 'Translations',
|
||||||
];
|
];
|
||||||
|
|||||||
@ -126,7 +126,9 @@ return [
|
|||||||
'market_place' => [
|
'market_place' => [
|
||||||
'name' => 'Market Place',
|
'name' => 'Market Place',
|
||||||
],
|
],
|
||||||
|
'price_area_hidden' => [
|
||||||
|
'name' => 'Price Area Hidden',
|
||||||
|
],
|
||||||
'hide_price_filter' => [
|
'hide_price_filter' => [
|
||||||
'name' => 'Hide Price Filter',
|
'name' => 'Hide Price Filter',
|
||||||
],
|
],
|
||||||
@ -205,4 +207,8 @@ return [
|
|||||||
'name' => 'Show Post Ad Agreement',
|
'name' => 'Show Post Ad Agreement',
|
||||||
'instructions' => 'Turn this on if you want to display a privacy policy agreement on the ad creation page',
|
'instructions' => 'Turn this on if you want to display a privacy policy agreement on the ad creation page',
|
||||||
],
|
],
|
||||||
|
'override_text' => [
|
||||||
|
'name' => 'Override Text',
|
||||||
|
'instructions' => 'Old Value:New Value'
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@ -38,5 +38,7 @@ return [
|
|||||||
'new_options_configuration' => 'Yeni Seçenek yapılandırması',
|
'new_options_configuration' => 'Yeni Seçenek yapılandırması',
|
||||||
'new_option_configuration' => 'Yeni Seçenek yapılandırması',
|
'new_option_configuration' => 'Yeni Seçenek yapılandırması',
|
||||||
'create_configurations' => 'Konfigürasyonlar Oluşturun',
|
'create_configurations' => 'Konfigürasyonlar Oluşturun',
|
||||||
'replicate' => 'Tekrarlamak',
|
'replicate' => 'Tekrarla',
|
||||||
|
'publish' => 'Yayınla',
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|||||||
@ -307,6 +307,12 @@ return [
|
|||||||
'listing_details' => 'Liste Ayrıntıları',
|
'listing_details' => 'Liste Ayrıntıları',
|
||||||
'preview' => 'Ön İzleme',
|
'preview' => 'Ön İzleme',
|
||||||
'congratulations' => 'Tebrikler',
|
'congratulations' => 'Tebrikler',
|
||||||
|
'ad_desc' => 'İlan Açıklaması',
|
||||||
|
'upload_photos' => 'Resim Yükle',
|
||||||
|
'additional_fields' => 'Özel Alanlar',
|
||||||
|
'ad_location' => 'Lokasyon Ekle',
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'free' => 'Bedava',
|
'free' => 'Bedava',
|
||||||
'ad_date' => 'İlan Tarihi',
|
'ad_date' => 'İlan Tarihi',
|
||||||
|
|||||||
@ -27,4 +27,6 @@ return [
|
|||||||
'ad_doesnt_exist' => "Bu İlan mevcut değil!",
|
'ad_doesnt_exist' => "Bu İlan mevcut değil!",
|
||||||
'select_location_error' => "Lütfen haritada bir yer seçin!",
|
'select_location_error' => "Lütfen haritada bir yer seçin!",
|
||||||
'this_ad_is_not_valid_anymore' => "Bu ürün veya ilan artık geçerli değil!",
|
'this_ad_is_not_valid_anymore' => "Bu ürün veya ilan artık geçerli değil!",
|
||||||
|
'approve_status_change' => "İlanınızın Durumu Etkin Olarak Ayarlandı!",
|
||||||
|
'passive_status_change' => "İlanınızın Durumu Pasif Olarak Ayarlandı!",
|
||||||
];
|
];
|
||||||
|
|||||||
@ -90,7 +90,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row form-group select-price">
|
<div class="row form-group select-price
|
||||||
|
{{ setting_value('visiosoft.module.advs::price_area_hidden') ? 'hidden' }}">
|
||||||
|
|
||||||
<label class="col-sm-2 col-xs-12">
|
<label class="col-sm-2 col-xs-12">
|
||||||
{{ form.fields.price.label|raw }}
|
{{ form.fields.price.label|raw }}
|
||||||
<span class="required">*</span>
|
<span class="required">*</span>
|
||||||
@ -169,7 +171,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h5 class="mt-5 pb-1 border-bottom">{{ trans('visiosoft.module.advs::field.upload_photos') }}</h5>
|
<h5 class="mt-5 pb-1 border-bottom">
|
||||||
|
{{ trans('visiosoft.module.advs::field.upload_photos') }}
|
||||||
|
</h5>
|
||||||
<div class="bg-light p-4">
|
<div class="bg-light p-4">
|
||||||
<div class="row form-group images">
|
<div class="row form-group images">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
@ -178,12 +182,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{% if count(custom_fields) %}
|
||||||
<h5 class="mt-5 pb-1 border-bottom">
|
<h5 class="mt-5 pb-1 border-bottom">
|
||||||
{{ trans('visiosoft.module.advs::field.additional_fields') }}
|
{{ trans('visiosoft.module.advs::field.additional_fields') }}
|
||||||
</h5>
|
</h5>
|
||||||
<div class="bg-light p-4">
|
<div class="bg-light p-4">
|
||||||
{{ addBlock('new-ad/other-fields',{'custom_fields':custom_fields})|raw }}
|
{{ addBlock('new-ad/other-fields',{'custom_fields':custom_fields})|raw }}
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<h5 class="mt-5 pb-1 border-bottom">
|
<h5 class="mt-5 pb-1 border-bottom">
|
||||||
{{ trans('visiosoft.module.advs::field.ad_location') }}
|
{{ trans('visiosoft.module.advs::field.ad_location') }}
|
||||||
|
|||||||
19
addons/default/visiosoft/advs-module/src/Adv/AdvsImport.php
Normal file
19
addons/default/visiosoft/advs-module/src/Adv/AdvsImport.php
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
namespace Visiosoft\AdvsModule\Adv;
|
||||||
|
|
||||||
|
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
use Maatwebsite\Excel\Concerns\ToModel;
|
||||||
|
|
||||||
|
class AdvsImport implements ToModel
|
||||||
|
{
|
||||||
|
public function model(array $row)
|
||||||
|
{
|
||||||
|
return new AdvModel([
|
||||||
|
'name' => $row[0],
|
||||||
|
'slug' => Str::slug($row[0]),
|
||||||
|
'price' => $row[1],
|
||||||
|
'currency' => $row[2],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -25,13 +25,7 @@ class AdvTableButtons
|
|||||||
return ($entry->getStatus() == 'approved') ? "danger" : "success";
|
return ($entry->getStatus() == 'approved') ? "danger" : "success";
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
'edit',
|
||||||
'edit' => [
|
|
||||||
'href' => function (EntryModel $entry) {
|
|
||||||
return route('visiosoft.module.advs::edit_adv', ['id' => $entry->getId()]);
|
|
||||||
},
|
|
||||||
'text' => "<font class='hidden-xs-down'>" . trans('streams::button.edit') . "</font>"
|
|
||||||
],
|
|
||||||
'settings' => [
|
'settings' => [
|
||||||
'text' => false,
|
'text' => false,
|
||||||
'href' => false,
|
'href' => false,
|
||||||
|
|||||||
@ -4,9 +4,6 @@ use Anomaly\Streams\Platform\Database\Seeder\Seeder;
|
|||||||
|
|
||||||
class AdvsModuleSeeder extends Seeder
|
class AdvsModuleSeeder extends Seeder
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* Run the seeder.
|
|
||||||
*/
|
|
||||||
public function run()
|
public function run()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
@ -47,10 +47,18 @@ class AdvsModuleServiceProvider extends AddonServiceProvider
|
|||||||
],
|
],
|
||||||
'admin/advs-users/choose/{advId}' => 'Visiosoft\AdvsModule\Http\Controller\Admin\AdvsController@choose',
|
'admin/advs-users/choose/{advId}' => 'Visiosoft\AdvsModule\Http\Controller\Admin\AdvsController@choose',
|
||||||
'admin/class/actions/{id}/{type}' => 'Visiosoft\AdvsModule\Http\Controller\Admin\AdvsController@actions',
|
'admin/class/actions/{id}/{type}' => 'Visiosoft\AdvsModule\Http\Controller\Admin\AdvsController@actions',
|
||||||
|
|
||||||
|
|
||||||
|
//Excel
|
||||||
'admin/advs/export' => [
|
'admin/advs/export' => [
|
||||||
'as' => 'advs::exportAdvs',
|
'as' => 'advs::exportAdvs',
|
||||||
'uses' => 'Visiosoft\AdvsModule\Http\Controller\Admin\AdvsController@exportAdvs',
|
'uses' => 'Visiosoft\AdvsModule\Http\Controller\Admin\AdvsController@exportAdvs',
|
||||||
],
|
],
|
||||||
|
'admin/advs/import' => [
|
||||||
|
'as' => 'visiosoft.module.advs::import.advs',
|
||||||
|
'uses' => 'Visiosoft\AdvsModule\Http\Controller\Admin\ExcelController@import',
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
// advsController
|
// advsController
|
||||||
'advs/list' => [
|
'advs/list' => [
|
||||||
@ -264,6 +272,11 @@ class AdvsModuleServiceProvider extends AddonServiceProvider
|
|||||||
'title' => 'visiosoft.module.advs::button.export',
|
'title' => 'visiosoft.module.advs::button.export',
|
||||||
'href' => route('advs::exportAdvs'),
|
'href' => route('advs::exportAdvs'),
|
||||||
'page' => 'visiosoft.module.advs'
|
'page' => 'visiosoft.module.advs'
|
||||||
|
],
|
||||||
|
'import' => [
|
||||||
|
'title' => 'visiosoft.module.advs::button.import',
|
||||||
|
'href' => route('visiosoft.module.advs::import.advs'),
|
||||||
|
'page' => 'visiosoft.module.advs'
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,41 @@
|
|||||||
|
<?php namespace Visiosoft\AdvsModule\Http\Controller\Admin;
|
||||||
|
|
||||||
|
use Anomaly\FilesModule\File\Contract\FileRepositoryInterface;
|
||||||
|
use Anomaly\Streams\Platform\Http\Controller\AdminController;
|
||||||
|
use Anomaly\Streams\Platform\Ui\Form\FormBuilder;
|
||||||
|
use Maatwebsite\Excel\Facades\Excel;
|
||||||
|
use Visiosoft\AdvsModule\Adv\AdvsImport;
|
||||||
|
|
||||||
|
class ExcelController extends AdminController
|
||||||
|
{
|
||||||
|
public function import(FormBuilder $builder, FileRepositoryInterface $fileRepository)
|
||||||
|
{
|
||||||
|
if (request()->action == "save" and $file = $fileRepository->find(request()->file)) {
|
||||||
|
if ($file->extension === 'xls' || $file->extension === 'xlsx') {
|
||||||
|
$pathToFolder = "/storage/streams/default/files-module/local/ads_excel/";
|
||||||
|
Excel::import(new AdvsImport(), base_path() . $pathToFolder . $file->name);
|
||||||
|
$this->messages->success(trans('streams::message.create_success', ['name' => trans('module::addon.title')]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Form Render
|
||||||
|
$builder->setFields([
|
||||||
|
'file' => [
|
||||||
|
"type" => "anomaly.field_type.file",
|
||||||
|
"config" => [
|
||||||
|
'folders' => ["ads_excel"],
|
||||||
|
'mode' => 'upload'
|
||||||
|
]
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
$builder->setActions([
|
||||||
|
'save'
|
||||||
|
]);
|
||||||
|
|
||||||
|
$builder->setOptions([
|
||||||
|
'redirect' => route('visiosoft.module.advs::admin_advs')
|
||||||
|
]);
|
||||||
|
|
||||||
|
return $builder->render();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -32,7 +32,7 @@ new Promise(function (resolve, reject) {
|
|||||||
function getCities(country) {
|
function getCities(country) {
|
||||||
crudAjax('id=' + country, '/ajax/getCities', 'POST', function (callback) {
|
crudAjax('id=' + country, '/ajax/getCities', 'POST', function (callback) {
|
||||||
cities = callback;
|
cities = callback;
|
||||||
$('select[name="default_city"]').html("<option>" + pick_option + "</option>");
|
$('select[name="default_city"]').html("<option value=''>" + pick_option + "</option>");
|
||||||
$.each(cities, function (index, value) {
|
$.each(cities, function (index, value) {
|
||||||
$('select[name="default_city"]').append("<option value='" + value.id + "'>" + value.name + "</option>");
|
$('select[name="default_city"]').append("<option value='" + value.id + "'>" + value.name + "</option>");
|
||||||
});
|
});
|
||||||
@ -42,7 +42,7 @@ function getCities(country) {
|
|||||||
function getDistricts(city) {
|
function getDistricts(city) {
|
||||||
crudAjax('id=' + city, '/ajax/getDistricts', 'POST', function (callback) {
|
crudAjax('id=' + city, '/ajax/getDistricts', 'POST', function (callback) {
|
||||||
cities = callback;
|
cities = callback;
|
||||||
$('select[name="default_district"]').html("<option>" + pick_option + "</option>");
|
$('select[name="default_district"]').html("<option> value=''" + pick_option + "</option>");
|
||||||
$.each(cities, function (index, value) {
|
$.each(cities, function (index, value) {
|
||||||
$('select[name="default_district"]').append("<option value='" + value.id + "'>" + value.name + "</option>");
|
$('select[name="default_district"]').append("<option value='" + value.id + "'>" + value.name + "</option>");
|
||||||
});
|
});
|
||||||
@ -52,7 +52,7 @@ function getDistricts(city) {
|
|||||||
function getNeighborhoods(district) {
|
function getNeighborhoods(district) {
|
||||||
crudAjax('id=' + district, '/ajax/getNeighborhoods', 'POST', function (callback) {
|
crudAjax('id=' + district, '/ajax/getNeighborhoods', 'POST', function (callback) {
|
||||||
cities = callback;
|
cities = callback;
|
||||||
$('select[name="default_neighborhood"]').html("<option>" + pick_option + "</option>");
|
$('select[name="default_neighborhood"]').html("<option value=''>" + pick_option + "</option>");
|
||||||
$.each(cities, function (index, value) {
|
$.each(cities, function (index, value) {
|
||||||
$('select[name="default_neighborhood"]').append("<option value='" + value.id + "'>" + value.name + "</option>");
|
$('select[name="default_neighborhood"]').append("<option value='" + value.id + "'>" + value.name + "</option>");
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1,3 +1,8 @@
|
|||||||
|
{% set folders = entries('files','folders').whereIn('slug',field_type.configGet('folders')).get() %}
|
||||||
|
{% set allowed_types = {} %}
|
||||||
|
{% for mimes in folders.pluck('allowed_types.value').all() %}
|
||||||
|
{% set allowed_types = allowed_types|merge(mimes) %}
|
||||||
|
{% endfor %}
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="dropzone"
|
<div class="dropzone"
|
||||||
data-folder="1"
|
data-folder="1"
|
||||||
@ -8,7 +13,7 @@
|
|||||||
data-uploading="{{ trans('visiosoft.field_type.media::message.uploading') }}"
|
data-uploading="{{ trans('visiosoft.field_type.media::message.uploading') }}"
|
||||||
data-overwrite="{{ trans('anomaly.field_type.file::message.overwrite') }}"
|
data-overwrite="{{ trans('anomaly.field_type.file::message.overwrite') }}"
|
||||||
data-max-parallel="{{ setting_value('anomaly.module.files::max_parallel_uploads', 3) }}"
|
data-max-parallel="{{ setting_value('anomaly.module.files::max_parallel_uploads', 3) }}"
|
||||||
data-allowed="{{ folder.allowed_types.value ? '.' ~ folder.allowed_types.value|join(',.') }}"></div>
|
data-allowed="{{ (count(allowed_types)) ?'.'~allowed_types|join(',.'):'' }}"></div>
|
||||||
|
|
||||||
<div class="uploads"></div>
|
<div class="uploads"></div>
|
||||||
|
|
||||||
|
|||||||
@ -73,7 +73,7 @@ function Locations(cat, level, name){
|
|||||||
url: "/class/ajax",
|
url: "/class/ajax",
|
||||||
success: function(msg){
|
success: function(msg){
|
||||||
$('select[name="'+name+'"]').find('option').remove();
|
$('select[name="'+name+'"]').find('option').remove();
|
||||||
$('select[name="'+name+'"]').append('<option value="">Choose an option...</option>');
|
$('select[name="'+name+'"]').append('<option value="">' + chooseOptionTrans + '...</option>');
|
||||||
$.each(msg, function(key, value){
|
$.each(msg, function(key, value){
|
||||||
$('select[name="'+name+'"]').append('<option value="'+value.id+'">'+value.name+'</option>');
|
$('select[name="'+name+'"]').append('<option value="'+value.id+'">'+value.name+'</option>');
|
||||||
});
|
});
|
||||||
|
|||||||
@ -58,6 +58,12 @@ return [
|
|||||||
'birthday' => [
|
'birthday' => [
|
||||||
'name' => 'Birthday'
|
'name' => 'Birthday'
|
||||||
],
|
],
|
||||||
|
'facebook_address' => [
|
||||||
|
'name' => 'Facebook Address'
|
||||||
|
],
|
||||||
|
'google_address' => [
|
||||||
|
'name' => 'Google Address'
|
||||||
|
],
|
||||||
'education' => [
|
'education' => [
|
||||||
'name' => 'Education'
|
'name' => 'Education'
|
||||||
],
|
],
|
||||||
@ -375,6 +381,9 @@ return [
|
|||||||
'password' => [
|
'password' => [
|
||||||
'name' => 'Password',
|
'name' => 'Password',
|
||||||
],
|
],
|
||||||
|
'old_password' => [
|
||||||
|
'name' => 'Old password',
|
||||||
|
],
|
||||||
'new_password' => [
|
'new_password' => [
|
||||||
'name' => 'New password',
|
'name' => 'New password',
|
||||||
],
|
],
|
||||||
|
|||||||
@ -29,6 +29,7 @@ return [
|
|||||||
'empty_password_sms_message' => 'Due to security issues, we changed your password! Your new password is:',
|
'empty_password_sms_message' => 'Due to security issues, we changed your password! Your new password is:',
|
||||||
'required_all' => "All Field is Required!",
|
'required_all' => "All Field is Required!",
|
||||||
'can_not_remove_filled_fields' => "You can not remove filled fields!",
|
'can_not_remove_filled_fields' => "You can not remove filled fields!",
|
||||||
|
'wrong_password' => "The password you entered is not correct!",
|
||||||
|
|
||||||
// Forgot Password
|
// Forgot Password
|
||||||
'email_phone_not_found' => 'The E-mail, Phone Number is not correct!',
|
'email_phone_not_found' => 'The E-mail, Phone Number is not correct!',
|
||||||
|
|||||||
@ -377,6 +377,9 @@ return [
|
|||||||
'new_password' => [
|
'new_password' => [
|
||||||
'name' => 'Yeni Şifre',
|
'name' => 'Yeni Şifre',
|
||||||
],
|
],
|
||||||
|
'old_password' => [
|
||||||
|
'name' => 'Eski Şifre',
|
||||||
|
],
|
||||||
're_new_password' => [
|
're_new_password' => [
|
||||||
'name' => 'Şifre Onayı',
|
'name' => 'Şifre Onayı',
|
||||||
],
|
],
|
||||||
|
|||||||
@ -149,7 +149,22 @@
|
|||||||
{{ profileForm.fields.birthday.configSet('date_format','Y-m-d').setPlaceholder(now|date('Y-m-d')).input|raw }}
|
{{ profileForm.fields.birthday.configSet('date_format','Y-m-d').setPlaceholder(now|date('Y-m-d')).input|raw }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group facebook_address-field">
|
||||||
|
<label class="control-label font-weight-bold">
|
||||||
|
{{ trans("visiosoft.module.profile::field.facebook_address.name") }}
|
||||||
|
</label>
|
||||||
|
{{ profileForm.fields.facebook_address.input|raw }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<div class="form-group google_address-field">
|
||||||
|
<label class="control-label font-weight-bold">
|
||||||
|
{{ trans("visiosoft.module.profile::field.google_address.name") }}
|
||||||
|
</label>
|
||||||
|
{{ profileForm.fields.google_address.input|raw }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{% if setting_value('visiosoft.module.profile::show_education_profession') %}
|
{% if setting_value('visiosoft.module.profile::show_education_profession') %}
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="form-group education-field">
|
<div class="form-group education-field">
|
||||||
@ -236,6 +251,12 @@
|
|||||||
|
|
||||||
{{ passwordForm.open()|raw }}
|
{{ passwordForm.open()|raw }}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="font-weight-bold">{{ trans("visiosoft.module.profile::field.old_password.name") }}</label>
|
||||||
|
{{ passwordForm.fields.old_password.input|raw }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="font-weight-bold">{{ trans("visiosoft.module.profile::field.new_password.name") }}</label>
|
<label class="font-weight-bold">{{ trans("visiosoft.module.profile::field.new_password.name") }}</label>
|
||||||
|
|||||||
@ -6,6 +6,13 @@ use Anomaly\Streams\Platform\Ui\Form\FormBuilder;
|
|||||||
class PasswordFormBuilder extends FormBuilder
|
class PasswordFormBuilder extends FormBuilder
|
||||||
{
|
{
|
||||||
protected $fields = [
|
protected $fields = [
|
||||||
|
'old_password' => [
|
||||||
|
'type' => 'anomaly.field_type.text',
|
||||||
|
'required' => true,
|
||||||
|
'config' => [
|
||||||
|
'type' => 'password'
|
||||||
|
],
|
||||||
|
],
|
||||||
'new_password' => [
|
'new_password' => [
|
||||||
'type' => 'anomaly.field_type.text',
|
'type' => 'anomaly.field_type.text',
|
||||||
'required' => true,
|
'required' => true,
|
||||||
|
|||||||
@ -4,6 +4,7 @@ use Anomaly\Streams\Platform\Message\MessageBag;
|
|||||||
use Anomaly\UsersModule\User\User;
|
use Anomaly\UsersModule\User\User;
|
||||||
use Anomaly\UsersModule\User\UserPassword;
|
use Anomaly\UsersModule\User\UserPassword;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use Illuminate\Support\Facades\Hash;
|
||||||
|
|
||||||
class PasswordFormHandler
|
class PasswordFormHandler
|
||||||
{
|
{
|
||||||
@ -20,6 +21,11 @@ class PasswordFormHandler
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!Hash::check($builder->getPostValue('old_password'), \auth()->user()->password)) {
|
||||||
|
$messages->error(trans('visiosoft.module.profile::message.wrong_password'));
|
||||||
|
return redirect()->back();
|
||||||
|
}
|
||||||
|
|
||||||
if ($builder->getPostValue('new_password') != $builder->getPostValue('re_new_password')) {
|
if ($builder->getPostValue('new_password') != $builder->getPostValue('re_new_password')) {
|
||||||
$messages->error(trans('visiosoft.module.profile::message.password_do_not_match'));
|
$messages->error(trans('visiosoft.module.profile::message.password_do_not_match'));
|
||||||
return redirect()->back();
|
return redirect()->back();
|
||||||
|
|||||||
@ -17,7 +17,9 @@ class ProfileFormBuilder extends FormBuilder
|
|||||||
'state_of_education',
|
'state_of_education',
|
||||||
'profession',
|
'profession',
|
||||||
'birthday',
|
'birthday',
|
||||||
'register_type'
|
'register_type',
|
||||||
|
'facebook_address',
|
||||||
|
'google_address',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $actions = [
|
protected $actions = [
|
||||||
|
|||||||
@ -23,6 +23,8 @@ class ProfileFormHandler
|
|||||||
'identification_number' => $builder->getPostValue('identification_number'),
|
'identification_number' => $builder->getPostValue('identification_number'),
|
||||||
'birthday' => $builder->getPostValue('birthday'),
|
'birthday' => $builder->getPostValue('birthday'),
|
||||||
'register_type' => $builder->getPostValue('register_type'),
|
'register_type' => $builder->getPostValue('register_type'),
|
||||||
|
'facebook_address' => $builder->getPostValue('facebook_address'),
|
||||||
|
'google_address' => $builder->getPostValue('google_address'),
|
||||||
];
|
];
|
||||||
|
|
||||||
if (setting_value('visiosoft.module.profile::show_education_profession')) {
|
if (setting_value('visiosoft.module.profile::show_education_profession')) {
|
||||||
|
|||||||
@ -139,6 +139,16 @@ class UsersFieldsSeeder extends Seeder
|
|||||||
'slug' => 'profession',
|
'slug' => 'profession',
|
||||||
'type' => 'anomaly.field_type.text',
|
'type' => 'anomaly.field_type.text',
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
'name' => trans('visiosoft.module.profile::field.facebook_address.name'),
|
||||||
|
'slug' => 'facebook_address',
|
||||||
|
'type' => 'anomaly.field_type.text',
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name' => trans('visiosoft.module.profile::field.google_address.name'),
|
||||||
|
'slug' => 'google_address',
|
||||||
|
'type' => 'anomaly.field_type.text',
|
||||||
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($customFields as $customField) {
|
foreach ($customFields as $customField) {
|
||||||
|
|||||||
266
app/Lang/Loader.php
Normal file
266
app/Lang/Loader.php
Normal file
@ -0,0 +1,266 @@
|
|||||||
|
<?php namespace App\Lang;
|
||||||
|
|
||||||
|
use Anomaly\Streams\Platform\Addon\Addon;
|
||||||
|
use Anomaly\Streams\Platform\Addon\AddonCollection;
|
||||||
|
use Anomaly\Streams\Platform\Application\Application;
|
||||||
|
use Illuminate\Filesystem\Filesystem;
|
||||||
|
use Illuminate\Translation\FileLoader;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class Loader
|
||||||
|
*
|
||||||
|
* @link http://pyrocms.com/
|
||||||
|
* @author PyroCMS, Inc. <support@pyrocms.com>
|
||||||
|
* @author Ryan Thompson <ryan@pyrocms.com>
|
||||||
|
*/
|
||||||
|
class Loader extends FileLoader
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The runtime cache.
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected static $disabled = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The streams path.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $streams;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The addon collection instance.
|
||||||
|
*
|
||||||
|
* @var AddonCollection
|
||||||
|
*/
|
||||||
|
protected $addons;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The application instance.
|
||||||
|
*
|
||||||
|
* @var Application
|
||||||
|
*/
|
||||||
|
protected $application;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new Loader instance.
|
||||||
|
*
|
||||||
|
* @param Filesystem $files
|
||||||
|
* @param string $path
|
||||||
|
*/
|
||||||
|
public function __construct(Filesystem $files, $path)
|
||||||
|
{
|
||||||
|
$this->streams = base_path('vendor/visiosoft/streams-platform/resources/lang');
|
||||||
|
|
||||||
|
$this->application = app(Application::class);
|
||||||
|
$this->addons = app(AddonCollection::class);
|
||||||
|
|
||||||
|
parent::__construct($files, $path);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load a locale from a given path.
|
||||||
|
*
|
||||||
|
* Keep streams overrides in place
|
||||||
|
* that are NOT namespaced cause
|
||||||
|
* we're overriding Laravel's
|
||||||
|
* base language files too.
|
||||||
|
*
|
||||||
|
* @param string $path
|
||||||
|
* @param string $locale
|
||||||
|
* @param string $group
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
protected function loadPath($path, $locale, $group)
|
||||||
|
{
|
||||||
|
$lines = parent::loadPath($path, $locale, $group);
|
||||||
|
|
||||||
|
if ($path == $this->streams && $lines) {
|
||||||
|
$lines = $this->loadAddonOverrides($lines, $locale, $group);
|
||||||
|
$lines = $this->loadSystemOverrides($lines, $locale, $group);
|
||||||
|
$lines = $this->loadApplicationOverrides($lines, $locale, $group);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $lines;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load namespaced overrides from
|
||||||
|
* system AND application paths.
|
||||||
|
*
|
||||||
|
* @param array $lines
|
||||||
|
* @param string $locale
|
||||||
|
* @param string $group
|
||||||
|
* @param string $namespace
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
protected function loadNamespaceOverrides(array $lines, $locale, $group, $namespace)
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @deprecated since 1.6; Use manual loading or publishing.
|
||||||
|
*/
|
||||||
|
if (env('AUTOMATIC_ADDON_OVERRIDES', true)) {
|
||||||
|
$lines = $this->loadAddonOverrides($lines, $locale, $group, $namespace);
|
||||||
|
}
|
||||||
|
|
||||||
|
$lines = $this->loadSystemOverrides($lines, $locale, $group, $namespace);
|
||||||
|
$lines = $this->loadApplicationOverrides($lines, $locale, $group, $namespace);
|
||||||
|
|
||||||
|
return parent::loadNamespaceOverrides($lines, $locale, $group, $namespace);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load system overrides.
|
||||||
|
*
|
||||||
|
* @param array $lines
|
||||||
|
* @param $locale
|
||||||
|
* @param $group
|
||||||
|
* @param $namespace
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
protected function loadSystemOverrides(array $lines, $locale, $group, $namespace = null)
|
||||||
|
{
|
||||||
|
if (!$namespace || $namespace == 'streams') {
|
||||||
|
|
||||||
|
$file = base_path("resources/streams/lang/{$locale}/{$group}.php");
|
||||||
|
|
||||||
|
if (is_dir(base_path("resources/streams/lang")) && $this->files->exists($file)) {
|
||||||
|
$lines = array_replace_recursive($lines, $this->files->getRequire($file));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (str_is('*.*.*', $namespace)) {
|
||||||
|
|
||||||
|
list($vendor, $type, $slug) = explode('.', $namespace);
|
||||||
|
|
||||||
|
$file = base_path("resources/addons/{$vendor}/{$slug}-{$type}/lang/{$locale}/{$group}.php");
|
||||||
|
|
||||||
|
if (is_dir(base_path("resources/addons/{$vendor}/{$slug}-{$type}/lang")) && $this->files->exists($file)) {
|
||||||
|
$lines = array_replace_recursive($lines, $this->files->getRequire($file));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $lines;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load system overrides.
|
||||||
|
*
|
||||||
|
* @param array $lines
|
||||||
|
* @param $locale
|
||||||
|
* @param $group
|
||||||
|
* @param $namespace
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
protected function loadApplicationOverrides(array $lines, $locale, $group, $namespace = null)
|
||||||
|
{
|
||||||
|
if (!$namespace || $namespace == 'streams') {
|
||||||
|
|
||||||
|
$file = $this->application->getResourcesPath("streams/lang/{$locale}/{$group}.php");
|
||||||
|
|
||||||
|
if (is_dir($this->application->getResourcesPath("streams/lang")) && $this->files->exists($file)) {
|
||||||
|
$lines = array_replace_recursive($lines, $this->files->getRequire($file));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (str_is('*.*.*', $namespace)) {
|
||||||
|
|
||||||
|
list($vendor, $type, $slug) = explode('.', $namespace);
|
||||||
|
|
||||||
|
$file = $this->application->getResourcesPath(
|
||||||
|
"addons/{$vendor}/{$slug}-{$type}/lang/{$locale}/{$group}.php"
|
||||||
|
);
|
||||||
|
|
||||||
|
if (
|
||||||
|
is_dir($this->application->getResourcesPath("addons/{$vendor}/{$slug}-{$type}/lang"))
|
||||||
|
&& $this->files->exists($file)
|
||||||
|
) {
|
||||||
|
$lines = array_replace_recursive($lines, $this->files->getRequire($file));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (config()->has('override_text')) {
|
||||||
|
foreach (config()->get('override_text') as $override) {
|
||||||
|
$override = explode(':', $override);
|
||||||
|
|
||||||
|
$lines = $this->findArrayValue($override[0], $override[1], $lines);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $lines;
|
||||||
|
}
|
||||||
|
|
||||||
|
function replaceNewValue($find_value, $new_value, $arr)
|
||||||
|
{
|
||||||
|
if (is_array($arr)) {
|
||||||
|
foreach ($arr as $key => $item) {
|
||||||
|
$arr[$key] = $this->replaceNewValue($find_value, $new_value, $item);
|
||||||
|
}
|
||||||
|
return $arr;
|
||||||
|
}
|
||||||
|
if (strtolower($arr) == strtolower($find_value)) {
|
||||||
|
return $new_value;
|
||||||
|
}
|
||||||
|
return $arr;
|
||||||
|
}
|
||||||
|
|
||||||
|
function findArrayValue($find_value, $new_value, $arr)
|
||||||
|
{
|
||||||
|
foreach ($arr as $key => $item) {
|
||||||
|
$arr[$key] = $this->replaceNewValue($find_value, $new_value, $item);
|
||||||
|
}
|
||||||
|
return $arr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array $lines
|
||||||
|
* @param $locale
|
||||||
|
* @param $group
|
||||||
|
* @param null $namespace
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
protected function loadAddonOverrides(array $lines, $locale, $group, $namespace = null)
|
||||||
|
{
|
||||||
|
/** @var Addon $addon */
|
||||||
|
foreach ($this->addons->enabled() as $addon) {
|
||||||
|
|
||||||
|
$disabled = array_get(self::$disabled, $key = $addon->getNamespace('streams'), false);
|
||||||
|
|
||||||
|
if (!$disabled && !$this->files->isDirectory($addon->getPath('resources/streams'))) {
|
||||||
|
self::$disabled[$key] = $disabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$disabled && (!$namespace || $namespace == 'streams')) {
|
||||||
|
|
||||||
|
$file = $addon->getPath("resources/streams/lang/{$locale}/{$group}.php");
|
||||||
|
|
||||||
|
if ($this->files->exists($file)) {
|
||||||
|
$lines = array_replace_recursive($lines, $this->files->getRequire($file));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$disabled = array_get(self::$disabled, $key = $addon->getNamespace('addons'), false);
|
||||||
|
|
||||||
|
if (!$disabled && !$this->files->isDirectory($addon->getPath('resources/addons'))) {
|
||||||
|
self::$disabled[$key] = $disabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$disabled && str_is('*.*.*', $namespace)) {
|
||||||
|
|
||||||
|
list($vendor, $type, $slug) = explode('.', $namespace);
|
||||||
|
|
||||||
|
$file = $addon->getPath(
|
||||||
|
"resources/addons/{$vendor}/{$slug}-{$type}/lang/{$locale}/{$group}.php"
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($this->files->exists($file)) {
|
||||||
|
$lines = array_replace_recursive($lines, $this->files->getRequire($file));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $lines;
|
||||||
|
}
|
||||||
|
}
|
||||||
45
app/Listeners/Translations.php
Executable file
45
app/Listeners/Translations.php
Executable file
@ -0,0 +1,45 @@
|
|||||||
|
<?php namespace App\Listeners;
|
||||||
|
|
||||||
|
use Anomaly\Streams\Platform\Event\Booted;
|
||||||
|
use App\Lang\Loader;
|
||||||
|
use Illuminate\Translation\Translator;
|
||||||
|
|
||||||
|
class Translations
|
||||||
|
{
|
||||||
|
|
||||||
|
public function handle(Booted $event)
|
||||||
|
{
|
||||||
|
app()->singleton(
|
||||||
|
'translation.loader',
|
||||||
|
function ($application) {
|
||||||
|
return new Loader($application['files'], $application['path.lang']);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
app()->singleton(
|
||||||
|
'translator',
|
||||||
|
function ($application) {
|
||||||
|
$loader = $application->make('translation.loader');
|
||||||
|
|
||||||
|
// When registering the translator component, we'll need to set the default
|
||||||
|
// locale as well as the fallback locale. So, we'll grab the application
|
||||||
|
// configuration so we can easily get both of these values from there.
|
||||||
|
$locale = $application['config']['app.locale'];
|
||||||
|
|
||||||
|
$trans = new Translator($loader, $locale);
|
||||||
|
|
||||||
|
$trans->setFallback($application['config']['app.fallback_locale']);
|
||||||
|
|
||||||
|
return $trans;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
if (defined('LOCALE')) {
|
||||||
|
app()->setLocale(LOCALE);
|
||||||
|
config()->set('app.locale', LOCALE);
|
||||||
|
}
|
||||||
|
// Set our locale namespace.
|
||||||
|
app()->make('translator')->addNamespace('streams', realpath(__DIR__ . '/../../vendor/visiosoft/streams-platform/resources/lang'));
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -13,7 +13,11 @@ return [
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'listeners' => [],
|
'listeners' => [
|
||||||
|
\Anomaly\Streams\Platform\Event\Booted::class => [
|
||||||
|
\App\Listeners\Translations::class
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use Anomaly\FilesModule\Disk\Contract\DiskRepositoryInterface;
|
||||||
|
use Anomaly\FilesModule\Folder\Contract\FolderRepositoryInterface;
|
||||||
use Anomaly\NavigationModule\Link\LinkModel;
|
use Anomaly\NavigationModule\Link\LinkModel;
|
||||||
use Anomaly\NavigationModule\Menu\Contract\MenuRepositoryInterface;
|
use Anomaly\NavigationModule\Menu\Contract\MenuRepositoryInterface;
|
||||||
use Anomaly\Streams\Platform\Entry\EntryRepository;
|
use Anomaly\Streams\Platform\Entry\EntryRepository;
|
||||||
@ -21,11 +23,15 @@ class DatabaseSeeder extends Seeder
|
|||||||
protected $users;
|
protected $users;
|
||||||
protected $roles;
|
protected $roles;
|
||||||
protected $activator;
|
protected $activator;
|
||||||
|
protected $disks;
|
||||||
|
protected $folders;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
WidgetRepositoryInterface $widgets,
|
WidgetRepositoryInterface $widgets,
|
||||||
MenuRepositoryInterface $menus,
|
MenuRepositoryInterface $menus,
|
||||||
UserRepositoryInterface $users,
|
UserRepositoryInterface $users,
|
||||||
|
DiskRepositoryInterface $disks,
|
||||||
|
FolderRepositoryInterface $folders,
|
||||||
RoleRepositoryInterface $roles,
|
RoleRepositoryInterface $roles,
|
||||||
UserActivator $activator
|
UserActivator $activator
|
||||||
)
|
)
|
||||||
@ -35,6 +41,8 @@ class DatabaseSeeder extends Seeder
|
|||||||
$this->users = $users;
|
$this->users = $users;
|
||||||
$this->roles = $roles;
|
$this->roles = $roles;
|
||||||
$this->activator = $activator;
|
$this->activator = $activator;
|
||||||
|
$this->disks = $disks;
|
||||||
|
$this->folders = $folders;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function run()
|
public function run()
|
||||||
@ -125,5 +133,28 @@ class DatabaseSeeder extends Seeder
|
|||||||
$zip->close();
|
$zip->close();
|
||||||
|
|
||||||
$this->call(widgetSeeder::class);
|
$this->call(widgetSeeder::class);
|
||||||
|
|
||||||
|
|
||||||
|
//Create Store Icon Folder
|
||||||
|
if (!$this->folders->findBySlug('ads_excel')) {
|
||||||
|
$disk = $this->disks->findBySlug('local');
|
||||||
|
|
||||||
|
$this->folders->create([
|
||||||
|
'en' => [
|
||||||
|
'name' => 'Ads Excel',
|
||||||
|
'description' => 'A folder for Ads Excel.',
|
||||||
|
],
|
||||||
|
'slug' => 'ads_excel',
|
||||||
|
'disk' => $disk
|
||||||
|
]);
|
||||||
|
};
|
||||||
|
|
||||||
|
if ($images_folder = $this->folders->findBySlug('images')) {
|
||||||
|
$images_folder->update([
|
||||||
|
'allowed_types' => [
|
||||||
|
'jpg', 'jpeg','png'
|
||||||
|
],
|
||||||
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user