admin scroller bug fixed
|
|
@ -16,7 +16,7 @@ DB_PASSWORD=secret
|
||||||
BROADCAST_DRIVER=log
|
BROADCAST_DRIVER=log
|
||||||
CACHE_DRIVER=file
|
CACHE_DRIVER=file
|
||||||
SESSION_DRIVER=file
|
SESSION_DRIVER=file
|
||||||
SESSION_LIFETIME=120
|
SESSION_LIFETIME=10
|
||||||
QUEUE_DRIVER=sync
|
QUEUE_DRIVER=sync
|
||||||
|
|
||||||
REDIS_HOST=127.0.0.1
|
REDIS_HOST=127.0.0.1
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,12 @@
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.1.3",
|
"php": "^7.1.3",
|
||||||
|
"ext-openssl": "*",
|
||||||
|
"ext-pdo": "*",
|
||||||
|
"ext-mbstring": "*",
|
||||||
|
"ext-tokenizer": "*",
|
||||||
|
"ext-pdo_mysql": "*",
|
||||||
|
"ext-curl": "*",
|
||||||
"barryvdh/laravel-dompdf": "^0.8.0@dev",
|
"barryvdh/laravel-dompdf": "^0.8.0@dev",
|
||||||
"dimsav/laravel-translatable": "^9.0",
|
"dimsav/laravel-translatable": "^9.0",
|
||||||
"doctrine/dbal": "^2.9@dev",
|
"doctrine/dbal": "^2.9@dev",
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ return [
|
||||||
|
|
||||||
'enabled' => env('DEBUGBAR_ENABLED', null),
|
'enabled' => env('DEBUGBAR_ENABLED', null),
|
||||||
'except' => [
|
'except' => [
|
||||||
//
|
'telescope*'
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -29,9 +29,9 @@ return [
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'lifetime' => env('SESSION_LIFETIME', 120),
|
'lifetime' => env('SESSION_LIFETIME', 10),
|
||||||
|
|
||||||
'expire_on_close' => false,
|
'expire_on_close' => true,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,21 @@
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Console Commands
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option allows you to add additional Artisan commands that should
|
||||||
|
| be available within the Tinker environment. Once the command is in
|
||||||
|
| this array you may execute the command in Tinker using its name.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'commands' => [
|
||||||
|
// App\Console\Commands\ExampleCommand::class,
|
||||||
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Alias Blacklist
|
| Alias Blacklist
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class CreateDiscountsTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('discounts', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('discounts');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class CreateDiscountRulesTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('discount_rules', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('discount_rules');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class CreateDiscountChannelsTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('discount_channels', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('discount_channels');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class CreateDiscountCustomerGroupsTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('discount_customer_group', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('discount_customer_group');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -19,7 +19,7 @@ class TaxRateDataGrid extends DataGrid
|
||||||
|
|
||||||
public function prepareQueryBuilder()
|
public function prepareQueryBuilder()
|
||||||
{
|
{
|
||||||
$queryBuilder = DB::table('tax_rates')->addSelect('id', 'identifier', 'state', 'country', 'tax_rate');
|
$queryBuilder = DB::table('tax_rates')->addSelect('id', 'identifier', 'state', 'country', 'zip_code', 'zip_from', 'zip_to', 'tax_rate');
|
||||||
|
|
||||||
$this->setQueryBuilder($queryBuilder);
|
$this->setQueryBuilder($queryBuilder);
|
||||||
}
|
}
|
||||||
|
|
@ -62,6 +62,33 @@ class TaxRateDataGrid extends DataGrid
|
||||||
'filterable' => true
|
'filterable' => true
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
$this->addColumn([
|
||||||
|
'index' => 'zip_code',
|
||||||
|
'label' => trans('admin::app.configuration.tax-rates.zip_code'),
|
||||||
|
'type' => 'string',
|
||||||
|
'searchable' => true,
|
||||||
|
'sortable' => true,
|
||||||
|
'filterable' => true
|
||||||
|
]);
|
||||||
|
|
||||||
|
$this->addColumn([
|
||||||
|
'index' => 'zip_from',
|
||||||
|
'label' => trans('admin::app.configuration.tax-rates.zip_from'),
|
||||||
|
'type' => 'string',
|
||||||
|
'searchable' => true,
|
||||||
|
'sortable' => true,
|
||||||
|
'filterable' => true
|
||||||
|
]);
|
||||||
|
|
||||||
|
$this->addColumn([
|
||||||
|
'index' => 'zip_to',
|
||||||
|
'label' => trans('admin::app.configuration.tax-rates.zip_to'),
|
||||||
|
'type' => 'string',
|
||||||
|
'searchable' => true,
|
||||||
|
'sortable' => true,
|
||||||
|
'filterable' => true
|
||||||
|
]);
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
'index' => 'tax_rate',
|
'index' => 'tax_rate',
|
||||||
'label' => trans('admin::app.datagrid.tax-rate'),
|
'label' => trans('admin::app.datagrid.tax-rate'),
|
||||||
|
|
|
||||||
|
|
@ -48,10 +48,9 @@ class CustomerController extends Controller
|
||||||
/**
|
/**
|
||||||
* Create a new controller instance.
|
* Create a new controller instance.
|
||||||
*
|
*
|
||||||
* @param Webkul\Customer\Repositories\CustomerRepository as customer;
|
* @param \Webkul\Customer\Repositories\CustomerRepository $customer
|
||||||
* @param Webkul\Customer\Repositories\CustomerGroupRepository as customerGroup;
|
* @param \Webkul\Customer\Repositories\CustomerGroupRepository $customerGroup
|
||||||
* @param Webkul\Core\Repositories\ChannelRepository as Channel;
|
* @param \Webkul\Core\Repositories\ChannelRepository $channel
|
||||||
* @return void
|
|
||||||
*/
|
*/
|
||||||
public function __construct(Customer $customer, CustomerGroup $customerGroup, Channel $channel)
|
public function __construct(Customer $customer, CustomerGroup $customerGroup, Channel $channel)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -50,10 +50,11 @@ class ExportController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($proceed) {
|
if(! $proceed) {
|
||||||
|
return redirect()->back();
|
||||||
|
}
|
||||||
$gridInstance = new $path;
|
$gridInstance = new $path;
|
||||||
|
|
||||||
$records = array();
|
|
||||||
$records = $gridInstance->export();
|
$records = $gridInstance->export();
|
||||||
|
|
||||||
if (count($records) == 0) {
|
if (count($records) == 0) {
|
||||||
|
|
@ -64,16 +65,15 @@ class ExportController extends Controller
|
||||||
|
|
||||||
if ($format == 'csv') {
|
if ($format == 'csv') {
|
||||||
return Excel::download(new DataGridExport($records), last($gridName).'.csv');
|
return Excel::download(new DataGridExport($records), last($gridName).'.csv');
|
||||||
} else if($format == 'xls') {
|
}
|
||||||
|
if ($format == 'xls') {
|
||||||
return Excel::download(new DataGridExport($records), last($gridName).'.xlsx');
|
return Excel::download(new DataGridExport($records), last($gridName).'.xlsx');
|
||||||
} else {
|
}
|
||||||
session()->flash('warning', trans('admin::app.export.illegal-format'));
|
session()->flash('warning', trans('admin::app.export.illegal-format'));
|
||||||
|
|
||||||
return redirect()->back();
|
return redirect()->back();
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return redirect()->back();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -65,14 +65,35 @@ class AdminServiceProvider extends ServiceProvider
|
||||||
view()->composer(['admin::layouts.nav-left', 'admin::layouts.nav-aside', 'admin::layouts.tabs'], function ($view) {
|
view()->composer(['admin::layouts.nav-left', 'admin::layouts.nav-aside', 'admin::layouts.tabs'], function ($view) {
|
||||||
$tree = Tree::create();
|
$tree = Tree::create();
|
||||||
|
|
||||||
foreach (config('menu.admin') as $item) {
|
$permissionType = auth()->guard('admin')->user()->role->permission_type;
|
||||||
if (bouncer()->hasPermission($item['key'])) {
|
$allowedPermissions = auth()->guard('admin')->user()->role->permissions;
|
||||||
$tree->add($item, 'menu');
|
|
||||||
|
foreach (config('menu.admin') as $index => $item) {
|
||||||
|
if (! bouncer()->hasPermission($item['key'])) {
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
if ($index + 1 < count(config('menu.admin')) && $permissionType != 'all') {
|
||||||
|
$permission = config('menu.admin')[$index + 1];
|
||||||
|
|
||||||
|
if (substr_count($permission['key'], '.') == 2 && substr_count($item['key'], '.') == 1) {
|
||||||
|
foreach ($allowedPermissions as $key => $value) {
|
||||||
|
if ($item['key'] == $value) {
|
||||||
|
$neededItem = $allowedPermissions[$key + 1];
|
||||||
|
|
||||||
|
foreach (config('menu.admin') as $key1 => $findMatced) {
|
||||||
|
if ($findMatced['key'] == $neededItem) {
|
||||||
|
$item['route'] = $findMatced['route'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$tree->add($item, 'menu');
|
||||||
}
|
}
|
||||||
|
|
||||||
$tree->items = core()->sortItems($tree->items);
|
$tree->items = core()->sortItems($tree->items);
|
||||||
|
|
||||||
$view->with('menu', $tree);
|
$view->with('menu', $tree);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,6 @@ window.onload = function () {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -626,7 +626,7 @@ return [
|
||||||
],
|
],
|
||||||
|
|
||||||
'sliders' => [
|
'sliders' => [
|
||||||
'title' => 'Sliders',
|
'title' => 'Title',
|
||||||
'add-title' => 'Create Slider',
|
'add-title' => 'Create Slider',
|
||||||
'edit-title' => 'Edit Slider',
|
'edit-title' => 'Edit Slider',
|
||||||
'save-btn-title' => 'Save Slider',
|
'save-btn-title' => 'Save Slider',
|
||||||
|
|
|
||||||
|
|
@ -317,11 +317,15 @@
|
||||||
$('#options').parent().removeClass('hide')
|
$('#options').parent().removeClass('hide')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
});
|
||||||
|
|
||||||
var optionWrapper = Vue.component('option-wrapper', {
|
|
||||||
|
Vue.component('option-wrapper', {
|
||||||
|
|
||||||
template: '#options-template',
|
template: '#options-template',
|
||||||
|
|
||||||
|
inject: ['$validator'],
|
||||||
|
|
||||||
data: () => ({
|
data: () => ({
|
||||||
optionRowCount: 0,
|
optionRowCount: 0,
|
||||||
optionRows: [],
|
optionRows: [],
|
||||||
|
|
@ -332,6 +336,7 @@
|
||||||
created () {
|
created () {
|
||||||
var this_this = this;
|
var this_this = this;
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
$('#type').on('change', function (e) {
|
$('#type').on('change', function (e) {
|
||||||
if (['select'].indexOf($(e.target).val()) === -1) {
|
if (['select'].indexOf($(e.target).val()) === -1) {
|
||||||
this_this.show_swatch = false;
|
this_this.show_swatch = false;
|
||||||
|
|
@ -339,6 +344,7 @@
|
||||||
this_this.show_swatch = true;
|
this_this.show_swatch = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -371,14 +377,5 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
new Vue({
|
|
||||||
el: '#options',
|
|
||||||
|
|
||||||
components: {
|
|
||||||
optionWrapper: optionWrapper
|
|
||||||
},
|
|
||||||
})
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
|
|
@ -368,6 +368,8 @@
|
||||||
|
|
||||||
template: '#options-template',
|
template: '#options-template',
|
||||||
|
|
||||||
|
inject: ['$validator'],
|
||||||
|
|
||||||
data: () => ({
|
data: () => ({
|
||||||
optionRowCount: 0,
|
optionRowCount: 0,
|
||||||
optionRows: [],
|
optionRows: [],
|
||||||
|
|
|
||||||
|
|
@ -94,8 +94,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="control-group" :class="[errors.has('description') ? 'has-error' : '']">
|
<div class="control-group" :class="[errors.has('description') ? 'has-error' : '']">
|
||||||
<label for="description" class="required">{{ __('admin::app.catalog.categories.description') }}</label>
|
<label for="description" id="descript-label" class="required">{{ __('admin::app.catalog.categories.description') }}</label>
|
||||||
<textarea v-validate="'required'" class="control" id="description" name="description" data-vv-as=""{{ __('admin::app.catalog.categories.description') }}"">{{ old('description') }}</textarea>
|
<textarea v-validate="''" class="control" id="description" name="description" data-vv-as=""{{ __('admin::app.catalog.categories.description') }}"">{{ old('description') }}</textarea>
|
||||||
<span class="control-error" v-if="errors.has('description')">@{{ errors.first('description') }}</span>
|
<span class="control-error" v-if="errors.has('description')">@{{ errors.first('description') }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -189,6 +189,14 @@
|
||||||
toolbar1: 'formatselect | bold italic strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat | code',
|
toolbar1: 'formatselect | bold italic strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | removeformat | code',
|
||||||
image_advtab: true
|
image_advtab: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#display_mode').on('change', function (e) {
|
||||||
|
if ($('#display_mode').val() != 'products_only') {
|
||||||
|
$("#descript-label").addClass("required");
|
||||||
|
} else {
|
||||||
|
$("#descript-label").removeClass("required");
|
||||||
|
}
|
||||||
|
})
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@endpush
|
@endpush
|
||||||
|
|
@ -107,8 +107,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="control-group" :class="[errors.has('{{$locale}}[description]') ? 'has-error' : '']">
|
<div class="control-group" :class="[errors.has('{{$locale}}[description]') ? 'has-error' : '']">
|
||||||
<label for="description" class="required">{{ __('admin::app.catalog.categories.description') }}</label>
|
<label for="description">{{ __('admin::app.catalog.categories.description') }}</label>
|
||||||
<textarea v-validate="'required'" class="control" id="description" name="{{$locale}}[description]" data-vv-as=""{{ __('admin::app.catalog.categories.description') }}"">{{ old($locale)['description'] ?: $category->translate($locale)['description'] }}</textarea>
|
<textarea class="control" id="description" name="{{$locale}}[description]" data-vv-as=""{{ __('admin::app.catalog.categories.description') }}"">{{ old($locale)['description'] ?: $category->translate($locale)['description'] }}</textarea>
|
||||||
<span class="control-error" v-if="errors.has('{{$locale}}[description]')">@{{ errors.first('{!!$locale!!}[description]') }}</span>
|
<span class="control-error" v-if="errors.has('{{$locale}}[description]')">@{{ errors.first('{!!$locale!!}[description]') }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -146,14 +146,14 @@
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<div class="control-group" :class="[errors.has(variantInputName + '[price]') ? 'has-error' : '']">
|
<div class="control-group" :class="[errors.has(variantInputName + '[price]') ? 'has-error' : '']">
|
||||||
<input type="text" v-validate="'required'" v-model="variant.price" :name="[variantInputName + '[price]']" class="control" data-vv-as=""{{ __('admin::app.catalog.products.price') }}""/>
|
<input type="number" v-validate="'required|min_value:0.0001'" v-model="variant.price" :name="[variantInputName + '[price]']" class="control" data-vv-as=""{{ __('admin::app.catalog.products.price') }}""/>
|
||||||
<span class="control-error" v-if="errors.has(variantInputName + '[price]')">@{{ errors.first(variantInputName + '[price]') }}</span>
|
<span class="control-error" v-if="errors.has(variantInputName + '[price]')">@{{ errors.first(variantInputName + '[price]') }}</span>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
<div class="control-group" :class="[errors.has(variantInputName + '[weight]') ? 'has-error' : '']">
|
<div class="control-group" :class="[errors.has(variantInputName + '[weight]') ? 'has-error' : '']">
|
||||||
<input type="text" v-validate="'required'" v-model="variant.weight" :name="[variantInputName + '[weight]']" class="control" data-vv-as=""{{ __('admin::app.catalog.products.weight') }}""/>
|
<input type="number" v-validate="'required|min_value:0.0001'" v-model="variant.weight" :name="[variantInputName + '[weight]']" class="control" data-vv-as=""{{ __('admin::app.catalog.products.weight') }}""/>
|
||||||
<span class="control-error" v-if="errors.has(variantInputName + '[weight]')">@{{ errors.first(variantInputName + '[weight]') }}</span>
|
<span class="control-error" v-if="errors.has(variantInputName + '[weight]')">@{{ errors.first(variantInputName + '[weight]') }}</span>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@
|
||||||
<label for="type" class="required">{{ __('admin::app.catalog.products.product-type') }}</label>
|
<label for="type" class="required">{{ __('admin::app.catalog.products.product-type') }}</label>
|
||||||
<select class="control" v-validate="'required'" id="type" name="type" {{ $familyId ? 'disabled' : '' }} data-vv-as=""{{ __('admin::app.catalog.products.product-type') }}"">
|
<select class="control" v-validate="'required'" id="type" name="type" {{ $familyId ? 'disabled' : '' }} data-vv-as=""{{ __('admin::app.catalog.products.product-type') }}"">
|
||||||
@foreach($productTypes as $key => $productType)
|
@foreach($productTypes as $key => $productType)
|
||||||
<option value="{{ $key }}">{{ $productType['name'] }}</option>
|
<option value="{{ $key }}" {{ $key == $productType['key'] ? 'selected' : '' }}>{{ $productType['name'] }}</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -82,7 +82,7 @@
|
||||||
|
|
||||||
<div class="control-group" :class="[errors.has('sku') ? 'has-error' : '']">
|
<div class="control-group" :class="[errors.has('sku') ? 'has-error' : '']">
|
||||||
<label for="sku" class="required">{{ __('admin::app.catalog.products.sku') }}</label>
|
<label for="sku" class="required">{{ __('admin::app.catalog.products.sku') }}</label>
|
||||||
<input type="text" v-validate="'required'" class="control" id="sku" name="sku" value="{{ $sku ?: old('sku') }}" data-vv-as=""{{ __('admin::app.catalog.products.sku') }}""/>
|
<input type="text" v-validate="{ required: true, regex: /^[a-z0-9]+(?:-[a-z0-9]+)*$/ }" class="control" id="sku" name="sku" value="{{ $sku ?: old('sku') }}" data-vv-as=""{{ __('admin::app.catalog.products.sku') }}""/>
|
||||||
<span class="control-error" v-if="errors.has('sku')">@{{ errors.first('sku') }}</span>
|
<span class="control-error" v-if="errors.has('sku')">@{{ errors.first('sku') }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@
|
||||||
@if (isset($field['repository']))
|
@if (isset($field['repository']))
|
||||||
@foreach ($value as $key => $option)
|
@foreach ($value as $key => $option)
|
||||||
|
|
||||||
<option value="{{ $key }}" {{ $option == $selectedOption ? 'selected' : ''}}>
|
<option value="{{ $key }}" {{ $key == $selectedOption ? 'selected' : ''}}>
|
||||||
{{ trans($option) }}
|
{{ trans($option) }}
|
||||||
</option>
|
</option>
|
||||||
|
|
||||||
|
|
@ -100,7 +100,7 @@
|
||||||
@if (isset($field['repository']))
|
@if (isset($field['repository']))
|
||||||
@foreach ($value as $key => $option)
|
@foreach ($value as $key => $option)
|
||||||
|
|
||||||
<option value="{{ $value[$key] }}" {{ in_array($value[$key], explode(',', $selectedOption)) ? 'selected' : ''}}>
|
<option value="{{ $key }}" {{ in_array($key, explode(',', $selectedOption)) ? 'selected' : ''}}>
|
||||||
{{ trans($value[$key]) }}
|
{{ trans($value[$key]) }}
|
||||||
</option>
|
</option>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@
|
||||||
|
|
||||||
<div class="control-group" :class="[errors.has('image') ? 'has-error' : '']">
|
<div class="control-group" :class="[errors.has('image') ? 'has-error' : '']">
|
||||||
<label for="new_image">{{ __('admin::app.settings.sliders.image') }}</label>
|
<label for="new_image">{{ __('admin::app.settings.sliders.image') }}</label>
|
||||||
<image-wrapper :button-label="'{{ __('admin::app.settings.sliders.image') }}'" input-name="image" :multiple="false"></image-wrapper>
|
<image-wrapper :button-label="'{{ __('admin::app.settings.sliders.image') }}'" input-name="image" :multiple="false" :required="true"></image-wrapper>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="control-group" :class="[errors.has('content') ? 'has-error' : '']">
|
<div class="control-group" :class="[errors.has('content') ? 'has-error' : '']">
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<image-wrapper :button-label="'{{ __('admin::app.settings.sliders.image') }}'" input-name="image" :multiple="false" :images='"{{ url('storage/'.$slider->path) }}"'></image-wrapper>
|
<image-wrapper :button-label="'{{ __('admin::app.settings.sliders.image') }}'" input-name="image" :multiple="false" :images='"{{ url('storage/'.$slider->path) }}"' :required="true"></image-wrapper>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@
|
||||||
|
|
||||||
<div class="control-group" :class="[errors.has('tax_rate') ? 'has-error' : '']">
|
<div class="control-group" :class="[errors.has('tax_rate') ? 'has-error' : '']">
|
||||||
<label for="tax_rate" class="required">{{ __('admin::app.configuration.tax-rates.tax_rate') }}</label>
|
<label for="tax_rate" class="required">{{ __('admin::app.configuration.tax-rates.tax_rate') }}</label>
|
||||||
<input v-validate="'required'" class="control" id="tax_rate" name="tax_rate" data-vv-as=""{{ __('admin::app.configuration.tax-rates.tax_rate') }}"" value="{{ old('tax_rate') }}"/>
|
<input v-validate="'required|min_value:0.0001'" class="control" id="tax_rate" name="tax_rate" data-vv-as=""{{ __('admin::app.configuration.tax-rates.tax_rate') }}"" value="{{ old('tax_rate') }}"/>
|
||||||
<span class="control-error" v-if="errors.has('tax_rate')">@{{ errors.first('tax_rate') }}</span>
|
<span class="control-error" v-if="errors.has('tax_rate')">@{{ errors.first('tax_rate') }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@
|
||||||
|
|
||||||
<div class="control-group" :class="[errors.has('tax_rate') ? 'has-error' : '']">
|
<div class="control-group" :class="[errors.has('tax_rate') ? 'has-error' : '']">
|
||||||
<label for="tax_rate" class="required">{{ __('admin::app.configuration.tax-rates.tax_rate') }}</label>
|
<label for="tax_rate" class="required">{{ __('admin::app.configuration.tax-rates.tax_rate') }}</label>
|
||||||
<input v-validate="'required'" class="control" id="tax_rate" name="tax_rate" data-vv-as=""{{ __('admin::app.configuration.tax-rates.tax_rate') }}"" value="{{ $taxRate->tax_rate }}" />
|
<input v-validate="'required|min_value:0.0001'" class="control" id="tax_rate" name="tax_rate" data-vv-as=""{{ __('admin::app.configuration.tax-rates.tax_rate') }}"" value="{{ $taxRate->tax_rate }}" />
|
||||||
<span class="control-error" v-if="errors.has('tax_rate')">@{{ errors.first('tax_rate') }}</span>
|
<span class="control-error" v-if="errors.has('tax_rate')">@{{ errors.first('tax_rate') }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,8 @@ class CategoryController extends Controller
|
||||||
$this->validate(request(), [
|
$this->validate(request(), [
|
||||||
'slug' => ['required', 'unique:category_translations,slug', new \Webkul\Core\Contracts\Validations\Slug],
|
'slug' => ['required', 'unique:category_translations,slug', new \Webkul\Core\Contracts\Validations\Slug],
|
||||||
'name' => 'required',
|
'name' => 'required',
|
||||||
'image.*' => 'mimes:jpeg,jpg,bmp,png'
|
'image.*' => 'mimes:jpeg,jpg,bmp,png',
|
||||||
|
'description' => 'required_if:display_mode,==,description_only,products_and_description'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if (strtolower(request()->input('name')) == 'root') {
|
if (strtolower(request()->input('name')) == 'root') {
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,17 @@ class Currency extends Model implements CurrencyContract
|
||||||
'code', 'name'
|
'code', 'name'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set currency code in capital
|
||||||
|
*
|
||||||
|
* @param string $value
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function setCodeAttribute($code)
|
||||||
|
{
|
||||||
|
$this->attributes['code'] = strtoupper($code);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the currency_exchange associated with the currency.
|
* Get the currency_exchange associated with the currency.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class AddNotesColumnInCustomersTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('customers', function (Blueprint $table) {
|
||||||
|
$table->text('notes')->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('customers', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('notes');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -107,10 +107,16 @@ class AddressController extends Controller
|
||||||
*/
|
*/
|
||||||
public function edit($id)
|
public function edit($id)
|
||||||
{
|
{
|
||||||
$address = $this->address->find($id);
|
$addresses = $this->customer->addresses;
|
||||||
|
|
||||||
|
foreach ($addresses as $address) {
|
||||||
|
if ($id == $address->id) {
|
||||||
return view($this->_config['view'], compact('address'));
|
return view($this->_config['view'], compact('address'));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return redirect()->route('customer.address.index');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Edit's the premade resource of customer called
|
* Edit's the premade resource of customer called
|
||||||
|
|
@ -133,9 +139,19 @@ class AddressController extends Controller
|
||||||
|
|
||||||
$data = collect(request()->input())->except('_token')->toArray();
|
$data = collect(request()->input())->except('_token')->toArray();
|
||||||
|
|
||||||
|
$addresses = $this->customer->addresses;
|
||||||
|
|
||||||
|
foreach($addresses as $address) {
|
||||||
|
if($id == $address->id) {
|
||||||
|
session()->flash('success', trans('shop::app.customer.account.address.edit.success'));
|
||||||
|
|
||||||
$this->address->update($data, $id);
|
$this->address->update($data, $id);
|
||||||
|
|
||||||
session()->flash('success', trans('shop::app.customer.account.address.edit.success'));
|
return redirect()->route('customer.address.index');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
session()->flash('warning', trans('shop::app.security-warning'));
|
||||||
|
|
||||||
return redirect()->route('customer.address.index');
|
return redirect()->route('customer.address.index');
|
||||||
}
|
}
|
||||||
|
|
@ -169,10 +185,18 @@ class AddressController extends Controller
|
||||||
*/
|
*/
|
||||||
public function destroy($id)
|
public function destroy($id)
|
||||||
{
|
{
|
||||||
|
$addresses = $this->customer->addresses;
|
||||||
|
|
||||||
|
foreach($addresses as $address) {
|
||||||
|
if($id == $address->id) {
|
||||||
$this->address->delete($id);
|
$this->address->delete($id);
|
||||||
|
|
||||||
session()->flash('success', trans('shop::app.customer.account.address.delete.success'));
|
session()->flash('success', trans('shop::app.customer.account.address.delete.success'));
|
||||||
|
|
||||||
return redirect()->back();
|
return redirect()->route('customer.address.index');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return redirect()->route('customer.address.index');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ class CustomerController extends Controller
|
||||||
*
|
*
|
||||||
* @return View
|
* @return View
|
||||||
*/
|
*/
|
||||||
public function editIndex()
|
public function edit()
|
||||||
{
|
{
|
||||||
$customer = $this->customer->find(auth()->guard('customer')->user()->id);
|
$customer = $this->customer->find(auth()->guard('customer')->user()->id);
|
||||||
|
|
||||||
|
|
@ -89,7 +89,7 @@ class CustomerController extends Controller
|
||||||
*
|
*
|
||||||
* @return Redirect.
|
* @return Redirect.
|
||||||
*/
|
*/
|
||||||
public function edit()
|
public function update()
|
||||||
{
|
{
|
||||||
$id = auth()->guard('customer')->user()->id;
|
$id = auth()->guard('customer')->user()->id;
|
||||||
|
|
||||||
|
|
@ -124,34 +124,14 @@ class CustomerController extends Controller
|
||||||
if ($this->customer->update($data, $id)) {
|
if ($this->customer->update($data, $id)) {
|
||||||
Session()->flash('success', trans('shop::app.customer.account.profile.edit-success'));
|
Session()->flash('success', trans('shop::app.customer.account.profile.edit-success'));
|
||||||
|
|
||||||
return redirect()->back();
|
return redirect()->route($this->_config['redirect']);
|
||||||
} else {
|
} else {
|
||||||
Session()->flash('success', trans('shop::app.customer.account.profile.edit-fail'));
|
Session()->flash('success', trans('shop::app.customer.account.profile.edit-fail'));
|
||||||
|
|
||||||
return redirect()->back();
|
return redirect()->back($this->_config['redirect']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Load the view for the customer account panel, showing orders in a table.
|
|
||||||
*
|
|
||||||
* @return Mixed
|
|
||||||
*/
|
|
||||||
public function orders()
|
|
||||||
{
|
|
||||||
return view($this->_config['view']);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Load the view for the customer account panel, showing wishlist items.
|
|
||||||
*
|
|
||||||
* @return Mixed
|
|
||||||
*/
|
|
||||||
public function wishlist()
|
|
||||||
{
|
|
||||||
return view($this->_config['view']);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load the view for the customer account panel, showing approved reviews.
|
* Load the view for the customer account panel, showing approved reviews.
|
||||||
*
|
*
|
||||||
|
|
@ -159,18 +139,8 @@ class CustomerController extends Controller
|
||||||
*/
|
*/
|
||||||
public function reviews()
|
public function reviews()
|
||||||
{
|
{
|
||||||
$reviews = $this->productReview->getCustomerReview();
|
$reviews = auth()->guard('customer')->user()->all_reviews;
|
||||||
|
|
||||||
return view($this->_config['view'], compact('reviews'));
|
return view($this->_config['view'], compact('reviews'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Load the view for the customer account panel, shows the customer address.
|
|
||||||
*
|
|
||||||
* @return Mixed
|
|
||||||
*/
|
|
||||||
public function address()
|
|
||||||
{
|
|
||||||
return view($this->_config['view']);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Webkul\Shop\Http\Controllers;
|
namespace Webkul\Customer\Http\Controllers;
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Http\Response;
|
use Illuminate\Http\Response;
|
||||||
|
|
@ -67,9 +67,7 @@ class OrderController extends Controller
|
||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$orders = $this->order->findWhere([
|
$orders = auth()->guard('customer')->user()->all_orders;
|
||||||
'customer_id' => auth()->guard('customer')->user()->id
|
|
||||||
]);
|
|
||||||
|
|
||||||
return view($this->_config['view'], compact('orders'));
|
return view($this->_config['view'], compact('orders'));
|
||||||
}
|
}
|
||||||
|
|
@ -82,9 +80,15 @@ class OrderController extends Controller
|
||||||
*/
|
*/
|
||||||
public function view($id)
|
public function view($id)
|
||||||
{
|
{
|
||||||
$order = $this->order->find($id);
|
$orders = auth()->guard('customer')->user()->all_orders;
|
||||||
|
|
||||||
|
if(isset($orders) && count($orders)) {
|
||||||
|
$order = $orders->first();
|
||||||
|
|
||||||
return view($this->_config['view'], compact('order'));
|
return view($this->_config['view'], compact('order'));
|
||||||
|
} else {
|
||||||
|
return redirect()->route( 'customer.orders.index');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -11,8 +11,7 @@ use Cart;
|
||||||
use Auth;
|
use Auth;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Customer controlller for the customer basically for the tasks of customers which will be done
|
* Customer controller
|
||||||
* after customer authenticastion.
|
|
||||||
*
|
*
|
||||||
* @author Prashant Singh <prashant.singh852@webkul.com>
|
* @author Prashant Singh <prashant.singh852@webkul.com>
|
||||||
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
||||||
|
|
@ -40,8 +39,6 @@ class WishlistController extends Controller
|
||||||
|
|
||||||
$this->_config = request('_config');
|
$this->_config = request('_config');
|
||||||
|
|
||||||
$this->customer = $customer;
|
|
||||||
|
|
||||||
$this->wishlist = $wishlist;
|
$this->wishlist = $wishlist;
|
||||||
|
|
||||||
$this->product = $product;
|
$this->product = $product;
|
||||||
|
|
@ -67,6 +64,10 @@ class WishlistController extends Controller
|
||||||
public function add($itemId) {
|
public function add($itemId) {
|
||||||
$product = $this->product->findOneByField('id', $itemId);
|
$product = $this->product->findOneByField('id', $itemId);
|
||||||
|
|
||||||
|
if(!$product->status) {
|
||||||
|
return redirect()->back();
|
||||||
|
}
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'channel_id' => core()->getCurrentChannel()->id,
|
'channel_id' => core()->getCurrentChannel()->id,
|
||||||
'product_id' => $itemId,
|
'product_id' => $itemId,
|
||||||
|
|
@ -104,30 +105,23 @@ class WishlistController extends Controller
|
||||||
* @param integer $itemId
|
* @param integer $itemId
|
||||||
*/
|
*/
|
||||||
public function remove($itemId) {
|
public function remove($itemId) {
|
||||||
$found = $this->wishlist->find($itemId);
|
|
||||||
|
|
||||||
if(isset($found)) {
|
$customerWishlistItems = auth()->guard('customer')->user()->wishlist_items;
|
||||||
$found = true;
|
|
||||||
} else {
|
|
||||||
$found = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if($found) {
|
foreach($customerWishlistItems as $customerWishlistItem) {
|
||||||
$result = $this->wishlist->deleteWhere(['customer_id' => auth()->guard('customer')->user()->id, 'channel_id' => core()->getCurrentChannel()->id, 'id' => $itemId]);
|
if($itemId == $customerWishlistItem->id) {
|
||||||
|
$this->wishlist->delete($itemId);
|
||||||
|
|
||||||
if ($result) {
|
|
||||||
session()->flash('success', trans('customer::app.wishlist.removed'));
|
session()->flash('success', trans('customer::app.wishlist.removed'));
|
||||||
|
|
||||||
return redirect()->back();
|
return redirect()->back();
|
||||||
} else {
|
}
|
||||||
|
}
|
||||||
|
|
||||||
session()->flash('error', trans('customer::app.wishlist.remove-fail'));
|
session()->flash('error', trans('customer::app.wishlist.remove-fail'));
|
||||||
|
|
||||||
return redirect()->back();
|
return redirect()->back();
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
return redirect()->back();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function to move item from wishlist to cart.
|
* Function to move item from wishlist to cart.
|
||||||
|
|
@ -136,6 +130,13 @@ class WishlistController extends Controller
|
||||||
*/
|
*/
|
||||||
public function move($itemId) {
|
public function move($itemId) {
|
||||||
$wishlistItem = $this->wishlist->findOneByField('id', $itemId);
|
$wishlistItem = $this->wishlist->findOneByField('id', $itemId);
|
||||||
|
|
||||||
|
if(!isset($wishlistItem) || $wishlistItem->customer_id != auth()->guard('customer')->user()->id) {
|
||||||
|
session()->flash('warning', trans('shop::app.security-warning'));
|
||||||
|
|
||||||
|
return redirect()->route( 'customer.wishlist.index');
|
||||||
|
}
|
||||||
|
|
||||||
$result = Cart::moveToCart($wishlistItem);
|
$result = Cart::moveToCart($wishlistItem);
|
||||||
|
|
||||||
if ($result == 1) {
|
if ($result == 1) {
|
||||||
|
|
@ -151,16 +152,10 @@ class WishlistController extends Controller
|
||||||
return redirect()->back();
|
return redirect()->back();
|
||||||
}
|
}
|
||||||
} else if ($result == 0) {
|
} else if ($result == 0) {
|
||||||
Session('error', trans('shop::app.wishlist.error'));
|
session()->flash('error', trans('shop::app.wishlist.error'));
|
||||||
|
|
||||||
return redirect()->back();
|
return redirect()->back();
|
||||||
} else if ($result == -1) {
|
} else if ($result == -1) {
|
||||||
if (! $wishlistItem->delete()) {
|
|
||||||
session()->flash('error', trans('shop::app.wishlist.move-error'));
|
|
||||||
|
|
||||||
return redirect()->back();
|
|
||||||
}
|
|
||||||
|
|
||||||
session()->flash('info', trans('shop::app.checkout.cart.add-config-warning'));
|
session()->flash('info', trans('shop::app.checkout.cart.add-config-warning'));
|
||||||
|
|
||||||
return redirect()->route('shop.products.index', $wishlistItem->product->url_key);
|
return redirect()->route('shop.products.index', $wishlistItem->product->url_key);
|
||||||
|
|
|
||||||
|
|
@ -96,4 +96,11 @@ class Customer extends Authenticatable implements CustomerContract
|
||||||
public function all_reviews() {
|
public function all_reviews() {
|
||||||
return $this->hasMany(ProductReviewProxy::modelClass(), 'customer_id');
|
return $this->hasMany(ProductReviewProxy::modelClass(), 'customer_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get all orders of a customer
|
||||||
|
*/
|
||||||
|
public function all_orders() {
|
||||||
|
return $this->hasMany(OrderProxy::modelClass(), 'customer_id');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,71 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return array(
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Name of route
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Enter the routes name to enable dynamic imagecache manipulation.
|
||||||
|
| This handle will define the first part of the URI:
|
||||||
|
|
|
||||||
|
| {route}/{template}/{filename}
|
||||||
|
|
|
||||||
|
| Examples: "images", "img/cache"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'route' => 'cache',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Storage paths
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following paths will be searched for the image filename, submited
|
||||||
|
| by URI.
|
||||||
|
|
|
||||||
|
| Define as many directories as you like.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'paths' => array(
|
||||||
|
storage_path('app/public'),
|
||||||
|
public_path('storage')
|
||||||
|
),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Manipulation templates
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify your own manipulation filter templates.
|
||||||
|
| The keys of this array will define which templates
|
||||||
|
| are available in the URI:
|
||||||
|
|
|
||||||
|
| {route}/{template}/{filename}
|
||||||
|
|
|
||||||
|
| The values of this array will define which filter class
|
||||||
|
| will be applied, by its fully qualified name.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'templates' => array(
|
||||||
|
'small' => 'Webkul\Product\CacheFilters\Small',
|
||||||
|
'medium' => 'Webkul\Product\CacheFilters\Medium',
|
||||||
|
'large' => 'Webkul\Product\CacheFilters\Large',
|
||||||
|
),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Image Cache Lifetime
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Lifetime in minutes of the images handled by the imagecache route.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'lifetime' => 43200,
|
||||||
|
|
||||||
|
);
|
||||||
|
|
@ -219,8 +219,12 @@ class ProductController extends Controller
|
||||||
$productIds = explode(',', request()->input('indexes'));
|
$productIds = explode(',', request()->input('indexes'));
|
||||||
|
|
||||||
foreach ($productIds as $productId) {
|
foreach ($productIds as $productId) {
|
||||||
|
$product = $this->product->find($productId);
|
||||||
|
|
||||||
|
if(isset($product)) {
|
||||||
$this->product->delete($productId);
|
$this->product->delete($productId);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
session()->flash('success', trans('admin::app.catalog.products.mass-delete-success'));
|
session()->flash('success', trans('admin::app.catalog.products.mass-delete-success'));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,10 @@ class ProductServiceProvider extends ServiceProvider
|
||||||
$this->app->register(ModuleServiceProvider::class);
|
$this->app->register(ModuleServiceProvider::class);
|
||||||
|
|
||||||
$this->composeView();
|
$this->composeView();
|
||||||
|
|
||||||
|
$this->publishes([
|
||||||
|
dirname(__DIR__) . '/Config/imagecache.php' => config_path('imagecache.php'),
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -37,9 +37,17 @@ class SearchRepository extends Repository
|
||||||
}
|
}
|
||||||
|
|
||||||
public function search($data) {
|
public function search($data) {
|
||||||
$term = $data['term'];
|
$query = parse_url($_SERVER['REQUEST_URI'], PHP_URL_QUERY);
|
||||||
|
$searchTerm = explode("?", $query);
|
||||||
|
$serachQuery = '';
|
||||||
|
|
||||||
$products = $this->product->searchProductByAttribute($term);
|
foreach($searchTerm as $term){
|
||||||
|
if (strpos($term, 'term') !== false) {
|
||||||
|
$serachQuery = last(explode("=", $term));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$products = $this->product->searchProductByAttribute($serachQuery);
|
||||||
|
|
||||||
return $products;
|
return $products;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ namespace Webkul\Sales\Repositories;
|
||||||
|
|
||||||
use Illuminate\Container\Container as App;
|
use Illuminate\Container\Container as App;
|
||||||
use Webkul\Core\Eloquent\Repository;
|
use Webkul\Core\Eloquent\Repository;
|
||||||
|
use Illuminate\Support\Facades\Event;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ShipmentItem Reposotory
|
* ShipmentItem Reposotory
|
||||||
|
|
@ -67,5 +68,7 @@ class ShipmentItemRepository extends Repository
|
||||||
$inventory->update([
|
$inventory->update([
|
||||||
'qty' => $qty
|
'qty' => $qty
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
Event::fire('catalog.product.update.after', $data['product']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -20,6 +20,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"vee-validate": "2.0.0-rc.26",
|
"vee-validate": "2.0.0-rc.26",
|
||||||
"vue-flatpickr": "^2.3.0",
|
"vue-flatpickr": "^2.3.0",
|
||||||
"vue-slider-component": "^2.7.5"
|
"vue-slider-component": "^2.7.5",
|
||||||
|
"ez-plus": "^1.2.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<svg width="8px" height="8px" viewBox="0 0 8 8" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
<svg width="18px" height="18px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
<!-- Generator: Sketch 50 (54983) - http://www.bohemiancoding.com/sketch -->
|
<!-- Generator: Sketch 50.2 (55047) - http://www.bohemiancoding.com/sketch -->
|
||||||
<title>icon-dropdown</title>
|
<title>arrow-down</title>
|
||||||
<desc>Created with Sketch.</desc>
|
<desc>Created with Sketch.</desc>
|
||||||
<defs></defs>
|
<defs></defs>
|
||||||
<g id="icon-dropdown" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
<g id="arrow-down" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
<polygon id="›" fill="#242424" transform="translate(4.000000, 4.514496) rotate(-270.000000) translate(-4.000000, -4.514496) " points="1.48080444 8.51449585 4.54690552 4.51449585 1.48080444 0.51449585 3.48550415 0.51449585 6.51919556 4.51449585 3.48550415 8.51449585"></polygon>
|
<polygon id="Rectangle-2" fill="#A5A5A5" transform="translate(9.000000, 8.000000) rotate(-45.000000) translate(-9.000000, -8.000000) " points="6 5 12 11 6 11"></polygon>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 743 B After Width: | Height: | Size: 633 B |
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.1 KiB |
|
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"/js/shop.js": "/js/shop.js?id=391400bc9a994e60b97f",
|
"/js/shop.js": "/js/shop.js?id=412d129ed770afb5dee3",
|
||||||
"/css/shop.css": "/css/shop.css?id=460297557fd9ee391499"
|
"/css/shop.css": "/css/shop.css?id=068329de73da5012af0d"
|
||||||
}
|
}
|
||||||
|
|
@ -34,6 +34,7 @@ class OrderDataGrid extends DataGrid
|
||||||
'type' => 'number',
|
'type' => 'number',
|
||||||
'searchable' => false,
|
'searchable' => false,
|
||||||
'sortable' => true,
|
'sortable' => true,
|
||||||
|
'filterable' => true
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
|
|
@ -42,6 +43,7 @@ class OrderDataGrid extends DataGrid
|
||||||
'type' => 'datetime',
|
'type' => 'datetime',
|
||||||
'searchable' => true,
|
'searchable' => true,
|
||||||
'sortable' => true,
|
'sortable' => true,
|
||||||
|
'filterable' => true
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
|
|
@ -50,6 +52,7 @@ class OrderDataGrid extends DataGrid
|
||||||
'type' => 'price',
|
'type' => 'price',
|
||||||
'searchable' => true,
|
'searchable' => true,
|
||||||
'sortable' => true,
|
'sortable' => true,
|
||||||
|
'filterable' => true
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->addColumn([
|
$this->addColumn([
|
||||||
|
|
@ -74,7 +77,8 @@ class OrderDataGrid extends DataGrid
|
||||||
return '<span class="badge badge-md badge-warning">Pending Payment</span>';
|
return '<span class="badge badge-md badge-warning">Pending Payment</span>';
|
||||||
else if ($value->status == "fraud")
|
else if ($value->status == "fraud")
|
||||||
return '<span class="badge badge-md badge-danger">Fraud</span>';
|
return '<span class="badge badge-md badge-danger">Fraud</span>';
|
||||||
}
|
},
|
||||||
|
'filterable' => true
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ use Webkul\Checkout\Repositories\CartRepository;
|
||||||
use Webkul\Checkout\Repositories\CartItemRepository;
|
use Webkul\Checkout\Repositories\CartItemRepository;
|
||||||
use Webkul\Product\Repositories\ProductRepository;
|
use Webkul\Product\Repositories\ProductRepository;
|
||||||
use Webkul\Customer\Repositories\CustomerRepository;
|
use Webkul\Customer\Repositories\CustomerRepository;
|
||||||
|
use Webkul\Customer\Repositories\WishlistRepository;
|
||||||
use Webkul\Product\Helpers\ProductImage;
|
use Webkul\Product\Helpers\ProductImage;
|
||||||
use Webkul\Product\Helpers\View as ProductView;
|
use Webkul\Product\Helpers\View as ProductView;
|
||||||
use Illuminate\Support\Facades\Event;
|
use Illuminate\Support\Facades\Event;
|
||||||
|
|
@ -46,13 +47,23 @@ class CartController extends Controller
|
||||||
|
|
||||||
protected $productView;
|
protected $productView;
|
||||||
|
|
||||||
|
protected $suppressFlash = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WishlistRepository Repository object
|
||||||
|
*
|
||||||
|
* @var array
|
||||||
|
*/
|
||||||
|
protected $wishlist;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
CartRepository $cart,
|
CartRepository $cart,
|
||||||
CartItemRepository $cartItem,
|
CartItemRepository $cartItem,
|
||||||
CustomerRepository $customer,
|
CustomerRepository $customer,
|
||||||
ProductRepository $product,
|
ProductRepository $product,
|
||||||
ProductImage $productImage,
|
ProductImage $productImage,
|
||||||
ProductView $productView
|
ProductView $productView,
|
||||||
|
WishlistRepository $wishlist
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
@ -70,6 +81,8 @@ class CartController extends Controller
|
||||||
|
|
||||||
$this->productView = $productView;
|
$this->productView = $productView;
|
||||||
|
|
||||||
|
$this->wishlist = $wishlist;
|
||||||
|
|
||||||
$this->_config = request('_config');
|
$this->_config = request('_config');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -102,7 +115,19 @@ class CartController extends Controller
|
||||||
if ($result) {
|
if ($result) {
|
||||||
session()->flash('success', trans('shop::app.checkout.cart.item.success'));
|
session()->flash('success', trans('shop::app.checkout.cart.item.success'));
|
||||||
|
|
||||||
return redirect()->route($this->_config['redirect']);
|
if (auth()->guard('customer')->user()) {
|
||||||
|
$customer = auth()->guard('customer')->user();
|
||||||
|
|
||||||
|
if (count($customer->wishlist_items)) {
|
||||||
|
foreach ($customer->wishlist_items as $wishlist) {
|
||||||
|
if ($wishlist->product_id == $id) {
|
||||||
|
$this->wishlist->delete($wishlist->id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return redirect()->back();
|
||||||
} else {
|
} else {
|
||||||
session()->flash('warning', trans('shop::app.checkout.cart.item.error-add'));
|
session()->flash('warning', trans('shop::app.checkout.cart.item.error-add'));
|
||||||
|
|
||||||
|
|
@ -153,7 +178,6 @@ class CartController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
foreach ($request['qty'] as $key => $value) {
|
foreach ($request['qty'] as $key => $value) {
|
||||||
$item = $this->cartItem->findOneByField('id', $key);
|
$item = $this->cartItem->findOneByField('id', $key);
|
||||||
|
|
||||||
|
|
@ -161,7 +185,11 @@ class CartController extends Controller
|
||||||
|
|
||||||
Event::fire('checkout.cart.update.before', $key);
|
Event::fire('checkout.cart.update.before', $key);
|
||||||
|
|
||||||
Cart::updateItem($item->product_id, $data, $key);
|
$result = Cart::updateItem($item->product_id, $data, $key);
|
||||||
|
|
||||||
|
if ($result == false) {
|
||||||
|
$this->suppressFlash = true;
|
||||||
|
}
|
||||||
|
|
||||||
Event::fire('checkout.cart.update.after', $item);
|
Event::fire('checkout.cart.update.after', $item);
|
||||||
|
|
||||||
|
|
@ -171,6 +199,12 @@ class CartController extends Controller
|
||||||
|
|
||||||
Cart::collectTotals();
|
Cart::collectTotals();
|
||||||
|
|
||||||
|
if ($this->suppressFlash) {
|
||||||
|
session()->forget('success');
|
||||||
|
session()->forget('warning');
|
||||||
|
session()->flash('info', trans('shop::app.checkout.cart.partial-cart-update'));
|
||||||
|
}
|
||||||
|
|
||||||
return redirect()->back();
|
return redirect()->back();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ class ReviewController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display reviews accroding to product.
|
* Display reviews of particular product.
|
||||||
*
|
*
|
||||||
* @param string $slug
|
* @param string $slug
|
||||||
* @return \Illuminate\Http\Response
|
* @return \Illuminate\Http\Response
|
||||||
|
|
@ -113,21 +113,31 @@ class ReviewController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete the review of the current product
|
* Customer delete a reviews from their account
|
||||||
*
|
*
|
||||||
* @return response
|
* @return response
|
||||||
*/
|
*/
|
||||||
public function destroy($id)
|
public function destroy($id)
|
||||||
{
|
{
|
||||||
|
$reviews = auth()->guard('customer')->user()->all_reviews;
|
||||||
|
|
||||||
|
if ($reviews->count() > 0) {
|
||||||
|
foreach ($reviews as $review) {
|
||||||
|
if($review->id == $id) {
|
||||||
$this->productReview->delete($id);
|
$this->productReview->delete($id);
|
||||||
|
|
||||||
session()->flash('success', trans('shop::app.response.delete-success', ['name' => 'Product Review']));
|
session()->flash('success', trans('shop::app.response.delete-success', ['name' => 'Product Review']));
|
||||||
|
|
||||||
return redirect()->back();
|
return redirect()->route($this->_config['redirect']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return redirect()->route($this->_config['redirect']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function to delete all reviews
|
* Customer delete all reviews from their account
|
||||||
*
|
*
|
||||||
* @return Mixed Response & Boolean
|
* @return Mixed Response & Boolean
|
||||||
*/
|
*/
|
||||||
|
|
@ -142,6 +152,6 @@ class ReviewController extends Controller
|
||||||
|
|
||||||
session()->flash('success', trans('shop::app.reviews.delete-all'));
|
session()->flash('success', trans('shop::app.reviews.delete-all'));
|
||||||
|
|
||||||
return redirect()->back();
|
return redirect()->route($this->_config['redirect']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -29,7 +29,17 @@ class Currency
|
||||||
*/
|
*/
|
||||||
public function handle($request, Closure $next)
|
public function handle($request, Closure $next)
|
||||||
{
|
{
|
||||||
if ($currency = $request->get('currency')) {
|
$query = parse_url($_SERVER['REQUEST_URI'], PHP_URL_QUERY);
|
||||||
|
$currencyTerm = preg_split('/(\?|&)/', $query);
|
||||||
|
$currencyCode = '';
|
||||||
|
|
||||||
|
foreach($currencyTerm as $term){
|
||||||
|
if (strpos($term, 'currency') !== false) {
|
||||||
|
$currencyCode = last(explode("=", $term));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($currency = $currencyCode) {
|
||||||
if ($this->currency->findOneByField('code', $currency)) {
|
if ($this->currency->findOneByField('code', $currency)) {
|
||||||
session()->put('currency', $currency);
|
session()->put('currency', $currency);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,17 @@ class Locale
|
||||||
*/
|
*/
|
||||||
public function handle($request, Closure $next)
|
public function handle($request, Closure $next)
|
||||||
{
|
{
|
||||||
if ($locale = $request->get('locale')) {
|
$query = parse_url($_SERVER['REQUEST_URI'], PHP_URL_QUERY);
|
||||||
|
$localeTerm = preg_split('/(\?|&)/', $query);
|
||||||
|
$localCode = '';
|
||||||
|
|
||||||
|
foreach($localeTerm as $term){
|
||||||
|
if (strpos($term, 'locale') !== false) {
|
||||||
|
$localCode = last(explode("=", $term));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($locale = $localCode) {
|
||||||
if ($this->locale->findOneByField('code', $locale)) {
|
if ($this->locale->findOneByField('code', $locale)) {
|
||||||
app()->setLocale($locale);
|
app()->setLocale($locale);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Webkul\Shop\Http\ViewComposers;
|
|
||||||
|
|
||||||
use Illuminate\View\View;
|
|
||||||
use Illuminate\Support\Collection;
|
|
||||||
use Webkul\Category\Repositories\CategoryRepository as Category;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Category List Composer on Navigation Menu
|
|
||||||
*
|
|
||||||
* @author Prashant Singh <prashant.singh852@webkul.com>
|
|
||||||
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
|
||||||
*/
|
|
||||||
class CategoryComposer
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* The category implementation.
|
|
||||||
*
|
|
||||||
* for shop bundle's navigation
|
|
||||||
* menu
|
|
||||||
*/
|
|
||||||
protected $category;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Bind data to the view.
|
|
||||||
*
|
|
||||||
* @param View $view
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function __construct(Category $category)
|
|
||||||
{
|
|
||||||
$this->category = $category;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Bind data to the view.
|
|
||||||
*
|
|
||||||
* @param View $view
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function compose(View $view)
|
|
||||||
{
|
|
||||||
$categories = [];
|
|
||||||
|
|
||||||
foreach ($this->category->getVisibleCategoryTree(core()->getCurrentChannel()->root_category_id) as $category) {
|
|
||||||
if ($category->slug)
|
|
||||||
array_push($categories, $category);
|
|
||||||
}
|
|
||||||
|
|
||||||
$view->with('categories', $categories);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Webkul\Shop\Http\ViewComposers;
|
|
||||||
|
|
||||||
use Illuminate\View\View;
|
|
||||||
use Illuminate\Support\Collection;
|
|
||||||
use Webkul\Product\Repositories\ProductRepository as Product;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Featured Products page
|
|
||||||
*
|
|
||||||
* @author Jitendra Singh <jitendra@webkul.com>
|
|
||||||
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
|
||||||
*/
|
|
||||||
class FeaturedProductListComposer
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* ProductRepository object
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $product;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Bind data to the view.
|
|
||||||
*
|
|
||||||
* @param View $view
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function __construct(Product $product)
|
|
||||||
{
|
|
||||||
$this->product = $product;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Bind data to the view.
|
|
||||||
*
|
|
||||||
* @param View $view
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function compose(View $view)
|
|
||||||
{
|
|
||||||
$products = $this->product->getFeaturedProducts();
|
|
||||||
|
|
||||||
$view->with('products', $products);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,47 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Webkul\Shop\Http\ViewComposers;
|
|
||||||
|
|
||||||
use Illuminate\View\View;
|
|
||||||
use Illuminate\Support\Collection;
|
|
||||||
use Webkul\Product\Repositories\ProductRepository as Product;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* New Products page
|
|
||||||
*
|
|
||||||
* @author Jitendra Singh <jitendra@webkul.com>
|
|
||||||
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
|
||||||
*/
|
|
||||||
class NewProductListComposer
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* ProductRepository object
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $product;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Bind data to the view.
|
|
||||||
*
|
|
||||||
* @param View $view
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function __construct(Product $product)
|
|
||||||
{
|
|
||||||
$this->product = $product;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Bind data to the view.
|
|
||||||
*
|
|
||||||
* @param View $view
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function compose(View $view)
|
|
||||||
{
|
|
||||||
$products = $this->product->getNewProducts();
|
|
||||||
|
|
||||||
$view->with('products', $products);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -191,13 +191,13 @@ Route::group(['middleware' => ['web', 'theme', 'locale', 'currency']], function
|
||||||
])->name('customer.profile.index');
|
])->name('customer.profile.index');
|
||||||
|
|
||||||
//Customer Profile Edit Form Show
|
//Customer Profile Edit Form Show
|
||||||
Route::get('profile/edit', 'Webkul\Customer\Http\Controllers\CustomerController@editIndex')->defaults('_config', [
|
Route::get('profile/edit', 'Webkul\Customer\Http\Controllers\CustomerController@edit')->defaults('_config', [
|
||||||
'view' => 'shop::customers.account.profile.edit'
|
'view' => 'shop::customers.account.profile.edit'
|
||||||
])->name('customer.profile.edit');
|
])->name('customer.profile.edit');
|
||||||
|
|
||||||
//Customer Profile Edit Form Store
|
//Customer Profile Edit Form Store
|
||||||
Route::post('profile/edit', 'Webkul\Customer\Http\Controllers\CustomerController@edit')->defaults('_config', [
|
Route::post('profile/edit', 'Webkul\Customer\Http\Controllers\CustomerController@update')->defaults('_config', [
|
||||||
'view' => 'shop::customers.account.profile.edit'
|
'redirect' => 'shop::customers.account.index'
|
||||||
])->name('customer.profile.edit');
|
])->name('customer.profile.edit');
|
||||||
/* Profile Routes Ends Here */
|
/* Profile Routes Ends Here */
|
||||||
|
|
||||||
|
|
@ -242,17 +242,17 @@ Route::group(['middleware' => ['web', 'theme', 'locale', 'currency']], function
|
||||||
|
|
||||||
/* Orders route */
|
/* Orders route */
|
||||||
//Customer orders(listing)
|
//Customer orders(listing)
|
||||||
Route::get('orders', 'Webkul\Shop\Http\Controllers\OrderController@index')->defaults('_config', [
|
Route::get('orders', 'Webkul\Customer\Http\Controllers\OrderController@index')->defaults('_config', [
|
||||||
'view' => 'shop::customers.account.orders.index'
|
'view' => 'shop::customers.account.orders.index'
|
||||||
])->name('customer.orders.index');
|
])->name('customer.orders.index');
|
||||||
|
|
||||||
//Customer orders view summary and status
|
//Customer orders view summary and status
|
||||||
Route::get('orders/view/{id}', 'Webkul\Shop\Http\Controllers\OrderController@view')->defaults('_config', [
|
Route::get('orders/view/{id}', 'Webkul\Customer\Http\Controllers\OrderController@view')->defaults('_config', [
|
||||||
'view' => 'shop::customers.account.orders.view'
|
'view' => 'shop::customers.account.orders.view'
|
||||||
])->name('customer.orders.view');
|
])->name('customer.orders.view');
|
||||||
|
|
||||||
//Prints invoice
|
//Prints invoice
|
||||||
Route::get('orders/print/{id}', 'Webkul\Shop\Http\Controllers\OrderController@print')->defaults('_config', [
|
Route::get('orders/print/{id}', 'Webkul\Customer\Http\Controllers\OrderController@print')->defaults('_config', [
|
||||||
'view' => 'shop::customers.account.orders.print'
|
'view' => 'shop::customers.account.orders.print'
|
||||||
])->name('customer.orders.print');
|
])->name('customer.orders.print');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
namespace Webkul\Shop\Providers;
|
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Event;
|
|
||||||
use Illuminate\Support\Facades\Blade;
|
|
||||||
use Illuminate\Support\ServiceProvider;
|
|
||||||
use Webkul\Product\Helpers\ProductImage;
|
|
||||||
use View;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Composer service provider
|
|
||||||
*
|
|
||||||
* @author Jitendra Singh <jitendra@webkul.com>
|
|
||||||
* @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
|
|
||||||
*/
|
|
||||||
class ComposerServiceProvider extends ServiceProvider
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Register bindings in the container.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function boot()
|
|
||||||
{
|
|
||||||
View::composer(
|
|
||||||
['shop::layouts.header.index', 'shop::layouts.footer.footer'],
|
|
||||||
'Webkul\Shop\Http\ViewComposers\CategoryComposer'
|
|
||||||
);
|
|
||||||
|
|
||||||
View::composer(
|
|
||||||
['shop::home.new-products'],
|
|
||||||
'Webkul\Shop\Http\ViewComposers\NewProductListComposer'
|
|
||||||
);
|
|
||||||
|
|
||||||
View::composer(
|
|
||||||
['shop::home.featured-products'],
|
|
||||||
'Webkul\Shop\Http\ViewComposers\FeaturedProductListComposer'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -9,7 +9,6 @@ use Illuminate\Pagination\Paginator;
|
||||||
use Webkul\Shop\Http\Middleware\Locale;
|
use Webkul\Shop\Http\Middleware\Locale;
|
||||||
use Webkul\Shop\Http\Middleware\Theme;
|
use Webkul\Shop\Http\Middleware\Theme;
|
||||||
use Webkul\Shop\Http\Middleware\Currency;
|
use Webkul\Shop\Http\Middleware\Currency;
|
||||||
use Webkul\Shop\Providers\ComposerServiceProvider;
|
|
||||||
use Webkul\Core\Tree;
|
use Webkul\Core\Tree;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -41,8 +40,6 @@ class ShopServiceProvider extends ServiceProvider
|
||||||
$router->aliasMiddleware('theme', Theme::class);
|
$router->aliasMiddleware('theme', Theme::class);
|
||||||
$router->aliasMiddleware('currency', Currency::class);
|
$router->aliasMiddleware('currency', Currency::class);
|
||||||
|
|
||||||
$this->app->register(ComposerServiceProvider::class);
|
|
||||||
|
|
||||||
$this->composeView();
|
$this->composeView();
|
||||||
|
|
||||||
Paginator::defaultView('shop::partials.pagination');
|
Paginator::defaultView('shop::partials.pagination');
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<svg width="8px" height="8px" viewBox="0 0 8 8" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
<svg width="18px" height="18px" viewBox="0 0 18 18" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
<!-- Generator: Sketch 50 (54983) - http://www.bohemiancoding.com/sketch -->
|
<!-- Generator: Sketch 50.2 (55047) - http://www.bohemiancoding.com/sketch -->
|
||||||
<title>icon-dropdown</title>
|
<title>arrow-down</title>
|
||||||
<desc>Created with Sketch.</desc>
|
<desc>Created with Sketch.</desc>
|
||||||
<defs></defs>
|
<defs></defs>
|
||||||
<g id="icon-dropdown" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
<g id="arrow-down" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
<polygon id="›" fill="#242424" transform="translate(4.000000, 4.514496) rotate(-270.000000) translate(-4.000000, -4.514496) " points="1.48080444 8.51449585 4.54690552 4.51449585 1.48080444 0.51449585 3.48550415 0.51449585 6.51919556 4.51449585 3.48550415 8.51449585"></polygon>
|
<polygon id="Rectangle-2" fill="#A5A5A5" transform="translate(9.000000, 8.000000) rotate(-45.000000) translate(-9.000000, -8.000000) " points="6 5 12 11 6 11"></polygon>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 743 B After Width: | Height: | Size: 633 B |
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.1 KiB |
|
|
@ -3,6 +3,7 @@ window.Vue = require("vue");
|
||||||
window.VeeValidate = require("vee-validate");
|
window.VeeValidate = require("vee-validate");
|
||||||
window.axios = require("axios");
|
window.axios = require("axios");
|
||||||
require("./bootstrap");
|
require("./bootstrap");
|
||||||
|
require("ez-plus/src/jquery.ez-plus.js");
|
||||||
|
|
||||||
Vue.use(VeeValidate);
|
Vue.use(VeeValidate);
|
||||||
Vue.prototype.$http = axios
|
Vue.prototype.$http = axios
|
||||||
|
|
|
||||||
|
|
@ -443,6 +443,8 @@ input {
|
||||||
max-width: 280px;
|
max-width: 280px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
background: $background-color;
|
background: $background-color;
|
||||||
|
min-height: 300px;
|
||||||
|
min-width: 250px;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
display: block;
|
display: block;
|
||||||
|
|
@ -931,7 +933,7 @@ section.slider-block {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
|
|
||||||
.btn.btn-sm {
|
.btn.btn-sm {
|
||||||
padding: 9px 30px;
|
padding: 9px 25px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1067,7 +1069,7 @@ section.slider-block {
|
||||||
color: $font-color;
|
color: $font-color;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
padding: 0.8em 0.3em 0.8em 0.5em;
|
padding: 0.8em 0.3em 0.8em 0.5em;
|
||||||
text-transform: uppercase;
|
text-transform: capitalize;
|
||||||
letter-spacing: -0.38px;
|
letter-spacing: -0.38px;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
@ -1083,7 +1085,6 @@ section.slider-block {
|
||||||
|
|
||||||
.nav li {
|
.nav li {
|
||||||
position: relative;
|
position: relative;
|
||||||
height:45px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav > li {
|
.nav > li {
|
||||||
|
|
@ -1101,6 +1102,9 @@ section.slider-block {
|
||||||
|
|
||||||
.nav li li a {
|
.nav li li a {
|
||||||
margin-top: 1px;
|
margin-top: 1px;
|
||||||
|
white-space: initial;
|
||||||
|
word-break: break-word;
|
||||||
|
width: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav li a:first-child:nth-last-child(2):before {
|
.nav li a:first-child:nth-last-child(2):before {
|
||||||
|
|
@ -1120,7 +1124,7 @@ section.slider-block {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
border: 1px solid $border-color;
|
border: 1px solid $border-color;
|
||||||
background-color:white;
|
background-color:white;
|
||||||
z-index: 1;
|
z-index: 10000;
|
||||||
left: -99999em;
|
left: -99999em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1808,7 +1812,7 @@ section.product-detail {
|
||||||
.addtocart {
|
.addtocart {
|
||||||
width: 49%;
|
width: 49%;
|
||||||
background: black;
|
background: black;
|
||||||
white-space: nowrap;
|
white-space: normal;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1822,6 +1826,7 @@ section.product-detail {
|
||||||
|
|
||||||
.details {
|
.details {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
|
overflow-wrap: break-word;
|
||||||
|
|
||||||
.product-price {
|
.product-price {
|
||||||
margin-bottom: 14px;
|
margin-bottom: 14px;
|
||||||
|
|
@ -3483,7 +3488,6 @@ section.review {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// rtl css start here
|
/// rtl css start here
|
||||||
.rtl {
|
.rtl {
|
||||||
direction: rtl;
|
direction: rtl;
|
||||||
|
|
@ -3653,7 +3657,7 @@ section.review {
|
||||||
// product card
|
// product card
|
||||||
.main-container-wrapper .product-card .sticker {
|
.main-container-wrapper .product-card .sticker {
|
||||||
left: auto;
|
left: auto;
|
||||||
right: 10px;
|
right: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main-container-wrapper .product-card .cart-wish-wrap .addtocart {
|
.main-container-wrapper .product-card .cart-wish-wrap .addtocart {
|
||||||
|
|
@ -4025,6 +4029,14 @@ section.review {
|
||||||
left: auto;
|
left: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.product-list {
|
||||||
|
.product-card .product-information {
|
||||||
|
padding-left: 0px;
|
||||||
|
padding-right: 30px;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/// rtl css end here
|
/// rtl css end here
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -385,7 +385,8 @@ return [
|
||||||
],
|
],
|
||||||
'quantity-error' => 'الكمية المطلوبة غير متوفرة',
|
'quantity-error' => 'الكمية المطلوبة غير متوفرة',
|
||||||
'cart-subtotal' => 'المجموع الفرعي للعربات',
|
'cart-subtotal' => 'المجموع الفرعي للعربات',
|
||||||
'cart-remove-action' => 'هل تريد حقا أن تفعل هذا ؟'
|
'cart-remove-action' => 'هل تريد حقا أن تفعل هذا ؟',
|
||||||
|
'partial-cart-update' => 'Only some of the product(s) were updated'
|
||||||
],
|
],
|
||||||
|
|
||||||
'onepage' => [
|
'onepage' => [
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
'security-warning' => 'Suspicious Activity Found!!!',
|
||||||
|
'nothing-to-delete' => 'Nothing to delete',
|
||||||
|
|
||||||
'layouts' => [
|
'layouts' => [
|
||||||
'my-account' => 'My Account',
|
'my-account' => 'My Account',
|
||||||
'profile' => 'Profile',
|
'profile' => 'Profile',
|
||||||
|
|
@ -216,8 +219,9 @@ return [
|
||||||
'edit' => [
|
'edit' => [
|
||||||
'page-title' => 'Customer - Edit Address',
|
'page-title' => 'Customer - Edit Address',
|
||||||
'title' => 'Edit Address',
|
'title' => 'Edit Address',
|
||||||
|
'street-address' => 'Street Address',
|
||||||
'submit' => 'Save Address',
|
'submit' => 'Save Address',
|
||||||
'success' => 'Address Updated Successfully.'
|
'success' => 'Address Updated Successfully.',
|
||||||
],
|
],
|
||||||
'delete' => [
|
'delete' => [
|
||||||
'success' => 'Address Successfully Deleted',
|
'success' => 'Address Successfully Deleted',
|
||||||
|
|
@ -389,7 +393,8 @@ return [
|
||||||
],
|
],
|
||||||
'quantity-error' => 'Requested Quantity Is Not Available',
|
'quantity-error' => 'Requested Quantity Is Not Available',
|
||||||
'cart-subtotal' => 'Cart Subtotal',
|
'cart-subtotal' => 'Cart Subtotal',
|
||||||
'cart-remove-action' => 'Do you really want to do this ?'
|
'cart-remove-action' => 'Do you really want to do this ?',
|
||||||
|
'partial-cart-update' => 'Only some of the product(s) were updated'
|
||||||
],
|
],
|
||||||
|
|
||||||
'onepage' => [
|
'onepage' => [
|
||||||
|
|
|
||||||
|
|
@ -202,7 +202,7 @@ return [
|
||||||
'page-title' => 'Cliente - Adicionar Endereço',
|
'page-title' => 'Cliente - Adicionar Endereço',
|
||||||
'title' => 'Novo Endereço',
|
'title' => 'Novo Endereço',
|
||||||
'address1' => 'Endereço Linha 1',
|
'address1' => 'Endereço Linha 1',
|
||||||
'address2' => 'Endereço Linha 2',
|
'street-address' => 'Endereço',
|
||||||
'country' => 'País',
|
'country' => 'País',
|
||||||
'state' => 'Estado',
|
'state' => 'Estado',
|
||||||
'select-state' => 'Select a region, state or province',
|
'select-state' => 'Select a region, state or province',
|
||||||
|
|
@ -390,7 +390,8 @@ return [
|
||||||
],
|
],
|
||||||
'quantity-error' => 'Quantidade solicitada não está disponível',
|
'quantity-error' => 'Quantidade solicitada não está disponível',
|
||||||
'cart-subtotal' => 'Subtotal do carrinho',
|
'cart-subtotal' => 'Subtotal do carrinho',
|
||||||
'cart-remove-action' => 'Você realmente quer fazer isso ?'
|
'cart-remove-action' => 'Você realmente quer fazer isso ?',
|
||||||
|
'partial-cart-update' => 'Only some of the product(s) were updated'
|
||||||
],
|
],
|
||||||
|
|
||||||
'onepage' => [
|
'onepage' => [
|
||||||
|
|
|
||||||
|
|
@ -108,11 +108,11 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="control-group" :class="[errors.has('address-form.billing[address1][]') ? 'has-error' : '']">
|
<div class="control-group" :class="[errors.has('address-form.billing[address1][]') ? 'has-error' : '']">
|
||||||
<label for="billing[address1][]" class="required">
|
<label for="billing_address_0" class="required">
|
||||||
{{ __('shop::app.checkout.onepage.address1') }}
|
{{ __('shop::app.checkout.onepage.address1') }}
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<input type="text" v-validate="'required'" class="control" id="billing[address1][]" name="billing[address1][]" v-model="address.billing.address1[0]" data-vv-as=""{{ __('shop::app.checkout.onepage.address1') }}""/>
|
<input type="text" v-validate="'required'" class="control" id="billing_address_0" name="billing[address1][]" v-model="address.billing.address1[0]" data-vv-as=""{{ __('shop::app.checkout.onepage.address1') }}""/>
|
||||||
|
|
||||||
<span class="control-error" v-if="errors.has('address-form.billing[address1][]')">
|
<span class="control-error" v-if="errors.has('address-form.billing[address1][]')">
|
||||||
@{{ errors.first('address-form.billing[address1][]') }}
|
@{{ errors.first('address-form.billing[address1][]') }}
|
||||||
|
|
@ -122,7 +122,7 @@
|
||||||
@if (core()->getConfigData('customer.settings.address.street_lines') && core()->getConfigData('customer.settings.address.street_lines') > 1)
|
@if (core()->getConfigData('customer.settings.address.street_lines') && core()->getConfigData('customer.settings.address.street_lines') > 1)
|
||||||
<div class="control-group" style="margin-top: -25px;">
|
<div class="control-group" style="margin-top: -25px;">
|
||||||
@for ($i = 1; $i < core()->getConfigData('customer.settings.address.street_lines'); $i++)
|
@for ($i = 1; $i < core()->getConfigData('customer.settings.address.street_lines'); $i++)
|
||||||
<input type="text" class="control" name="address1[]" v-model="address.billing.address1[{{$i}}]">
|
<input type="text" class="control" name="billing[address1][{{ $i }}]" id="billing_address_{{ $i }}" v-model="address.billing.address1[{{$i}}]">
|
||||||
@endfor
|
@endfor
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
@ -324,11 +324,11 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="control-group" :class="[errors.has('address-form.shipping[address1][]') ? 'has-error' : '']">
|
<div class="control-group" :class="[errors.has('address-form.shipping[address1][]') ? 'has-error' : '']">
|
||||||
<label for="shipping[address1][]" class="required">
|
<label for="shipping_address_0" class="required">
|
||||||
{{ __('shop::app.checkout.onepage.address1') }}
|
{{ __('shop::app.checkout.onepage.address1') }}
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<input type="text" v-validate="'required'" class="control" id="shipping[address1][]" name="shipping[address1][]" v-model="address.shipping.address1[0]" data-vv-as=""{{ __('shop::app.checkout.onepage.address1') }}""/>
|
<input type="text" v-validate="'required'" class="control" id="shipping_address_0" name="shipping[address1][]" v-model="address.shipping.address1[0]" data-vv-as=""{{ __('shop::app.checkout.onepage.address1') }}""/>
|
||||||
|
|
||||||
<span class="control-error" v-if="errors.has('address-form.shipping[address1][]')">
|
<span class="control-error" v-if="errors.has('address-form.shipping[address1][]')">
|
||||||
@{{ errors.first('address-form.shipping[address1][]') }}
|
@{{ errors.first('address-form.shipping[address1][]') }}
|
||||||
|
|
@ -338,7 +338,7 @@
|
||||||
@if (core()->getConfigData('customer.settings.address.street_lines') && core()->getConfigData('customer.settings.address.street_lines') > 1)
|
@if (core()->getConfigData('customer.settings.address.street_lines') && core()->getConfigData('customer.settings.address.street_lines') > 1)
|
||||||
<div class="control-group" style="margin-top: -25px;">
|
<div class="control-group" style="margin-top: -25px;">
|
||||||
@for ($i = 1; $i < core()->getConfigData('customer.settings.address.street_lines'); $i++)
|
@for ($i = 1; $i < core()->getConfigData('customer.settings.address.street_lines'); $i++)
|
||||||
<input type="text" class="control" name="address1[]" v-model="address.shipping.address1[{{$i}}]">
|
<input type="text" class="control" name="shipping[address1][{{ $i }}]" id="shipping_address_{{ $i }}" v-model="address.shipping.address1[{{$i}}]">
|
||||||
@endfor
|
@endfor
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
|
||||||
|
|
@ -27,15 +27,15 @@
|
||||||
{!! view_render_event('bagisto.shop.customers.account.address.create_form_controls.before') !!}
|
{!! view_render_event('bagisto.shop.customers.account.address.create_form_controls.before') !!}
|
||||||
|
|
||||||
<div class="control-group" :class="[errors.has('address1[]') ? 'has-error' : '']">
|
<div class="control-group" :class="[errors.has('address1[]') ? 'has-error' : '']">
|
||||||
<label for="address1[]" class="required">{{ __('shop::app.customer.account.address.create.street-address') }}</label>
|
<label for="address_0" class="required">{{ __('shop::app.customer.account.address.create.street-address') }}</label>
|
||||||
<input type="text" class="control" name="address1[]" v-validate="'required'" data-vv-as=""{{ __('shop::app.customer.account.address.create.street-address') }}"">
|
<input type="text" class="control" name="address1[]" id="address_0" v-validate="'required'" data-vv-as=""{{ __('shop::app.customer.account.address.create.street-address') }}"">
|
||||||
<span class="control-error" v-if="errors.has('address1[]')">@{{ errors.first('address1[]') }}</span>
|
<span class="control-error" v-if="errors.has('address1[]')">@{{ errors.first('address1[]') }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if (core()->getConfigData('customer.settings.address.street_lines') && core()->getConfigData('customer.settings.address.street_lines') > 1)
|
@if (core()->getConfigData('customer.settings.address.street_lines') && core()->getConfigData('customer.settings.address.street_lines') > 1)
|
||||||
<div class="control-group" style="margin-top: -25px;">
|
<div class="control-group" style="margin-top: -25px;">
|
||||||
@for ($i = 1; $i < core()->getConfigData('customer.settings.address.street_lines'); $i++)
|
@for ($i = 1; $i < core()->getConfigData('customer.settings.address.street_lines'); $i++)
|
||||||
<input type="text" class="control" name="address1[]">
|
<input type="text" class="control" name="address1[{{ $i }}]" id="address_{{ $i }}">
|
||||||
@endfor
|
@endfor
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
|
||||||
|
|
@ -31,15 +31,15 @@
|
||||||
<?php $addresses = explode(PHP_EOL, $address->address1); ?>
|
<?php $addresses = explode(PHP_EOL, $address->address1); ?>
|
||||||
|
|
||||||
<div class="control-group" :class="[errors.has('address1[]') ? 'has-error' : '']">
|
<div class="control-group" :class="[errors.has('address1[]') ? 'has-error' : '']">
|
||||||
<label for="first_name" class="required">{{ __('shop::app.customer.account.address.create.street-address') }}</label>
|
<label for="address_0" class="required">{{ __('shop::app.customer.account.address.edit.street-address') }}</label>
|
||||||
<input type="text" class="control" name="address1[]" v-validate="'required'" value="{{ isset($addresses[0]) ? $addresses[0] : '' }}" data-vv-as=""{{ __('shop::app.customer.account.address.create.street-address') }}"">
|
<input type="text" class="control" name="address1[]" id="address_0" v-validate="'required'" value="{{ isset($addresses[0]) ? $addresses[0] : '' }}" data-vv-as=""{{ __('shop::app.customer.account.address.create.street-address') }}"">
|
||||||
<span class="control-error" v-if="errors.has('address1[]')">@{{ errors.first('address1[]') }}</span>
|
<span class="control-error" v-if="errors.has('address1[]')">@{{ errors.first('address1[]') }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if (core()->getConfigData('customer.settings.address.street_lines') && core()->getConfigData('customer.settings.address.street_lines') > 1)
|
@if (core()->getConfigData('customer.settings.address.street_lines') && core()->getConfigData('customer.settings.address.street_lines') > 1)
|
||||||
<div class="control-group" style="margin-top: -25px;">
|
<div class="control-group" style="margin-top: -25px;">
|
||||||
@for ($i = 1; $i < core()->getConfigData('customer.settings.address.street_lines'); $i++)
|
@for ($i = 1; $i < core()->getConfigData('customer.settings.address.street_lines'); $i++)
|
||||||
<input type="text" class="control" name="address1[]" value="{{ isset($addresses[$i]) ? $addresses[$i] : '' }}">
|
<input type="text" class="control" name="address1[{{ $i }}]" id="address_{{ $i }}" value="{{ isset($addresses[$i]) ? $addresses[$i] : '' }}">
|
||||||
@endfor
|
@endfor
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
|
||||||
|
|
@ -31,18 +31,16 @@
|
||||||
@php
|
@php
|
||||||
$image = $productImageHelper->getProductBaseImage($item->product);
|
$image = $productImageHelper->getProductBaseImage($item->product);
|
||||||
@endphp
|
@endphp
|
||||||
<img class="media" src="{{ $image['small_image_url'] }}" />
|
|
||||||
{{-- <a href="{{ url()->to('/').'/products/'.$item->product->url_key }}" title="{{ $item->product->name }}">
|
|
||||||
|
|
||||||
</a> --}}
|
<img class="media" src="{{ $image['small_image_url'] }}" />
|
||||||
|
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<div class="product-name">
|
<div class="product-name">
|
||||||
{{$item->product->name}}
|
{{$item->product->name}}
|
||||||
{{-- <a href="{{ url()->to('/').'/products/'.$item->product->url_key }}" title="{{ $item->product->name }}">
|
|
||||||
|
|
||||||
</a> --}}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@inject ('reviewHelper', 'Webkul\Product\Helpers\Review')
|
@inject ('reviewHelper', 'Webkul\Product\Helpers\Review')
|
||||||
|
|
||||||
<span class="stars" style="display: inline">
|
<span class="stars" style="display: inline">
|
||||||
@for($i=1;$i<=$reviewHelper->getAverageRating($item->product);$i++)
|
@for($i=1;$i<=$reviewHelper->getAverageRating($item->product);$i++)
|
||||||
<span class="icon star-icon"></span>
|
<span class="icon star-icon"></span>
|
||||||
|
|
@ -59,6 +57,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="horizontal-rule mb-10 mt-10"></div>
|
<div class="horizontal-rule mb-10 mt-10"></div>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
@else
|
@else
|
||||||
<div class="empty">
|
<div class="empty">
|
||||||
{{ __('customer::app.wishlist.empty') }}
|
{{ __('customer::app.wishlist.empty') }}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@if ($products->count())
|
@if (app('Webkul\Product\Repositories\ProductRepository')->getFeaturedProducts()->count())
|
||||||
<section class="featured-products">
|
<section class="featured-products">
|
||||||
|
|
||||||
<div class="featured-heading">
|
<div class="featured-heading">
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
<div class="featured-grid product-grid-4">
|
<div class="featured-grid product-grid-4">
|
||||||
|
|
||||||
@foreach ($products as $productFlat)
|
@foreach (app('Webkul\Product\Repositories\ProductRepository')->getFeaturedProducts() as $productFlat)
|
||||||
|
|
||||||
@include ('shop::products.list.card', ['product' => $productFlat->product])
|
@include ('shop::products.list.card', ['product' => $productFlat->product])
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@if ($products->count())
|
@if (app('Webkul\Product\Repositories\ProductRepository')->getNewProducts()->count())
|
||||||
<section class="featured-products">
|
<section class="featured-products">
|
||||||
|
|
||||||
<div class="featured-heading">
|
<div class="featured-heading">
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
<div class="product-grid-4">
|
<div class="product-grid-4">
|
||||||
|
|
||||||
@foreach ($products as $productFlat)
|
@foreach (app('Webkul\Product\Repositories\ProductRepository')->getNewProducts() as $productFlat)
|
||||||
|
|
||||||
@include ('shop::products.list.card', ['product' => $productFlat->product])
|
@include ('shop::products.list.card', ['product' => $productFlat->product])
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,15 @@
|
||||||
<div class="footer-content">
|
<div class="footer-content">
|
||||||
<div class="footer-list-container">
|
<div class="footer-list-container">
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$categories = [];
|
||||||
|
|
||||||
|
foreach (app('Webkul\Category\Repositories\CategoryRepository')->getVisibleCategoryTree(core()->getCurrentChannel()->root_category_id) as $category){
|
||||||
|
if ($category->slug)
|
||||||
|
array_push($categories, $category);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
@if (count($categories))
|
@if (count($categories))
|
||||||
<div class="list-container">
|
<div class="list-container">
|
||||||
<span class="list-heading">Categories</span>
|
<span class="list-heading">Categories</span>
|
||||||
|
|
@ -30,13 +39,28 @@
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$query = parse_url($_SERVER['REQUEST_URI'], PHP_URL_QUERY);
|
||||||
|
$searchTerm = explode("?", $query);
|
||||||
|
|
||||||
|
foreach($searchTerm as $term){
|
||||||
|
if (strpos($term, 'term') !== false) {
|
||||||
|
$serachQuery = $term;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
<span class="list-heading">{{ __('shop::app.footer.locale') }}</span>
|
<span class="list-heading">{{ __('shop::app.footer.locale') }}</span>
|
||||||
<div class="form-container">
|
<div class="form-container">
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<select class="control locale-switcher" onchange="window.location.href = this.value">
|
<select class="control locale-switcher" onchange="window.location.href = this.value">
|
||||||
|
|
||||||
@foreach (core()->getCurrentChannel()->locales as $locale)
|
@foreach (core()->getCurrentChannel()->locales as $locale)
|
||||||
|
@if(isset($serachQuery))
|
||||||
|
<option value="?{{ $serachQuery }}?locale={{ $locale->code }}" {{ $locale->code == app()->getLocale() ? 'selected' : '' }}>{{ $locale->name }}</option>
|
||||||
|
@else
|
||||||
<option value="?locale={{ $locale->code }}" {{ $locale->code == app()->getLocale() ? 'selected' : '' }}>{{ $locale->name }}</option>
|
<option value="?locale={{ $locale->code }}" {{ $locale->code == app()->getLocale() ? 'selected' : '' }}>{{ $locale->name }}</option>
|
||||||
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -50,7 +74,11 @@
|
||||||
<select class="control locale-switcher" onchange="window.location.href = this.value">
|
<select class="control locale-switcher" onchange="window.location.href = this.value">
|
||||||
|
|
||||||
@foreach (core()->getCurrentChannel()->currencies as $currency)
|
@foreach (core()->getCurrentChannel()->currencies as $currency)
|
||||||
|
@if(isset($serachQuery))
|
||||||
|
<option value="?{{ $serachQuery }}?currency={{ $currency->code }}" {{ $currency->code == core()->getCurrentCurrencyCode() ? 'selected' : '' }}>{{ $currency->code }}</option>
|
||||||
|
@else
|
||||||
<option value="?currency={{ $currency->code }}" {{ $currency->code == core()->getCurrentCurrencyCode() ? 'selected' : '' }}>{{ $currency->code }}</option>
|
<option value="?currency={{ $currency->code }}" {{ $currency->code == core()->getCurrentCurrencyCode() ? 'selected' : '' }}>{{ $currency->code }}</option>
|
||||||
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,16 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$query = parse_url($_SERVER['REQUEST_URI'], PHP_URL_QUERY);
|
||||||
|
$searchTerm = explode("?", $query);
|
||||||
|
|
||||||
|
foreach($searchTerm as $term){
|
||||||
|
if (strpos($term, 'term') !== false) {
|
||||||
|
$serachQuery = $term;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
<div class="right-content">
|
<div class="right-content">
|
||||||
|
|
||||||
|
|
@ -48,7 +58,11 @@
|
||||||
<ul class="dropdown-list currency">
|
<ul class="dropdown-list currency">
|
||||||
@foreach (core()->getCurrentChannel()->currencies as $currency)
|
@foreach (core()->getCurrentChannel()->currencies as $currency)
|
||||||
<li>
|
<li>
|
||||||
|
@if(isset($serachQuery))
|
||||||
|
<a href="?{{ $serachQuery }}?currency={{ $currency->code }}">{{ $currency->code }}</a>
|
||||||
|
@else
|
||||||
<a href="?currency={{ $currency->code }}">{{ $currency->code }}</a>
|
<a href="?currency={{ $currency->code }}">{{ $currency->code }}</a>
|
||||||
|
@endif
|
||||||
</li>
|
</li>
|
||||||
@endforeach
|
@endforeach
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,16 @@
|
||||||
{!! view_render_event('bagisto.shop.layout.header.category.before') !!}
|
{!! view_render_event('bagisto.shop.layout.header.category.before') !!}
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$categories = [];
|
||||||
|
|
||||||
|
foreach (app('Webkul\Category\Repositories\CategoryRepository')->getVisibleCategoryTree(core()->getCurrentChannel()->root_category_id) as $category) {
|
||||||
|
if ($category->slug)
|
||||||
|
array_push($categories, $category);
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
<category-nav categories='@json($categories)' url="{{url()->to('/')}}"></category-nav>
|
<category-nav categories='@json($categories)' url="{{url()->to('/')}}"></category-nav>
|
||||||
|
|
||||||
{!! view_render_event('bagisto.shop.layout.header.category.after') !!}
|
{!! view_render_event('bagisto.shop.layout.header.category.after') !!}
|
||||||
|
|
@ -27,8 +27,8 @@
|
||||||
<i class="icon arrow-up-white-icon"></i>
|
<i class="icon arrow-up-white-icon"></i>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="thumb-frame" v-for='(thumb, index) in thumbs' @mouseover="changeImage(thumb)" :class="[thumb.large_image_url == currentLargeImageUrl ? 'active' : '']">
|
<li class="thumb-frame" v-for='(thumb, index) in thumbs' @mouseover="changeImage(thumb)" :class="[thumb.large_image_url == currentLargeImageUrl ? 'active' : '']" id="thumb-frame">
|
||||||
<img :src="thumb.small_image_url"/>
|
<img :src="thumb.small_image_url" :data-image="thumb.large_image_url" :data-zoom-image="thumb.original_image_url"/>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="gallery-control bottom" @click="moveThumbs('bottom')" v-if="(thumbs.length > 4) && this.is_move.down">
|
<li class="gallery-control bottom" @click="moveThumbs('bottom')" v-if="(thumbs.length > 4) && this.is_move.down">
|
||||||
|
|
@ -143,4 +143,21 @@
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
var image = $('#thumb-frame img');
|
||||||
|
var zoomImage = $('img#pro-img');
|
||||||
|
|
||||||
|
zoomImage.ezPlus();
|
||||||
|
|
||||||
|
image.mouseover( function(){
|
||||||
|
$('.zoomContainer').remove();
|
||||||
|
zoomImage.removeData('elevateZoom');
|
||||||
|
zoomImage.attr('src', $(this).data('image'));
|
||||||
|
zoomImage.data('zoom-image', $(this).data('zoom-image'));
|
||||||
|
zoomImage.ezPlus();
|
||||||
|
});
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
@endpush
|
@endpush
|
||||||
|
|
@ -84,7 +84,7 @@ class TaxRateController extends Controller
|
||||||
'zip_to' => 'nullable|required_with:is_zip,zip_from',
|
'zip_to' => 'nullable|required_with:is_zip,zip_from',
|
||||||
'state' => 'required|string',
|
'state' => 'required|string',
|
||||||
'country' => 'required|string',
|
'country' => 'required|string',
|
||||||
'tax_rate' => 'required|numeric'
|
'tax_rate' => 'required|numeric|min:0.0001'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$data = request()->all();
|
$data = request()->all();
|
||||||
|
|
@ -134,7 +134,7 @@ class TaxRateController extends Controller
|
||||||
'zip_to' => 'nullable|required_with:is_zip,zip_from',
|
'zip_to' => 'nullable|required_with:is_zip,zip_from',
|
||||||
'state' => 'required|string',
|
'state' => 'required|string',
|
||||||
'country' => 'required|string',
|
'country' => 'required|string',
|
||||||
'tax_rate' => 'required|numeric'
|
'tax_rate' => 'required|numeric|min:0.0001'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
Event::fire('tax.tax_rate.update.before', $id);
|
Event::fire('tax.tax_rate.update.before', $id);
|
||||||
|
|
@ -189,11 +189,20 @@ class TaxRateController extends Controller
|
||||||
|
|
||||||
foreach ($excelData as $data) {
|
foreach ($excelData as $data) {
|
||||||
foreach ($data as $column => $uploadData) {
|
foreach ($data as $column => $uploadData) {
|
||||||
|
|
||||||
|
if (!is_null($uploadData['zip_from']) && !is_null($uploadData['zip_to'])) {
|
||||||
|
$uploadData['is_zip'] = 1;
|
||||||
|
}
|
||||||
|
|
||||||
$validator = Validator::make($uploadData, [
|
$validator = Validator::make($uploadData, [
|
||||||
'identifier' => 'required|string',
|
'identifier' => 'required|string',
|
||||||
'state' => 'required|string',
|
'state' => 'required|string',
|
||||||
'country' => 'required|string',
|
'country' => 'required|string',
|
||||||
'tax_rate' => 'required|numeric'
|
'tax_rate' => 'required|numeric|min:0.0001',
|
||||||
|
'is_zip' => 'sometimes',
|
||||||
|
'zip_code' => 'sometimes|required_without:is_zip',
|
||||||
|
'zip_from' => 'nullable|required_with:is_zip',
|
||||||
|
'zip_to' => 'nullable|required_with:is_zip,zip_from',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if ($validator->fails()) {
|
if ($validator->fails()) {
|
||||||
|
|
@ -230,6 +239,12 @@ class TaxRateController extends Controller
|
||||||
$errorMsg[$coulmn] = $fail->first('country');
|
$errorMsg[$coulmn] = $fail->first('country');
|
||||||
} else if ($fail->first('state')) {
|
} else if ($fail->first('state')) {
|
||||||
$errorMsg[$coulmn] = $fail->first('state');
|
$errorMsg[$coulmn] = $fail->first('state');
|
||||||
|
} else if ($fail->first('zip_code')) {
|
||||||
|
$errorMsg[$coulmn] = $fail->first('zip_code');
|
||||||
|
} else if ($fail->first('zip_from')) {
|
||||||
|
$errorMsg[$coulmn] = $fail->first('zip_from');
|
||||||
|
} else if ($fail->first('zip_to')) {
|
||||||
|
$errorMsg[$coulmn] = $fail->first('zip_to');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -250,6 +265,11 @@ class TaxRateController extends Controller
|
||||||
|
|
||||||
foreach ($excelData as $data) {
|
foreach ($excelData as $data) {
|
||||||
foreach ($data as $column => $uploadData) {
|
foreach ($data as $column => $uploadData) {
|
||||||
|
if (!is_null($uploadData['zip_from']) && !is_null($uploadData['zip_to'])) {
|
||||||
|
$uploadData['is_zip'] = 1;
|
||||||
|
$uploadData['zip_code'] = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($rateIdentifier)) {
|
if (isset($rateIdentifier)) {
|
||||||
$id = array_search($uploadData['identifier'], $rateIdentifier);
|
$id = array_search($uploadData['identifier'], $rateIdentifier);
|
||||||
if ($id) {
|
if ($id) {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<label class="image-item" :for="_uid" v-bind:class="{ 'has-image': imageData.length > 0 }">
|
<label class="image-item" :for="_uid" v-bind:class="{ 'has-image': imageData.length > 0 }">
|
||||||
<input type="hidden" :name="finalInputName"/>
|
<input type="hidden" :name="finalInputName"/>
|
||||||
|
|
||||||
<input type="file" v-validate="'mimes:image/*'" accept="image/*" :name="finalInputName" ref="imageInput" :id="_uid" @change="addImageView($event)"/>
|
<input type="file" v-validate="'mimes:image/*'" accept="image/*" :name="finalInputName" ref="imageInput" :id="_uid" @change="addImageView($event)" :required="required ? true : false" />
|
||||||
|
|
||||||
<img class="preview" :src="imageData" v-if="imageData.length > 0">
|
<img class="preview" :src="imageData" v-if="imageData.length > 0">
|
||||||
|
|
||||||
|
|
@ -27,6 +27,12 @@
|
||||||
type: Object,
|
type: Object,
|
||||||
required: false,
|
required: false,
|
||||||
default: null
|
default: null
|
||||||
|
},
|
||||||
|
|
||||||
|
required: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
:key='image.id'
|
:key='image.id'
|
||||||
:image="image"
|
:image="image"
|
||||||
:input-name="inputName"
|
:input-name="inputName"
|
||||||
|
:required="required"
|
||||||
:remove-button-label="removeButtonLabel"
|
:remove-button-label="removeButtonLabel"
|
||||||
@onRemoveImage="removeImage($event)"
|
@onRemoveImage="removeImage($event)"
|
||||||
></image-item>
|
></image-item>
|
||||||
|
|
@ -46,6 +47,12 @@
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
required: false,
|
required: false,
|
||||||
default: true
|
default: true
|
||||||
|
},
|
||||||
|
|
||||||
|
required: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,6 @@ class Bouncer
|
||||||
public static function allow($permission)
|
public static function allow($permission)
|
||||||
{
|
{
|
||||||
if (! auth()->guard('admin')->check() || ! auth()->guard('admin')->user()->hasPermission($permission))
|
if (! auth()->guard('admin')->check() || ! auth()->guard('admin')->user()->hasPermission($permission))
|
||||||
abort(401, 'This action is unauthorized.');
|
abort(401, 'This action is unauthorized');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,18 +1,9 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat:400,500">
|
|
||||||
<title>Bagisto Installer</title>
|
|
||||||
<link rel="icon" sizes="16x16" href="Images/favicon.ico">
|
|
||||||
|
|
||||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
|
||||||
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-form-validator/2.3.26/jquery.form-validator.min.js"></script>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div class="container admin" id="admin">
|
<div class="container admin" id="admin">
|
||||||
<div class="initial-display" style="padding-top: 100px;">
|
<div class="initial-display">
|
||||||
<img class="logo" src="Images/logo.svg">
|
|
||||||
<p>Admin Details</p>
|
<p>Admin Details</p>
|
||||||
|
|
||||||
<form action="AdminConfig.php" method= "POST" id="admin-form">
|
<form action="AdminConfig.php" method= "POST" id="admin-form">
|
||||||
|
|
@ -33,13 +24,13 @@
|
||||||
<div class="control-group" id="admin_password">
|
<div class="control-group" id="admin_password">
|
||||||
<label for="admin_password" class="required">Password</label>
|
<label for="admin_password" class="required">Password</label>
|
||||||
<input type="password" name="admin_password" class="control"
|
<input type="password" name="admin_password" class="control"
|
||||||
data-validation="length required" data-validation-length="max50">
|
data-validation="length required" data-validation-length="min6">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="control-group" id="admin_re_password">
|
<div class="control-group" id="admin_re_password">
|
||||||
<label for="admin_re_password" class="required">Re-Password</label>
|
<label for="admin_re_password" class="required">Re-Password</label>
|
||||||
<input type="password" name="admin_re_password" class="control"
|
<input type="password" name="admin_re_password" class="control"
|
||||||
data-validation="length required" data-validation-length="max50">
|
data-validation="length required" data-validation-length="min6">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -49,10 +40,6 @@
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
|
||||||
<img class="left-patern" src="Images/left-side.svg">
|
|
||||||
<img class="right-patern" src="Images/right-side.svg">
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
@ -63,7 +50,6 @@
|
||||||
$.validate({});
|
$.validate({});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
// process the form
|
// process the form
|
||||||
|
|
@ -77,10 +63,12 @@
|
||||||
'admin_password' : $('input[name=admin_password]').val(),
|
'admin_password' : $('input[name=admin_password]').val(),
|
||||||
'admin_re_password' : $('input[name=admin_re_password]').val(),
|
'admin_re_password' : $('input[name=admin_re_password]').val(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var adminTarget = window.location.href.concat('/AdminConfig.php');
|
||||||
// process the form
|
// process the form
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type : 'POST', // define the type of HTTP verb we want to use (POST for our form)
|
type : 'POST', // define the type of HTTP verb we want to use (POST for our form)
|
||||||
url : 'AdminConfig.php', // the url where we want to POST
|
url : adminTarget, // the url where we want to POST
|
||||||
data : formData, // our data object
|
data : formData, // our data object
|
||||||
dataType : 'json', // what type of data do we expect back from the server
|
dataType : 'json', // what type of data do we expect back from the server
|
||||||
encode : true
|
encode : true
|
||||||
|
|
|
||||||
|
|
@ -41,17 +41,16 @@ $data = array();
|
||||||
$envFile = $desiredLocation . '/' . '.env';
|
$envFile = $desiredLocation . '/' . '.env';
|
||||||
|
|
||||||
// reading env content
|
// reading env content
|
||||||
$str= file_get_contents($envFile);
|
$data = file($envFile);
|
||||||
|
|
||||||
// converting env content to key/value pair
|
|
||||||
$data = explode(PHP_EOL,$str);
|
|
||||||
$databaseArray = ['DB_HOST', 'DB_DATABASE', 'DB_USERNAME', 'DB_PASSWORD', 'DB_CONNECTION'];
|
$databaseArray = ['DB_HOST', 'DB_DATABASE', 'DB_USERNAME', 'DB_PASSWORD', 'DB_CONNECTION'];
|
||||||
|
|
||||||
$key = $value = [];
|
$key = $value = [];
|
||||||
|
|
||||||
if ($data) {
|
if ($data) {
|
||||||
foreach ($data as $line) {
|
foreach ($data as $line) {
|
||||||
|
$line = preg_replace('/\s+/', '', $line);
|
||||||
$rowValues = explode('=', $line);
|
$rowValues = explode('=', $line);
|
||||||
if (count($rowValues) === 2) {
|
|
||||||
|
if (strlen($line) !== 0) {
|
||||||
if (in_array($rowValues[0], $databaseArray)) {
|
if (in_array($rowValues[0], $databaseArray)) {
|
||||||
$key[] = $rowValues[0];
|
$key[] = $rowValues[0];
|
||||||
$value[] = $rowValues[1];
|
$value[] = $rowValues[1];
|
||||||
|
|
|
||||||
|
|
@ -1,112 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
class Permission {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
protected $results = [];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set the result array permissions and errors.
|
|
||||||
*
|
|
||||||
* @return mixed
|
|
||||||
*/
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
$this->results['permissions'] = [];
|
|
||||||
|
|
||||||
$this->results['errors'] = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check for the folders permissions.
|
|
||||||
*
|
|
||||||
* @param array $folders
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function check()
|
|
||||||
{
|
|
||||||
$folders = [
|
|
||||||
// 'permissions' => [
|
|
||||||
'storage/framework/' => '775',
|
|
||||||
'storage/logs/' => '775',
|
|
||||||
'bootstrap/cache/' => '775'
|
|
||||||
// ]
|
|
||||||
];
|
|
||||||
|
|
||||||
foreach($folders as $folder => $permission)
|
|
||||||
{
|
|
||||||
if (!($this->getPermission($folder) >= $permission)) {
|
|
||||||
$this->addFileAndSetErrors($folder, $permission, false);
|
|
||||||
} else {
|
|
||||||
$this->addFile($folder, $permission, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->results;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get a folder permission.
|
|
||||||
*
|
|
||||||
* @param $folder
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
private function getPermission($folder)
|
|
||||||
{
|
|
||||||
$location = str_replace('\\', '/', getcwd());
|
|
||||||
$currentLocation = explode("/", $location);
|
|
||||||
array_pop($currentLocation);
|
|
||||||
array_pop($currentLocation);
|
|
||||||
$desiredLocation = implode("/", $currentLocation);
|
|
||||||
$fileLocation = $desiredLocation . '/' .$folder;
|
|
||||||
|
|
||||||
return substr(sprintf('%o', fileperms($fileLocation)), -4);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add the file to the list of results.
|
|
||||||
*
|
|
||||||
* @param $folder
|
|
||||||
* @param $permission
|
|
||||||
* @param $isSet
|
|
||||||
*/
|
|
||||||
private function addFile($folder, $permission, $isSet)
|
|
||||||
{
|
|
||||||
array_push($this->results['permissions'], [
|
|
||||||
'folder' => $folder,
|
|
||||||
'permission' => $permission,
|
|
||||||
'isSet' => $isSet
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add the file and set the errors.
|
|
||||||
*
|
|
||||||
* @param $folder
|
|
||||||
* @param $permission
|
|
||||||
* @param $isSet
|
|
||||||
*/
|
|
||||||
private function addFileAndSetErrors($folder, $permission, $isSet)
|
|
||||||
{
|
|
||||||
$this->addFile($folder, $permission, $isSet);
|
|
||||||
|
|
||||||
$this->results['errors'] = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Render view for class.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public function render()
|
|
||||||
{
|
|
||||||
ob_start();
|
|
||||||
|
|
||||||
$permissions = $this->check();
|
|
||||||
|
|
||||||
include __DIR__ . '/../Views/permission.blade.php';
|
|
||||||
|
|
||||||
return ob_get_clean();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -116,6 +116,30 @@ class Requirement {
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check composer installation.
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function composerInstall()
|
||||||
|
{
|
||||||
|
$location = str_replace('\\', '/', getcwd());
|
||||||
|
$currentLocation = explode("/", $location);
|
||||||
|
array_pop($currentLocation);
|
||||||
|
array_pop($currentLocation);
|
||||||
|
$desiredLocation = implode("/", $currentLocation);
|
||||||
|
$autoLoadFile = $desiredLocation . '/' . 'vendor' . '/' . 'autoload.php';
|
||||||
|
|
||||||
|
if (file_exists($autoLoadFile)) {
|
||||||
|
$data['composer_install'] = 0;
|
||||||
|
} else {
|
||||||
|
$data['composer_install'] = 1;
|
||||||
|
$data['composer'] = 'Composer dependencies is not Installed.Go to root of project, run "composer install" command to install composer dependencies & refresh page again.';
|
||||||
|
}
|
||||||
|
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Render view for class.
|
* Render view for class.
|
||||||
*
|
*
|
||||||
|
|
@ -126,6 +150,8 @@ class Requirement {
|
||||||
|
|
||||||
$phpVersion = $this->checkPHPversion();
|
$phpVersion = $this->checkPHPversion();
|
||||||
|
|
||||||
|
$composerInstall = $this->composerInstall();
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
include __DIR__ . '/../Views/requirements.blade.php';
|
include __DIR__ . '/../Views/requirements.blade.php';
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// array to pass back data
|
|
||||||
$data = array();
|
$data = array();
|
||||||
|
|
||||||
$location = str_replace('\\', '/', getcwd());
|
|
||||||
$currentLocation = explode("/", $location);
|
|
||||||
array_pop($currentLocation);
|
|
||||||
array_pop($currentLocation);
|
|
||||||
$desiredLocation = implode("/", $currentLocation);
|
|
||||||
|
|
||||||
$autoLoadFile = $desiredLocation . '/' . 'vendor' . '/' . 'autoload.php';
|
|
||||||
|
|
||||||
if (file_exists($autoLoadFile)) {
|
|
||||||
$data['install'] = 0;
|
$data['install'] = 0;
|
||||||
} else {
|
|
||||||
$data['install'] = 1;
|
|
||||||
$data['composer'] = 'Composer dependencies is not Installed.Go to root of project, run "composer install" command to install composer dependencies & refresh page again.';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// return a response
|
|
||||||
//return all our data to an AJAX call
|
|
||||||
|
|
||||||
echo json_encode($data);
|
echo json_encode($data);
|
||||||
|
|
@ -24,9 +24,6 @@ $data = array();
|
||||||
if (empty($_POST['user_name']))
|
if (empty($_POST['user_name']))
|
||||||
$errors['user_name'] = 'User Name is required.';
|
$errors['user_name'] = 'User Name is required.';
|
||||||
|
|
||||||
if (empty($_POST['user_password']))
|
|
||||||
$errors['user_password'] = 'User Password is required.';
|
|
||||||
|
|
||||||
if (empty($_POST['port_name']))
|
if (empty($_POST['port_name']))
|
||||||
$errors['port_name'] = 'Port Name is required.';
|
$errors['port_name'] = 'Port Name is required.';
|
||||||
|
|
||||||
|
|
@ -83,20 +80,16 @@ $data = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
// reading env content
|
// reading env content
|
||||||
$str= file_get_contents($envFile);
|
$data = file($envFile);
|
||||||
|
|
||||||
// converting env content to key/value pair
|
|
||||||
$data = explode(PHP_EOL,$str);
|
|
||||||
$keyValueData = [];
|
$keyValueData = [];
|
||||||
|
|
||||||
if ($data) {
|
if ($data) {
|
||||||
foreach ($data as $line) {
|
foreach ($data as $line) {
|
||||||
|
$line = preg_replace('/\s+/', '', $line);
|
||||||
$rowValues = explode('=', $line);
|
$rowValues = explode('=', $line);
|
||||||
if (count($rowValues) === 2) {
|
|
||||||
|
if (strlen($line) !== 0) {
|
||||||
$keyValueData[$rowValues[0]] = $rowValues[1];
|
$keyValueData[$rowValues[0]] = $rowValues[1];
|
||||||
} else if (count($rowValues) > 2) {
|
|
||||||
$eqPos = strpos($line, '=');
|
|
||||||
$keyValueData[substr($line, 0, $eqPos)] = substr($line,$eqPos+1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,9 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat:400,500">
|
|
||||||
<title>Bagisto Installer</title>
|
|
||||||
<link rel="icon" sizes="16x16" href="Images/favicon.ico">
|
|
||||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
|
||||||
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-form-validator/2.3.26/jquery.form-validator.min.js"></script>
|
|
||||||
<link rel="stylesheet" type="text/css" href="CSS/style.css">
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div class="container environment" id="environment">
|
<div class="container environment" id="environment">
|
||||||
<div class="initial-display" style="padding-top: 100px;">
|
<div class="initial-display">
|
||||||
<img class="logo" src="Images/logo.svg">
|
|
||||||
<p>Environment Configuration</p>
|
<p>Environment Configuration</p>
|
||||||
|
|
||||||
<form action="EnvConfig.php" method="POST" id="environment-form">
|
<form action="EnvConfig.php" method="POST" id="environment-form">
|
||||||
|
|
@ -78,8 +69,7 @@
|
||||||
<div class="control-group" id="user_password">
|
<div class="control-group" id="user_password">
|
||||||
<label for="user_password" class="required">User Password</label>
|
<label for="user_password" class="required">User Password</label>
|
||||||
<input type="text" name="user_password" class="control"
|
<input type="text" name="user_password" class="control"
|
||||||
placeholder="database password"
|
placeholder="database password">
|
||||||
data-validation="length required" data-validation-length="max50">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -92,11 +82,6 @@
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="footer">
|
|
||||||
<img class="left-patern" src="Images/left-side.svg">
|
|
||||||
<img class="right-patern" src="Images/right-side.svg">
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
@ -125,13 +110,14 @@
|
||||||
'user_name' : $('input[name=user_name]').val(),
|
'user_name' : $('input[name=user_name]').val(),
|
||||||
'user_password' : $('input[name=user_password]').val(),
|
'user_password' : $('input[name=user_password]').val(),
|
||||||
'database_connection' : $("#database_connection" ).val(),
|
'database_connection' : $("#database_connection" ).val(),
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var target = window.location.href.concat('/EnvConfig.php');
|
||||||
|
|
||||||
// process the form
|
// process the form
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type : 'POST',
|
type : 'POST',
|
||||||
url : 'EnvConfig.php',
|
url : target,
|
||||||
data : formData,
|
data : formData,
|
||||||
dataType : 'json',
|
dataType : 'json',
|
||||||
encode : true
|
encode : true
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,9 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat:400,500">
|
|
||||||
<title>Bagisto Installer</title>
|
|
||||||
<link rel="icon" sizes="16x16" href="Images/favicon.ico">
|
|
||||||
<link rel="stylesheet" type="text/css" href="CSS/style.css">
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div class="container finish" id="finish">
|
<div class="container finish" id="finish">
|
||||||
<div class="initial-display" style="padding-top: 100px;">
|
<div class="initial-display">
|
||||||
<img class="logo" src="Images/logo.svg">
|
|
||||||
<p>Finish Installment</p>
|
<p>Finish Installment</p>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="content-container" style="padding: 20px">
|
<div class="content-container" style="padding: 20px">
|
||||||
|
|
@ -23,10 +16,6 @@
|
||||||
<button class="prepare-btn" onclick="finish()">Finish</button>
|
<button class="prepare-btn" onclick="finish()">Finish</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
|
||||||
<img class="left-patern" src="Images/left-side.svg">
|
|
||||||
<img class="right-patern" src="Images/right-side.svg">
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,4 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat:400,500">
|
|
||||||
<title>Bagisto Installer</title>
|
|
||||||
<link rel="icon" sizes="16x16" href="Images/favicon.ico">
|
|
||||||
<link rel="stylesheet" type="text/css" href="CSS/style.css">
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.window {
|
.window {
|
||||||
|
|
@ -59,8 +53,7 @@
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div class="container migration" id="migration">
|
<div class="container migration" id="migration">
|
||||||
<div class="initial-display" style="padding-top: 100px;">
|
<div class="initial-display">
|
||||||
<img class="logo" src="Images/logo.svg">
|
|
||||||
<p>Migration & Seed</p>
|
<p>Migration & Seed</p>
|
||||||
|
|
||||||
<div class="cp-spinner cp-round" id="loader">
|
<div class="cp-spinner cp-round" id="loader">
|
||||||
|
|
@ -82,9 +75,6 @@
|
||||||
<div style="text-align: center;">
|
<div style="text-align: center;">
|
||||||
<span> Click the below button to run following : </span>
|
<span> Click the below button to run following : </span>
|
||||||
</div>
|
</div>
|
||||||
<div class="message" style="margin-top: 20px">
|
|
||||||
<span> Check Composer dependency </span>
|
|
||||||
</div>
|
|
||||||
<div class="message">
|
<div class="message">
|
||||||
<span>Database Migartion </span>
|
<span>Database Migartion </span>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -115,10 +105,6 @@
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
|
||||||
<img class="left-patern" src="Images/left-side.svg">
|
|
||||||
<img class="right-patern" src="Images/right-side.svg">
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
@ -144,10 +130,12 @@
|
||||||
$('#storage').hide();
|
$('#storage').hide();
|
||||||
$('#composer').hide();
|
$('#composer').hide();
|
||||||
|
|
||||||
|
var composerTarget = window.location.href.concat('/Composer.php');
|
||||||
|
|
||||||
// process form
|
// process form
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type : 'POST',
|
type : 'POST',
|
||||||
url : 'Composer.php',
|
url : composerTarget,
|
||||||
dataType : 'json',
|
dataType : 'json',
|
||||||
encode : true
|
encode : true
|
||||||
})
|
})
|
||||||
|
|
@ -163,10 +151,12 @@
|
||||||
if (data['install'] == 0) {
|
if (data['install'] == 0) {
|
||||||
$('#composer-migrate').show();
|
$('#composer-migrate').show();
|
||||||
|
|
||||||
|
var migrationTarget = window.location.href.concat('/MigrationRun.php');
|
||||||
|
|
||||||
// post the request again
|
// post the request again
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type : 'POST',
|
type : 'POST',
|
||||||
url : 'MigrationRun.php',
|
url : migrationTarget,
|
||||||
dataType : 'json',
|
dataType : 'json',
|
||||||
encode : true
|
encode : true
|
||||||
})
|
})
|
||||||
|
|
@ -178,9 +168,11 @@
|
||||||
if (data['results'] == 0) {
|
if (data['results'] == 0) {
|
||||||
$('#composer-seed').show();
|
$('#composer-seed').show();
|
||||||
|
|
||||||
|
var seederTarget = window.location.href.concat('/Seeder.php');
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type : 'POST',
|
type : 'POST',
|
||||||
url : 'Seeder.php',
|
url : seederTarget,
|
||||||
dataType : 'json',
|
dataType : 'json',
|
||||||
encode : true
|
encode : true
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
ini_set('max_execution_time', 300);
|
||||||
|
|
||||||
// array to pass back data
|
// array to pass back data
|
||||||
$data = array();
|
$data = array();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ $data = array();
|
||||||
// run command on terminal
|
// run command on terminal
|
||||||
$key = 'cd ../.. && php artisan key:generate 2>&1';
|
$key = 'cd ../.. && php artisan key:generate 2>&1';
|
||||||
$seeder = 'cd ../.. && php artisan db:seed 2>&1';
|
$seeder = 'cd ../.. && php artisan db:seed 2>&1';
|
||||||
$publish = 'cd ../.. && php artisan vendor:publish 2>&1';
|
$publish = 'cd ../.. && php artisan vendor:publish --all --force 2>&1';
|
||||||
|
|
||||||
$key_output = exec($key, $data['key'], $data['key_results']);
|
$key_output = exec($key, $data['key'], $data['key_results']);
|
||||||
$seeder_output = exec($seeder, $data['seeder'], $data['seeder_results']);
|
$seeder_output = exec($seeder, $data['seeder'], $data['seeder_results']);
|
||||||
|
|
|
||||||
|
|
@ -1,61 +0,0 @@
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat:400,500">
|
|
||||||
<title>Bagisto Installer</title>
|
|
||||||
<link rel="icon" sizes="16x16" href="Images/favicon.ico">
|
|
||||||
<link rel="stylesheet" type="text/css" href="CSS/style.css">
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<div class="container permission" id="permission">
|
|
||||||
<div class="initial-display" style="padding-top: 100px;">
|
|
||||||
<img class="logo" src="Images/logo.svg">
|
|
||||||
<p>Permission</p>
|
|
||||||
|
|
||||||
<div class="content">
|
|
||||||
<div class="title" style="text-align: center; margin-top: 10px">
|
|
||||||
Please wait while we are checking the permissions
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php foreach($permissions['permissions'] as $permission): ?>
|
|
||||||
<div class="check" style="margin-left: 20%">
|
|
||||||
<?php if($permission['isSet'] ? $src = 'Images/green-check.svg' : $src = 'Images/red-check.svg' ): ?>
|
|
||||||
<img src="<?php echo $src ?>">
|
|
||||||
<?php endif; ?>
|
|
||||||
<span style="margin-left: 10px"><b><?php echo $permission['folder'] ?></b></span>
|
|
||||||
<span>(<?php echo $permission['permission'] ?> folder permission Required)</span>
|
|
||||||
</div>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<?php if(!isset($permissions['errors'])): ?>
|
|
||||||
<div>
|
|
||||||
<button class="prepare-btn" id="permission-check">Continue</button>
|
|
||||||
</div>
|
|
||||||
<div style="cursor: pointer; margin-top:10px">
|
|
||||||
<span id="permission-back">back</span>
|
|
||||||
</div>
|
|
||||||
<?php endif; ?>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="footer">
|
|
||||||
<img class="left-patern" src="Images/left-side.svg">
|
|
||||||
<img class="right-patern" src="Images/right-side.svg">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,16 +1,16 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat:400,500">
|
<?php
|
||||||
<title>Bagisto Installer</title>
|
$actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
||||||
<link rel="icon" sizes="16x16" href="Images/favicon.ico">
|
|
||||||
<link rel="stylesheet" type="text/css" href="CSS/style.css">
|
$greenCheck = $actual_link .'/'. 'Images/green-check.svg';
|
||||||
</head>
|
$redCheck = $actual_link .'/'. 'Images/red-check.svg';
|
||||||
|
?>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div class="container requirement" id="requirement">
|
<div class="container requirement" id="requirement">
|
||||||
<div class="initial-display" style="padding-top: 100px;">
|
<div class="initial-display">
|
||||||
<img class="logo" src="Images/logo.svg">
|
|
||||||
<p>Requirement</p>
|
<p>Requirement</p>
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="check" style="margin-left: 25%">
|
<div class="check" style="margin-left: 25%">
|
||||||
<?php if($phpVersion['supported'] ? $src = 'Images/green-check.svg' : $src = 'Images/red-check.svg' ): ?>
|
<?php if($phpVersion['supported'] ? $src = $greenCheck : $src = $redCheck): ?>
|
||||||
<img src="<?php echo $src ?>">
|
<img src="<?php echo $src ?>">
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<span style="margin-left: 10px"><b>PHP</b></span>
|
<span style="margin-left: 10px"><b>PHP</b></span>
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
<?php foreach($requirements['requirements'][$type] as $extention => $enabled) : ?>
|
<?php foreach($requirements['requirements'][$type] as $extention => $enabled) : ?>
|
||||||
<div class="check" style="margin-left: 25%">
|
<div class="check" style="margin-left: 25%">
|
||||||
<?php if($enabled ? $src = 'Images/green-check.svg' : $src = 'Images/red-check.svg' ): ?>
|
<?php if($enabled ? $src = $greenCheck : $src = $redCheck ): ?>
|
||||||
<img src="<?php echo $src ?>">
|
<img src="<?php echo $src ?>">
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<span style="margin-left: 10px"><b><?php echo $extention ?></b></span>
|
<span style="margin-left: 10px"><b><?php echo $extention ?></b></span>
|
||||||
|
|
@ -39,9 +39,23 @@
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|
||||||
|
<php class="check" style="margin-left: 25%">
|
||||||
|
<?php if(($composerInstall['composer_install'] == 0) ? $src = $greenCheck : $src = $redCheck ): ?>
|
||||||
|
<img src="<?php echo $src ?>">
|
||||||
|
<span style="margin-left: 10px"><b>Composer</b></span>
|
||||||
|
<?php endif; ?>
|
||||||
|
</php>
|
||||||
|
|
||||||
|
<div style="margin-left: 30%;">
|
||||||
|
<?php if(!($composerInstall['composer_install'] == 0)): ?>
|
||||||
|
<span style="margin-left: 10px; color: red;"><?php echo $composerInstall['composer'] ?></span>
|
||||||
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php if(!isset($requirements['errors']) && $phpVersion['supported']): ?>
|
</div>
|
||||||
|
|
||||||
|
<?php if(!isset($requirements['errors']) && ($phpVersion['supported'] && $composerInstall['composer_install'] == 0)): ?>
|
||||||
<div>
|
<div>
|
||||||
<button type="button" class="prepare-btn" id="requirement-check">Continue</button>
|
<button type="button" class="prepare-btn" id="requirement-check">Continue</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -49,11 +63,6 @@
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="footer">
|
|
||||||
<img class="left-patern" src="Images/left-side.svg">
|
|
||||||
<img class="right-patern" src="Images/right-side.svg">
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,9 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat:400,500">
|
|
||||||
<title>Bagisto Installer</title>
|
|
||||||
<link rel="icon" sizes="16x16" href="Images/favicon.ico">
|
|
||||||
<link rel="stylesheet" type="text/css" href="CSS/style.css">
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div class="container welcome" id="welcome">
|
<div class="container welcome" id="welcome">
|
||||||
<div class="initial-display" style="padding-top: 100px;">
|
<div class="initial-display">
|
||||||
<img class="logo" src="Images/logo.svg">
|
|
||||||
<p>Welcome to Bagisto</p>
|
<p>Welcome to Bagisto</p>
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
@ -31,11 +26,6 @@
|
||||||
<button type="button" class="prepare-btn" id="welcome-check">Accept</button>
|
<button type="button" class="prepare-btn" id="welcome-check">Accept</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="footer">
|
|
||||||
<img class="left-patern" src="Images/left-side.svg">
|
|
||||||
<img class="right-patern" src="Images/right-side.svg">
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,36 @@
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
||||||
|
|
||||||
|
$cssUrl = $actual_link .'/'. 'CSS/style.css';
|
||||||
|
$logo = $actual_link .'/'. 'Images/logo.svg';
|
||||||
|
$leftIcon = $actual_link .'/'. 'Images/left-side.svg';
|
||||||
|
$rightIcon = $actual_link .'/'. 'Images/right-side.svg';
|
||||||
|
?>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat:400,500">
|
||||||
|
<title>Bagisto Installer</title>
|
||||||
|
<link rel="icon" sizes="16x16" href="Images/favicon.ico">
|
||||||
|
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||||
|
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-form-validator/2.3.26/jquery.form-validator.min.js"></script>
|
||||||
|
<link rel="stylesheet" type="text/css" href= "<?php echo $cssUrl; ?> ">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="container requirement">
|
||||||
|
<div class="initial-display" style="padding-top: 100px;">
|
||||||
|
<img class="logo" src= "<?php echo $logo; ?>" >
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="footer">
|
||||||
|
<img class="left-patern" src= "<?php echo $leftIcon; ?>" >
|
||||||
|
<img class="right-patern" src= "<?php echo $rightIcon; ?>" >
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
// getting env file
|
// getting env file
|
||||||
$location = str_replace('\\', '/', getcwd());
|
$location = str_replace('\\', '/', getcwd());
|
||||||
|
|
@ -12,17 +45,16 @@
|
||||||
if (file_exists($envFile)) {
|
if (file_exists($envFile)) {
|
||||||
|
|
||||||
// reading env content
|
// reading env content
|
||||||
$str= file_get_contents($envFile);
|
$data = file($envFile);
|
||||||
|
|
||||||
// converting env content to key/value pair
|
|
||||||
$data = explode(PHP_EOL,$str);
|
|
||||||
$databaseArray = ['DB_HOST', 'DB_DATABASE', 'DB_USERNAME', 'DB_PASSWORD', 'DB_CONNECTION','DB_PORT'];
|
$databaseArray = ['DB_HOST', 'DB_DATABASE', 'DB_USERNAME', 'DB_PASSWORD', 'DB_CONNECTION','DB_PORT'];
|
||||||
|
|
||||||
$key = $value = [];
|
$key = $value = [];
|
||||||
|
|
||||||
if ($data) {
|
if ($data) {
|
||||||
foreach ($data as $line) {
|
foreach ($data as $line) {
|
||||||
|
$line = preg_replace('/\s+/', '', $line);
|
||||||
$rowValues = explode('=', $line);
|
$rowValues = explode('=', $line);
|
||||||
if (count($rowValues) === 2) {
|
|
||||||
|
if (strlen($line) !== 0) {
|
||||||
if (in_array($rowValues[0], $databaseArray)) {
|
if (in_array($rowValues[0], $databaseArray)) {
|
||||||
$key[] = $rowValues[0];
|
$key[] = $rowValues[0];
|
||||||
$value[] = $rowValues[1];
|
$value[] = $rowValues[1];
|
||||||
|
|
@ -31,20 +63,29 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$databaseData['DB_HOST'] = $databaseData['DB_USERNAME'] = $databaseData['DB_PASSWORD'] = $databaseData['DB_DATABASE'] = $databaseData['DB_CONNECTION'] = $databaseData['DB_PORT'] = '';
|
|
||||||
|
|
||||||
$databaseData = array_combine($key, $value);
|
$databaseData = array_combine($key, $value);
|
||||||
|
|
||||||
// getting database info
|
if (isset($databaseData['DB_HOST'])) {
|
||||||
$servername = $databaseData['DB_HOST'];
|
$servername = $databaseData['DB_HOST'];
|
||||||
|
}
|
||||||
|
if (isset($databaseData['DB_USERNAME'])) {
|
||||||
$username = $databaseData['DB_USERNAME'];
|
$username = $databaseData['DB_USERNAME'];
|
||||||
|
}
|
||||||
|
if (isset($databaseData['DB_PASSWORD'])) {
|
||||||
$password = $databaseData['DB_PASSWORD'];
|
$password = $databaseData['DB_PASSWORD'];
|
||||||
|
}
|
||||||
|
if (isset($databaseData['DB_DATABASE'])) {
|
||||||
$dbname = $databaseData['DB_DATABASE'];
|
$dbname = $databaseData['DB_DATABASE'];
|
||||||
|
}
|
||||||
|
if (isset($databaseData['DB_CONNECTION'])) {
|
||||||
$connection = $databaseData['DB_CONNECTION'];
|
$connection = $databaseData['DB_CONNECTION'];
|
||||||
|
}
|
||||||
|
if (isset($databaseData['DB_PORT'])) {
|
||||||
$port = $databaseData['DB_PORT'];
|
$port = $databaseData['DB_PORT'];
|
||||||
|
}
|
||||||
|
|
||||||
if ($connection == 'mysql') {
|
if (isset($connection) && $connection == 'mysql') {
|
||||||
@$conn = new mysqli($servername, $username, $password, $dbname, $port);
|
@$conn = new mysqli($servername, $username, $password, $dbname, (int)$port);
|
||||||
|
|
||||||
if (!$conn->connect_error) {
|
if (!$conn->connect_error) {
|
||||||
// retrieving admin entry
|
// retrieving admin entry
|
||||||
|
|
@ -63,10 +104,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$installed) {
|
if (!$installed) {
|
||||||
|
|
||||||
// including classes
|
// including classes
|
||||||
include __DIR__ . '/Classes/Permission.php';
|
|
||||||
include __DIR__ . '/Classes/Requirement.php';
|
include __DIR__ . '/Classes/Requirement.php';
|
||||||
include __DIR__ . '/Classes/Welcome.php';
|
|
||||||
|
|
||||||
// including php files
|
// including php files
|
||||||
include __DIR__ . '/Environment.php';
|
include __DIR__ . '/Environment.php';
|
||||||
|
|
@ -79,13 +119,7 @@
|
||||||
|
|
||||||
// object creation
|
// object creation
|
||||||
$requirement = new Requirement();
|
$requirement = new Requirement();
|
||||||
$permission = new Permission();
|
|
||||||
$welcome = new Welcome();
|
|
||||||
|
|
||||||
// calling render function for template
|
|
||||||
echo $requirement->render();
|
echo $requirement->render();
|
||||||
echo $permission->render();
|
|
||||||
echo $welcome->render();
|
|
||||||
|
|
||||||
$storage_output = exec('cd ../.. && php artisan storage:link 2>&1');
|
$storage_output = exec('cd ../.. && php artisan storage:link 2>&1');
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -102,3 +136,6 @@
|
||||||
header("Location: $url");
|
header("Location: $url");
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -11,18 +11,16 @@
|
||||||
if (file_exists($envFile)) {
|
if (file_exists($envFile)) {
|
||||||
|
|
||||||
// reading env content
|
// reading env content
|
||||||
$str = file_get_contents($envFile);
|
$data = file($envFile);
|
||||||
|
|
||||||
// converting env content to key/value pair
|
|
||||||
$data = explode(PHP_EOL,$str);
|
|
||||||
$databaseArray = ['DB_HOST', 'DB_DATABASE', 'DB_USERNAME', 'DB_PASSWORD', 'DB_CONNECTION','DB_PORT'];
|
$databaseArray = ['DB_HOST', 'DB_DATABASE', 'DB_USERNAME', 'DB_PASSWORD', 'DB_CONNECTION','DB_PORT'];
|
||||||
|
|
||||||
$key = $value = [];
|
$key = $value = [];
|
||||||
|
|
||||||
if ($data) {
|
if ($data) {
|
||||||
foreach ($data as $line) {
|
foreach ($data as $line) {
|
||||||
|
$line = preg_replace('/\s+/', '', $line);
|
||||||
$rowValues = explode('=', $line);
|
$rowValues = explode('=', $line);
|
||||||
|
|
||||||
if (count($rowValues) === 2) {
|
if (strlen($line) !== 0) {
|
||||||
if (in_array($rowValues[0], $databaseArray)) {
|
if (in_array($rowValues[0], $databaseArray)) {
|
||||||
$key[] = $rowValues[0];
|
$key[] = $rowValues[0];
|
||||||
$value[] = $rowValues[1];
|
$value[] = $rowValues[1];
|
||||||
|
|
@ -31,20 +29,29 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$databaseData['DB_HOST'] = $databaseData['DB_USERNAME'] = $databaseData['DB_PASSWORD'] = $databaseData['DB_DATABASE'] = $databaseData['DB_CONNECTION'] = $databaseData['DB_PORT'] = '';
|
|
||||||
|
|
||||||
$databaseData = array_combine($key, $value);
|
$databaseData = array_combine($key, $value);
|
||||||
|
|
||||||
// getting database info
|
if (isset($databaseData['DB_HOST'])) {
|
||||||
$servername = $databaseData['DB_HOST'];
|
$servername = $databaseData['DB_HOST'];
|
||||||
|
}
|
||||||
|
if (isset($databaseData['DB_USERNAME'])) {
|
||||||
$username = $databaseData['DB_USERNAME'];
|
$username = $databaseData['DB_USERNAME'];
|
||||||
|
}
|
||||||
|
if (isset($databaseData['DB_PASSWORD'])) {
|
||||||
$password = $databaseData['DB_PASSWORD'];
|
$password = $databaseData['DB_PASSWORD'];
|
||||||
|
}
|
||||||
|
if (isset($databaseData['DB_DATABASE'])) {
|
||||||
$dbname = $databaseData['DB_DATABASE'];
|
$dbname = $databaseData['DB_DATABASE'];
|
||||||
|
}
|
||||||
|
if (isset($databaseData['DB_CONNECTION'])) {
|
||||||
$connection = $databaseData['DB_CONNECTION'];
|
$connection = $databaseData['DB_CONNECTION'];
|
||||||
|
}
|
||||||
|
if (isset($databaseData['DB_PORT'])) {
|
||||||
$port = $databaseData['DB_PORT'];
|
$port = $databaseData['DB_PORT'];
|
||||||
|
}
|
||||||
|
|
||||||
if ($connection == 'mysql') {
|
if (isset($connection) && $connection == 'mysql') {
|
||||||
@$conn = new mysqli($servername, $username, $password, $dbname, $port);
|
@$conn = new mysqli($servername, $username, $password, $dbname, (int)$port);
|
||||||
|
|
||||||
if (!$conn->connect_error) {
|
if (!$conn->connect_error) {
|
||||||
// retrieving admin entry
|
// retrieving admin entry
|
||||||
|
|
@ -76,3 +83,6 @@
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Authentication Language Lines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following language lines are used during authentication for various
|
||||||
|
| messages that we need to display to the user. You are free to modify
|
||||||
|
| these language lines according to your application's requirements.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'failed' => 'Essas credenciais não correspondem aos nossos registros.',
|
||||||
|
'throttle' => 'Muitas tentativas de login. Tente novamente em :seconds segundos.',
|
||||||
|
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Pagination Language Lines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following language lines are used by the paginator library to build
|
||||||
|
| the simple pagination links. You are free to change them to anything
|
||||||
|
| you want to customize your views to better match your application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'previous' => '« Anterior',
|
||||||
|
'next' => 'Próximo »',
|
||||||
|
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Password Reset Language Lines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following language lines are the default lines which match reasons
|
||||||
|
| that are given by the password broker for a password update attempt
|
||||||
|
| has failed, such as for an invalid token or invalid new password.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'password' => 'A senha e a confirmação devem combinar e possuir pelo menos seis caracteres.',
|
||||||
|
'reset' => 'Sua senha foi redefinida!',
|
||||||
|
'sent' => 'Enviamos seu link de redefinição de senha por e-mail!',
|
||||||
|
'token' => 'Este token de redefinição de senha é inválido.',
|
||||||
|
'user' => 'Não encontramos um usuário com esse endereço de e-mail.',
|
||||||
|
|
||||||
|
];
|
||||||
|
|
@ -0,0 +1,119 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Validation Language Lines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following language lines contain the default error messages used by
|
||||||
|
| the validator class. Some of these rules have multiple versions such
|
||||||
|
| as the size rules. Feel free to tweak each of these messages here.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'accepted' => 'O campo :attribute deve ser aceito.',
|
||||||
|
'active_url' => 'O campo :attribute não é uma URL válida.',
|
||||||
|
'after' => 'O campo :attribute deve ser uma data posterior a :date.',
|
||||||
|
'after_or_equal' => 'O campo :attribute deve ser uma data posterior ou igual a :date.',
|
||||||
|
'alpha' => 'O campo :attribute só pode conter letras.',
|
||||||
|
'alpha_dash' => 'O campo :attribute só pode conter letras, números e traços.',
|
||||||
|
'alpha_num' => 'O campo :attribute só pode conter letras e números.',
|
||||||
|
'array' => 'O campo :attribute deve ser uma matriz.',
|
||||||
|
'before' => 'O campo :attribute deve ser uma data anterior :date.',
|
||||||
|
'before_or_equal' => 'O campo :attribute deve ser uma data anterior ou igual a :date.',
|
||||||
|
'between' => [
|
||||||
|
'numeric' => 'O campo :attribute deve ser entre :min e :max.',
|
||||||
|
'file' => 'O campo :attribute deve ser entre :min e :max kilobytes.',
|
||||||
|
'string' => 'O campo :attribute deve ser entre :min e :max caracteres.',
|
||||||
|
'array' => 'O campo :attribute deve ter entre :min e :max itens.',
|
||||||
|
],
|
||||||
|
'boolean' => 'O campo :attribute deve ser verdadeiro ou falso.',
|
||||||
|
'confirmed' => 'O campo :attribute de confirmação não confere.',
|
||||||
|
'date' => 'O campo :attribute não é uma data válida.',
|
||||||
|
'date_format' => 'O campo :attribute não corresponde ao formato :format.',
|
||||||
|
'different' => 'Os campos :attribute e :other devem ser diferentes.',
|
||||||
|
'digits' => 'O campo :attribute deve ter :digits dígitos.',
|
||||||
|
'digits_between' => 'O campo :attribute deve ter entre :min e :max dígitos.',
|
||||||
|
'dimensions' => 'O campo :attribute tem dimensões de imagem inválidas.',
|
||||||
|
'distinct' => 'O campo :attribute campo tem um valor duplicado.',
|
||||||
|
'email' => 'O campo :attribute deve ser um endereço de e-mail válido.',
|
||||||
|
'exists' => 'O campo :attribute selecionado é inválido.',
|
||||||
|
'file' => 'O campo :attribute deve ser um arquivo.',
|
||||||
|
'filled' => 'O campo :attribute deve ter um valor.',
|
||||||
|
'image' => 'O campo :attribute deve ser uma imagem.',
|
||||||
|
'in' => 'O campo :attribute selecionado é inválido.',
|
||||||
|
'in_array' => 'O campo :attribute não existe em :other.',
|
||||||
|
'integer' => 'O campo :attribute deve ser um número inteiro.',
|
||||||
|
'ip' => 'O campo :attribute deve ser um endereço de IP válido.',
|
||||||
|
'ipv4' => 'O campo :attribute deve ser um endereço IPv4 válido.',
|
||||||
|
'ipv6' => 'O campo :attribute deve ser um endereço IPv6 válido.',
|
||||||
|
'json' => 'O campo :attribute deve ser uma string JSON válida.',
|
||||||
|
'max' => [
|
||||||
|
'numeric' => 'O campo :attribute não pode ser superior a :max.',
|
||||||
|
'file' => 'O campo :attribute não pode ser superior a :max kilobytes.',
|
||||||
|
'string' => 'O campo :attribute não pode ser superior a :max caracteres.',
|
||||||
|
'array' => 'O campo :attribute não pode ter mais do que :max itens.',
|
||||||
|
],
|
||||||
|
'mimes' => 'O campo :attribute deve ser um arquivo do tipo: :values.',
|
||||||
|
'mimetypes' => 'O campo :attribute deve ser um arquivo do tipo: :values.',
|
||||||
|
'min' => [
|
||||||
|
'numeric' => 'O campo :attribute deve ser pelo menos :min.',
|
||||||
|
'file' => 'O campo :attribute deve ter pelo menos :min kilobytes.',
|
||||||
|
'string' => 'O campo :attribute deve ter pelo menos :min caracteres.',
|
||||||
|
'array' => 'O campo :attribute deve ter pelo menos :min itens.',
|
||||||
|
],
|
||||||
|
'not_in' => 'O campo :attribute selecionado é inválido.',
|
||||||
|
'numeric' => 'O campo :attribute deve ser um número.',
|
||||||
|
'present' => 'O campo :attribute deve estar presente.',
|
||||||
|
'regex' => 'O campo :attribute tem um formato inválido.',
|
||||||
|
'required' => 'O campo :attribute é obrigatório.',
|
||||||
|
'required_if' => 'O campo :attribute é obrigatório quando :other for :value.',
|
||||||
|
'required_unless' => 'O campo :attribute é obrigatório exceto quando :other for :values.',
|
||||||
|
'required_with' => 'O campo :attribute é obrigatório quando :values está presente.',
|
||||||
|
'required_with_all' => 'O campo :attribute é obrigatório quando :values está presente.',
|
||||||
|
'required_without' => 'O campo :attribute é obrigatório quando :values não está presente.',
|
||||||
|
'required_without_all' => 'O campo :attribute é obrigatório quando nenhum dos :values estão presentes.',
|
||||||
|
'same' => 'Os campos :attribute e :other devem corresponder.',
|
||||||
|
'size' => [
|
||||||
|
'numeric' => 'O campo :attribute deve ser :size.',
|
||||||
|
'file' => 'O campo :attribute deve ser :size kilobytes.',
|
||||||
|
'string' => 'O campo :attribute deve ser :size caracteres.',
|
||||||
|
'array' => 'O campo :attribute deve conter :size itens.',
|
||||||
|
],
|
||||||
|
'string' => 'O campo :attribute deve ser uma string.',
|
||||||
|
'timezone' => 'O campo :attribute deve ser uma zona válida.',
|
||||||
|
'unique' => 'O campo :attribute já está sendo utilizado.',
|
||||||
|
'uploaded' => 'Ocorreu uma falha no upload do campo :attribute.',
|
||||||
|
'url' => 'O campo :attribute tem um formato inválido.',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Custom Validation Language Lines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify custom validation messages for attributes using the
|
||||||
|
| convention "attribute.rule" to name the lines. This makes it quick to
|
||||||
|
| specify a specific custom language line for a given attribute rule.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
'custom' => [
|
||||||
|
'attribute-name' => [
|
||||||
|
'rule-name' => 'custom-message',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Custom Validation Attributes
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following language lines are used to swap attribute place-holders
|
||||||
|
| with something more reader friendly such as E-Mail Address instead
|
||||||
|
| of "email". This simply helps us make messages a little cleaner.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
'attributes' => [],
|
||||||
|
|
||||||
|
];
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
{{-- Footer --}}
|
{{-- Footer --}}
|
||||||
@slot('footer')
|
@slot('footer')
|
||||||
@component('mail::footer')
|
@component('mail::footer')
|
||||||
© {{ date('Y') }} {{ config('app.name') }}. All rights reserved.
|
© {{ date('Y') }} {{ config('app.name') }}. @lang('All rights reserved.')
|
||||||
@endcomponent
|
@endcomponent
|
||||||
@endslot
|
@endslot
|
||||||
@endcomponent
|
@endcomponent
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
{{-- Footer --}}
|
{{-- Footer --}}
|
||||||
@slot('footer')
|
@slot('footer')
|
||||||
@component('mail::footer')
|
@component('mail::footer')
|
||||||
© {{ date('Y') }} {{ config('app.name') }}. All rights reserved.
|
© {{ date('Y') }} {{ config('app.name') }}. @lang('All rights reserved.')
|
||||||
@endcomponent
|
@endcomponent
|
||||||
@endslot
|
@endslot
|
||||||
@endcomponent
|
@endcomponent
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@
|
||||||
'into your web browser: [:actionURL](:actionURL)',
|
'into your web browser: [:actionURL](:actionURL)',
|
||||||
[
|
[
|
||||||
'actionText' => $actionText,
|
'actionText' => $actionText,
|
||||||
'actionURL' => $actionUrl
|
'actionURL' => $actionUrl,
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@endcomponent
|
@endcomponent
|
||||||
|
|
|
||||||