Removed stripe connect dependencies from SAASCustomizer package

This commit is contained in:
Prashant Singh 2019-07-08 13:29:07 +05:30
parent e33a374e67
commit 223bef7c72
4 changed files with 19 additions and 55 deletions

View File

@ -1,27 +0,0 @@
<?php
namespace Webkul\SAASCustomizer\Models\StripeConnect;
use Webkul\StripeConnect\Models\StripeConnect as BaseModel;
use Company;
class StripeConnect extends BaseModel
{
/**
* Create a new Eloquent query builder for the model.
*
* @param \Illuminate\Database\Query\Builder $query
* @return \Illuminate\Database\Eloquent\Builder|static
*/
public function newEloquentBuilder($query)
{
$company = Company::getCurrent();
if (auth()->guard('super-admin')->check() || ! isset($company->id)) {
return new \Illuminate\Database\Eloquent\Builder($query);
} else {
return new \Illuminate\Database\Eloquent\Builder($query->where('stripe_companies' . '.company_id', $company->id));
}
}
}

View File

@ -1,17 +0,0 @@
<?php
namespace Webkul\SAASCustomizer\Observers\StripeConnect;
use Webkul\SAASCustomizer\Models\StripeConnect\StripeConnect;
use Company;
class StripeConnectObserver
{
public function creating(StripeConnect $model)
{
if (! auth()->guard('super-admin')->check()) {
$model->company_id = Company::getCurrent()->id;
}
}
}

View File

@ -46,7 +46,7 @@
<div class="control-group" :class="[errors.has('step-one.password_confirmation') ? 'has-error' : '']">
<label for="password_confirmation" class="required">Confirm Password</label>
<input type="password" v-validate="'required|min:6|confirmed:password'" class="control" v-model="password_confirmation" name="password_confirmation" placeholder="Confirm Password" data-vv-as="&quot;{{ __('confirm password') }}&quot;">
<input type="password" v-validate="'min:6|confirmed:password'" class="control" v-model="password_confirmation" name="password_confirmation" placeholder="Confirm Password" data-vv-as="&quot;{{ __('confirm password') }}&quot;">
<span class="control-error" v-show="errors.has('step-one.password_confirmation')">@{{ errors.first('step-one.password_confirmation') }}</span>
</div>
@ -252,7 +252,7 @@
sendDataToServer () {
var o_this = this;
return axios.post('/company/register', {
return axios.post('{{ route('company.create.store') }}', {
email: this.email,
first_name: this.first_name,
last_name: this.last_name,

View File

@ -13,26 +13,34 @@ class ShowPriceAfterLoginServiceProvider extends ServiceProvider
*/
public function boot()
{
$this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'ShowPriceAfterLogin');
$this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'showpriceafterlogin');
$this->publishes([
dirname(__DIR__) . '/Resources/views/Shop/card.blade.php' => base_path('resources/views/vendor/shop/products/list/card.blade.php')
dirname(__DIR__) . '/Resources/views/card.blade.php' => base_path('resources/views/vendor/shop/products/list/card.blade.php')
]);
$this->publishes([
dirname(__DIR__) . '/Resources/views/Shop/price.blade.php' => base_path('resources/views/vendor/shop/products/price.blade.php')
dirname(__DIR__) . '/Resources/views/price.blade.php' => base_path('resources/views/vendor/shop/products/price.blade.php')
]);
$this->publishes([
dirname(__DIR__) . '/Resources/views/Shop/add-to-cart.blade.php' => base_path('resources/views/vendor/shop/products/add-to-cart.blade.php')
dirname(__DIR__) . '/Resources/views/add-to-cart.blade.php' => base_path('resources/views/vendor/shop/products/add-to-cart.blade.php')
]);
$this->publishes([
dirname(__DIR__) . '/Resources/views/Shop/buy-now.blade.php' => base_path('resources/views/vendor/shop/products/buy-now.blade.php')
]);
// $this->publishes([
// dirname(__DIR__) . '/Resources/views/Shop/add-buttons.blade.php' => base_path('views/vendor/shop/products/add-buttons.blade.php')
// ]);
$this->publishes([
dirname(__DIR__) . '/Resources/views/Shop/review-price.blade.php' => base_path('resources/views/vendor/shop/products/review-price.blade.php')
dirname(__DIR__) . '/Resources/views/buy-now.blade.php' => base_path('resources/views/vendor/shop/products/buy-now.blade.php')
]);
// $this->publishes([
// dirname(__DIR__) . '/Resources/views/Shop/view/product-add.blade.php' => base_path('views/vendor/shop/products/view/product-add.blade.php')
// ]);
$this->publishes([
dirname(__DIR__) . '/Resources/views/review-price.blade.php' => base_path('resources/views/vendor/shop/products/review-price.blade.php')
]);
}
@ -47,4 +55,4 @@ class ShowPriceAfterLoginServiceProvider extends ServiceProvider
dirname(__DIR__) . '/../Config/system.php', 'core'
);
}
}
}