commit
04c93e2339
|
|
@ -100,7 +100,6 @@ class CustomerController extends Controller
|
|||
public function store()
|
||||
{
|
||||
$this->validate(request(), [
|
||||
'channel_id' => 'required',
|
||||
'first_name' => 'string|required',
|
||||
'last_name' => 'string|required',
|
||||
'gender' => 'required',
|
||||
|
|
@ -156,7 +155,6 @@ class CustomerController extends Controller
|
|||
public function update(Request $request, $id)
|
||||
{
|
||||
$this->validate(request(), [
|
||||
'channel_id' => 'required',
|
||||
'first_name' => 'string|required',
|
||||
'last_name' => 'string|required',
|
||||
'gender' => 'required',
|
||||
|
|
|
|||
|
|
@ -78,17 +78,6 @@
|
|||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('channel_id') ? 'has-error' : '']">
|
||||
<label for="channel" >{{ __('admin::app.customers.customers.channel_name') }}</label>
|
||||
<select class="control" name="channel_id" v-validate="'required'" data-vv-as=""{{ __('shop::app.customers.customers.channel_name') }}"">
|
||||
@foreach ($channelName as $channel)
|
||||
<option value="{{ $channel->id }}"> {{ $channel->name}} </>
|
||||
@endforeach
|
||||
</select>
|
||||
<span class="control-error" v-if="errors.has('channel_id')">@{{ errors.first('channel_id') }}</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -102,26 +102,6 @@
|
|||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="control-group" :class="[errors.has('channel_id') ? 'has-error' : '']">
|
||||
<label for="channel" >{{ __('admin::app.customers.customers.channel_name') }}</label>
|
||||
|
||||
@if (! is_null($customer->channel_id))
|
||||
<?php $selectedChannelOption = $customer->channel_id ?>
|
||||
@else
|
||||
<?php $selectedChannelOption = $customer->channel_id ?>
|
||||
@endif
|
||||
|
||||
<select class="control" name="channel_id" v-validate="'required'" data-vv-as=""{{ __('shop::app.customers.customers.channel_name') }}"">
|
||||
@foreach ($channelName as $channel)
|
||||
<option value="{{ $channel->id }}" {{ $selectedChannelOption == $channel->id ? 'selected' : '' }}>
|
||||
{{ $channel->name}}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<span class="control-error" v-if="errors.has('channel_id')">@{{ errors.first('channel_id') }}</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</accordian>
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class RemoveChannelIdFromCustomersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('customers', function (Blueprint $table) {
|
||||
$table->dropForeign('customers_channel_id_foreign');
|
||||
$table->dropColumn('channel_id');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('customers', function (Blueprint $table) {
|
||||
$table->integer('channel_id')->unsigned();
|
||||
$table->foreign('channel_id')->references('id')->on('channels')->onDelete('restrict');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -68,8 +68,6 @@ class RegistrationController extends Controller
|
|||
|
||||
$data['password'] = bcrypt($data['password']);
|
||||
|
||||
$data['channel_id'] = core()->getCurrentChannel()->id;
|
||||
|
||||
if (core()->getConfigData('customer.settings.email.verification')) {
|
||||
$data['is_verified'] = 0;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue