compatible with laravel 5.8
This commit is contained in:
parent
a22b98129e
commit
23a15be1e0
|
|
@ -18,7 +18,7 @@
|
|||
"ext-pdo_mysql": "*",
|
||||
"ext-tokenizer": "*",
|
||||
"astrotomic/laravel-translatable": "^11.0.0",
|
||||
"barryvdh/laravel-dompdf": "0.8.3",
|
||||
"barryvdh/laravel-dompdf": "0.8.4",
|
||||
"doctrine/dbal": "2.9.2",
|
||||
"fideloper/proxy": "^4.0",
|
||||
"flynsarmy/db-blade-compiler": "*",
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
"intervention/imagecache": "^2.3",
|
||||
"kalnoy/nestedset": "^4.3",
|
||||
"konekt/concord": "^1.2",
|
||||
"laravel/framework": "5.6.*",
|
||||
"laravel/framework": "5.8.*",
|
||||
"laravel/tinker": "^1.0",
|
||||
"maatwebsite/excel": "3.1.11",
|
||||
"nwidart/laravel-modules": "^3.2",
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ class CartController extends Controller
|
|||
*/
|
||||
public function store($id)
|
||||
{
|
||||
Event::fire('checkout.cart.item.add.before', $id);
|
||||
Event::dispatch('checkout.cart.item.add.before', $id);
|
||||
|
||||
$result = Cart::addProduct($id, request()->except('_token'));
|
||||
|
||||
|
|
@ -112,8 +112,8 @@ class CartController extends Controller
|
|||
|
||||
if ($customer = auth($this->guard)->user())
|
||||
$this->wishlistRepository->deleteWhere(['product_id' => $id, 'customer_id' => $customer->id]);
|
||||
|
||||
Event::fire('checkout.cart.item.add.after', $result);
|
||||
|
||||
Event::dispatch('checkout.cart.item.add.after', $result);
|
||||
|
||||
Cart::collectTotals();
|
||||
|
||||
|
|
@ -143,11 +143,11 @@ class CartController extends Controller
|
|||
foreach (request()->get('qty') as $itemId => $qty) {
|
||||
$item = $this->cartItemRepository->findOneByField('id', $itemId);
|
||||
|
||||
Event::fire('checkout.cart.item.update.before', $itemId);
|
||||
Event::dispatch('checkout.cart.item.update.before', $itemId);
|
||||
|
||||
Cart::updateItems(request()->all());
|
||||
|
||||
Event::fire('checkout.cart.item.update.after', $item);
|
||||
Event::dispatch('checkout.cart.item.update.after', $item);
|
||||
}
|
||||
|
||||
Cart::collectTotals();
|
||||
|
|
@ -167,11 +167,11 @@ class CartController extends Controller
|
|||
*/
|
||||
public function destroy()
|
||||
{
|
||||
Event::fire('checkout.cart.delete.before');
|
||||
Event::dispatch('checkout.cart.delete.before');
|
||||
|
||||
Cart::deActivateCart();
|
||||
|
||||
Event::fire('checkout.cart.delete.after');
|
||||
Event::dispatch('checkout.cart.delete.after');
|
||||
|
||||
$cart = Cart::getCart();
|
||||
|
||||
|
|
@ -189,11 +189,11 @@ class CartController extends Controller
|
|||
*/
|
||||
public function destroyItem($id)
|
||||
{
|
||||
Event::fire('checkout.cart.item.delete.before', $id);
|
||||
Event::dispatch('checkout.cart.item.delete.before', $id);
|
||||
|
||||
Cart::removeItem($id);
|
||||
|
||||
Event::fire('checkout.cart.item.delete.after', $id);
|
||||
Event::dispatch('checkout.cart.item.delete.after', $id);
|
||||
|
||||
Cart::collectTotals();
|
||||
|
||||
|
|
@ -213,11 +213,11 @@ class CartController extends Controller
|
|||
*/
|
||||
public function moveToWishlist($id)
|
||||
{
|
||||
Event::fire('checkout.cart.item.move-to-wishlist.before', $id);
|
||||
Event::dispatch('checkout.cart.item.move-to-wishlist.before', $id);
|
||||
|
||||
Cart::moveToWishlist($id);
|
||||
|
||||
Event::fire('checkout.cart.item.move-to-wishlist.after', $id);
|
||||
Event::dispatch('checkout.cart.item.move-to-wishlist.after', $id);
|
||||
|
||||
Cart::collectTotals();
|
||||
|
||||
|
|
|
|||
|
|
@ -60,11 +60,11 @@ class CustomerController extends Controller
|
|||
'customer_group_id' => 1
|
||||
]);
|
||||
|
||||
Event::fire('customer.registration.before');
|
||||
Event::dispatch('customer.registration.before');
|
||||
|
||||
$customer = $this->customerRepository->create($data);
|
||||
|
||||
Event::fire('customer.registration.after', $customer);
|
||||
Event::dispatch('customer.registration.after', $customer);
|
||||
|
||||
return response()->json([
|
||||
'message' => 'Your account has been created successfully.'
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ class SessionController extends Controller
|
|||
], 401);
|
||||
}
|
||||
|
||||
Event::fire('customer.after.login', request('email'));
|
||||
Event::dispatch('customer.after.login', request('email'));
|
||||
|
||||
$customer = auth($this->guard)->user();
|
||||
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ class ConfigurationController extends Controller
|
|||
*/
|
||||
public function store()
|
||||
{
|
||||
Event::fire('core.configuration.save.before');
|
||||
Event::dispatch('core.configuration.save.before');
|
||||
|
||||
$this->validate(request(), [
|
||||
'general.design.admin_logo.logo_image' => 'mimes:jpeg,bmp,png,jpg'
|
||||
|
|
@ -126,7 +126,7 @@ class ConfigurationController extends Controller
|
|||
|
||||
$this->coreConfigRepository->create(request()->all());
|
||||
|
||||
Event::fire('core.configuration.save.after');
|
||||
Event::dispatch('core.configuration.save.after');
|
||||
|
||||
session()->flash('success', trans('admin::app.configuration.save-message'));
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ class AttributeFamilyRepository extends Repository
|
|||
*/
|
||||
public function create(array $data)
|
||||
{
|
||||
Event::fire('catalog.attribute_family.create.before');
|
||||
Event::dispatch('catalog.attribute_family.create.before');
|
||||
|
||||
$attributeGroups = isset($data['attribute_groups']) ? $data['attribute_groups'] : [];
|
||||
unset($data['attribute_groups']);
|
||||
|
|
@ -88,7 +88,7 @@ class AttributeFamilyRepository extends Repository
|
|||
}
|
||||
}
|
||||
|
||||
Event::fire('catalog.attribute_family.create.after', $family);
|
||||
Event::dispatch('catalog.attribute_family.create.after', $family);
|
||||
|
||||
return $family;
|
||||
}
|
||||
|
|
@ -103,7 +103,7 @@ class AttributeFamilyRepository extends Repository
|
|||
{
|
||||
$family = $this->find($id);
|
||||
|
||||
Event::fire('catalog.attribute_family.update.before', $id);
|
||||
Event::dispatch('catalog.attribute_family.update.before', $id);
|
||||
|
||||
$family->update($data);
|
||||
|
||||
|
|
@ -152,7 +152,7 @@ class AttributeFamilyRepository extends Repository
|
|||
$this->attributeGroupRepository->delete($attributeGroupId);
|
||||
}
|
||||
|
||||
Event::fire('catalog.attribute_family.update.after', $family);
|
||||
Event::dispatch('catalog.attribute_family.update.after', $family);
|
||||
|
||||
return $family;
|
||||
}
|
||||
|
|
@ -181,10 +181,10 @@ class AttributeFamilyRepository extends Repository
|
|||
*/
|
||||
public function delete($id)
|
||||
{
|
||||
Event::fire('catalog.attribute_family.delete.before', $id);
|
||||
Event::dispatch('catalog.attribute_family.delete.before', $id);
|
||||
|
||||
parent::delete($id);
|
||||
|
||||
Event::fire('catalog.attribute_family.delete.after', $id);
|
||||
Event::dispatch('catalog.attribute_family.delete.after', $id);
|
||||
}
|
||||
}
|
||||
|
|
@ -54,7 +54,7 @@ class AttributeRepository extends Repository
|
|||
*/
|
||||
public function create(array $data)
|
||||
{
|
||||
Event::fire('catalog.attribute.create.before');
|
||||
Event::dispatch('catalog.attribute.create.before');
|
||||
|
||||
$data = $this->validateUserInput($data);
|
||||
|
||||
|
|
@ -70,7 +70,7 @@ class AttributeRepository extends Repository
|
|||
}
|
||||
}
|
||||
|
||||
Event::fire('catalog.attribute.create.after', $attribute);
|
||||
Event::dispatch('catalog.attribute.create.after', $attribute);
|
||||
|
||||
return $attribute;
|
||||
}
|
||||
|
|
@ -87,7 +87,7 @@ class AttributeRepository extends Repository
|
|||
|
||||
$attribute = $this->find($id);
|
||||
|
||||
Event::fire('catalog.attribute.update.before', $id);
|
||||
Event::dispatch('catalog.attribute.update.before', $id);
|
||||
|
||||
$attribute->update($data);
|
||||
|
||||
|
|
@ -115,7 +115,7 @@ class AttributeRepository extends Repository
|
|||
$this->attributeOptionRepository->delete($optionId);
|
||||
}
|
||||
|
||||
Event::fire('catalog.attribute.update.after', $attribute);
|
||||
Event::dispatch('catalog.attribute.update.after', $attribute);
|
||||
|
||||
return $attribute;
|
||||
}
|
||||
|
|
@ -126,11 +126,11 @@ class AttributeRepository extends Repository
|
|||
*/
|
||||
public function delete($id)
|
||||
{
|
||||
Event::fire('catalog.attribute.delete.before', $id);
|
||||
Event::dispatch('catalog.attribute.delete.before', $id);
|
||||
|
||||
parent::delete($id);
|
||||
|
||||
Event::fire('catalog.attribute.delete.after', $id);
|
||||
Event::dispatch('catalog.attribute.delete.after', $id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ class CategoryController extends Controller
|
|||
|
||||
$this->categoryRepository->delete($id);
|
||||
|
||||
Event::fire('catalog.category.delete.after', $id);
|
||||
Event::dispatch('catalog.category.delete.after', $id);
|
||||
|
||||
session()->flash('success', trans('admin::app.response.delete-success', ['name' => 'Category']));
|
||||
|
||||
|
|
@ -200,11 +200,11 @@ class CategoryController extends Controller
|
|||
|
||||
foreach ($indexes as $key => $value) {
|
||||
try {
|
||||
Event::fire('catalog.category.delete.before', $value);
|
||||
Event::dispatch('catalog.category.delete.before', $value);
|
||||
|
||||
$this->categoryRepository->delete($value);
|
||||
|
||||
Event::fire('catalog.category.delete.after', $value);
|
||||
Event::dispatch('catalog.category.delete.after', $value);
|
||||
} catch(\Exception $e) {
|
||||
$suppressFlash = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class CategoryRepository extends Repository
|
|||
*/
|
||||
public function create(array $data)
|
||||
{
|
||||
Event::fire('catalog.category.create.before');
|
||||
Event::dispatch('catalog.category.create.before');
|
||||
|
||||
if (isset($data['locale']) && $data['locale'] == 'all') {
|
||||
$model = app()->make($this->model());
|
||||
|
|
@ -67,7 +67,7 @@ class CategoryRepository extends Repository
|
|||
$category->filterableAttributes()->sync($data['attributes']);
|
||||
}
|
||||
|
||||
Event::fire('catalog.category.create.after', $category);
|
||||
Event::dispatch('catalog.category.create.after', $category);
|
||||
|
||||
return $category;
|
||||
}
|
||||
|
|
@ -171,7 +171,7 @@ class CategoryRepository extends Repository
|
|||
{
|
||||
$category = $this->find($id);
|
||||
|
||||
Event::fire('catalog.category.update.before', $id);
|
||||
Event::dispatch('catalog.category.update.before', $id);
|
||||
|
||||
$category->update($data);
|
||||
|
||||
|
|
@ -181,7 +181,7 @@ class CategoryRepository extends Repository
|
|||
$category->filterableAttributes()->sync($data['attributes']);
|
||||
}
|
||||
|
||||
Event::fire('catalog.category.update.after', $id);
|
||||
Event::dispatch('catalog.category.update.after', $id);
|
||||
|
||||
return $category;
|
||||
}
|
||||
|
|
@ -192,11 +192,11 @@ class CategoryRepository extends Repository
|
|||
*/
|
||||
public function delete($id)
|
||||
{
|
||||
Event::fire('catalog.category.delete.before', $id);
|
||||
Event::dispatch('catalog.category.delete.before', $id);
|
||||
|
||||
parent::delete($id);
|
||||
|
||||
Event::fire('catalog.category.delete.after', $id);
|
||||
Event::dispatch('catalog.category.delete.after', $id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ class Cart {
|
|||
*/
|
||||
public function addProduct($productId, $data)
|
||||
{
|
||||
Event::fire('checkout.cart.add.before', $productId);
|
||||
Event::dispatch('checkout.cart.add.before', $productId);
|
||||
|
||||
$cart = $this->getCart();
|
||||
|
||||
|
|
@ -170,7 +170,7 @@ class Cart {
|
|||
}
|
||||
}
|
||||
|
||||
Event::fire('checkout.cart.add.after', $cart);
|
||||
Event::dispatch('checkout.cart.add.after', $cart);
|
||||
|
||||
$this->collectTotals();
|
||||
|
||||
|
|
@ -229,7 +229,7 @@ class Cart {
|
|||
{
|
||||
foreach ($data['qty'] as $itemId => $quantity) {
|
||||
$item = $this->cartItemRepository->findOneByField('id', $itemId);
|
||||
|
||||
|
||||
if (! $item)
|
||||
continue;
|
||||
|
||||
|
|
@ -244,7 +244,7 @@ class Cart {
|
|||
if (! $this->isItemHaveQuantity($item))
|
||||
throw new \Exception(trans('shop::app.checkout.cart.quantity.inventory_warning'));
|
||||
|
||||
Event::fire('checkout.cart.update.before', $item);
|
||||
Event::dispatch('checkout.cart.update.before', $item);
|
||||
|
||||
$this->cartItemRepository->update([
|
||||
'quantity' => $quantity,
|
||||
|
|
@ -254,7 +254,7 @@ class Cart {
|
|||
'base_total_weight' => $item->weight * $quantity
|
||||
], $itemId);
|
||||
|
||||
Event::fire('checkout.cart.update.after', $item);
|
||||
Event::dispatch('checkout.cart.update.after', $item);
|
||||
}
|
||||
|
||||
$this->collectTotals();
|
||||
|
|
@ -292,7 +292,7 @@ class Cart {
|
|||
*/
|
||||
public function removeItem($itemId)
|
||||
{
|
||||
Event::fire('checkout.cart.delete.before', $itemId);
|
||||
Event::dispatch('checkout.cart.delete.before', $itemId);
|
||||
|
||||
if (! $cart = $this->getCart())
|
||||
return false;
|
||||
|
|
@ -308,7 +308,7 @@ class Cart {
|
|||
}
|
||||
}
|
||||
|
||||
Event::fire('checkout.cart.delete.after', $itemId);
|
||||
Event::dispatch('checkout.cart.delete.after', $itemId);
|
||||
|
||||
$this->collectTotals();
|
||||
|
||||
|
|
@ -345,7 +345,7 @@ class Cart {
|
|||
foreach ($guestCart->items as $key => $guestCartItem) {
|
||||
|
||||
$found = false;
|
||||
|
||||
|
||||
foreach ($cart->items as $cartItem) {
|
||||
if (! $cartItem->product->getTypeInstance()->compareOptions($cartItem->additional, $guestCartItem->additional))
|
||||
continue;
|
||||
|
|
@ -492,7 +492,7 @@ class Cart {
|
|||
if ($cart->haveStockableItems()) {
|
||||
$shippingAddress = $data['shipping'];
|
||||
$shippingAddress['cart_id'] = $cart->id;
|
||||
|
||||
|
||||
if (isset($data['shipping']['address_id']) && $data['shipping']['address_id']) {
|
||||
$address = $this->customerAddressRepository->findOneWhere(['id'=> $data['shipping']['address_id']])->toArray();
|
||||
|
||||
|
|
@ -666,7 +666,7 @@ class Cart {
|
|||
//rare case of accident-->used when there are no items.
|
||||
if (count($cart->items) == 0) {
|
||||
$this->cartRepository->delete($cart->id);
|
||||
|
||||
|
||||
return false;
|
||||
} else {
|
||||
foreach ($cart->items as $item) {
|
||||
|
|
@ -704,7 +704,7 @@ class Cart {
|
|||
|
||||
if (! $taxCategory)
|
||||
continue;
|
||||
|
||||
|
||||
if ($item->product->getTypeInstance()->isStockable()) {
|
||||
$address = $cart->shipping_address;
|
||||
} else {
|
||||
|
|
@ -902,7 +902,7 @@ class Cart {
|
|||
|
||||
/**
|
||||
* Move a wishlist item to cart
|
||||
*
|
||||
*
|
||||
* @param WishlistItem $wishlistItem
|
||||
* @return boolean
|
||||
*/
|
||||
|
|
@ -910,7 +910,7 @@ class Cart {
|
|||
{
|
||||
if (! $wishlistItem->product->getTypeInstance()->canBeMovedFromWishlistToCart($wishlistItem))
|
||||
return false;
|
||||
|
||||
|
||||
if (! $wishlistItem->additional)
|
||||
$wishlistItem->additional = ['product_id' => $wishlistItem->product_id];
|
||||
|
||||
|
|
|
|||
|
|
@ -96,11 +96,11 @@ class ChannelController extends Controller
|
|||
|
||||
unset($data['seo']);
|
||||
|
||||
Event::fire('core.channel.create.before');
|
||||
Event::dispatch('core.channel.create.before');
|
||||
|
||||
$channel = $this->channelRepository->create($data);
|
||||
|
||||
Event::fire('core.channel.create.after', $channel);
|
||||
Event::dispatch('core.channel.create.after', $channel);
|
||||
|
||||
session()->flash('success', trans('admin::app.settings.channels.create-success'));
|
||||
|
||||
|
|
@ -153,11 +153,11 @@ class ChannelController extends Controller
|
|||
|
||||
$data['home_seo'] = json_encode($data['seo']);
|
||||
|
||||
Event::fire('core.channel.update.before', $id);
|
||||
Event::dispatch('core.channel.update.before', $id);
|
||||
|
||||
$channel = $this->channelRepository->update($data, $id);
|
||||
|
||||
Event::fire('core.channel.update.after', $channel);
|
||||
Event::dispatch('core.channel.update.after', $channel);
|
||||
|
||||
session()->flash('success', trans('admin::app.settings.channels.update-success'));
|
||||
|
||||
|
|
@ -178,11 +178,11 @@ class ChannelController extends Controller
|
|||
session()->flash('error', trans('admin::app.settings.channels.last-delete-error'));
|
||||
} else {
|
||||
try {
|
||||
Event::fire('core.channel.delete.before', $id);
|
||||
Event::dispatch('core.channel.delete.before', $id);
|
||||
|
||||
$this->channelRepository->delete($id);
|
||||
|
||||
Event::fire('core.channel.delete.after', $id);
|
||||
Event::dispatch('core.channel.delete.after', $id);
|
||||
|
||||
session()->flash('success', trans('admin::app.settings.channels.delete-success'));
|
||||
|
||||
|
|
|
|||
|
|
@ -72,11 +72,11 @@ class CurrencyController extends Controller
|
|||
'name' => 'required'
|
||||
]);
|
||||
|
||||
Event::fire('core.channel.create.before');
|
||||
Event::dispatch('core.channel.create.before');
|
||||
|
||||
$currency = $this->currencyRepository->create(request()->all());
|
||||
|
||||
Event::fire('core.currency.create.after', $currency);
|
||||
Event::dispatch('core.currency.create.after', $currency);
|
||||
|
||||
session()->flash('success', trans('admin::app.settings.currencies.create-success'));
|
||||
|
||||
|
|
@ -109,11 +109,11 @@ class CurrencyController extends Controller
|
|||
'name' => 'required'
|
||||
]);
|
||||
|
||||
Event::fire('core.currency.update.before', $id);
|
||||
Event::dispatch('core.currency.update.before', $id);
|
||||
|
||||
$currency = $this->currencyRepository->update(request()->all(), $id);
|
||||
|
||||
Event::fire('core.currency.update.after', $currency);
|
||||
Event::dispatch('core.currency.update.after', $currency);
|
||||
|
||||
session()->flash('success', trans('admin::app.settings.currencies.update-success'));
|
||||
|
||||
|
|
@ -134,11 +134,11 @@ class CurrencyController extends Controller
|
|||
session()->flash('warning', trans('admin::app.settings.currencies.last-delete-error'));
|
||||
} else {
|
||||
try {
|
||||
Event::fire('core.currency.delete.before', $id);
|
||||
Event::dispatch('core.currency.delete.before', $id);
|
||||
|
||||
$this->currencyRepository->delete($id);
|
||||
|
||||
Event::fire('core.currency.delete.after', $id);
|
||||
Event::dispatch('core.currency.delete.after', $id);
|
||||
|
||||
session()->flash('success', trans('admin::app.settings.currencies.delete-success'));
|
||||
|
||||
|
|
@ -164,11 +164,11 @@ class CurrencyController extends Controller
|
|||
|
||||
foreach ($indexes as $key => $value) {
|
||||
try {
|
||||
Event::fire('core.currency.delete.before', $value);
|
||||
Event::dispatch('core.currency.delete.before', $value);
|
||||
|
||||
$this->currencyRepository->delete($value);
|
||||
|
||||
Event::fire('core.currency.delete.after', $value);
|
||||
Event::dispatch('core.currency.delete.after', $value);
|
||||
} catch(\Exception $e) {
|
||||
$suppressFlash = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ class ExchangeRateController extends Controller
|
|||
|
||||
/**
|
||||
* ExchangeRateRepository instance
|
||||
*
|
||||
*
|
||||
* @var Object
|
||||
*/
|
||||
protected $exchangeRateRepository;
|
||||
|
|
@ -90,11 +90,11 @@ class ExchangeRateController extends Controller
|
|||
'rate' => 'required|numeric'
|
||||
]);
|
||||
|
||||
Event::fire('core.exchange_rate.create.before');
|
||||
Event::dispatch('core.exchange_rate.create.before');
|
||||
|
||||
$exchangeRate = $this->exchangeRateRepository->create(request()->all());
|
||||
|
||||
Event::fire('core.exchange_rate.create.after', $exchangeRate);
|
||||
Event::dispatch('core.exchange_rate.create.after', $exchangeRate);
|
||||
|
||||
session()->flash('success', trans('admin::app.settings.exchange_rates.create-success'));
|
||||
|
||||
|
|
@ -129,11 +129,11 @@ class ExchangeRateController extends Controller
|
|||
'rate' => 'required|numeric'
|
||||
]);
|
||||
|
||||
Event::fire('core.exchange_rate.update.before', $id);
|
||||
Event::dispatch('core.exchange_rate.update.before', $id);
|
||||
|
||||
$exchangeRate = $this->exchangeRateRepository->update(request()->all(), $id);
|
||||
|
||||
Event::fire('core.exchange_rate.update.after', $exchangeRate);
|
||||
Event::dispatch('core.exchange_rate.update.after', $exchangeRate);
|
||||
|
||||
session()->flash('success', trans('admin::app.settings.exchange_rates.update-success'));
|
||||
|
||||
|
|
@ -190,13 +190,13 @@ class ExchangeRateController extends Controller
|
|||
session()->flash('error', trans('admin::app.settings.exchange_rates.last-delete-error'));
|
||||
} else {
|
||||
try {
|
||||
Event::fire('core.exchange_rate.delete.before', $id);
|
||||
Event::dispatch('core.exchange_rate.delete.before', $id);
|
||||
|
||||
$this->exchangeRateRepository->delete($id);
|
||||
|
||||
session()->flash('success', trans('admin::app.settings.exchange_rates.delete-success'));
|
||||
|
||||
Event::fire('core.exchange_rate.delete.after', $id);
|
||||
Event::dispatch('core.exchange_rate.delete.after', $id);
|
||||
|
||||
return response()->json(['message' => true], 200);
|
||||
} catch (\Exception $e) {
|
||||
|
|
|
|||
|
|
@ -73,11 +73,11 @@ class LocaleController extends Controller
|
|||
'direction' => 'in:ltr,rtl'
|
||||
]);
|
||||
|
||||
Event::fire('core.locale.create.before');
|
||||
Event::dispatch('core.locale.create.before');
|
||||
|
||||
$locale = $this->localeRepository->create(request()->all());
|
||||
|
||||
Event::fire('core.locale.create.after', $locale);
|
||||
Event::dispatch('core.locale.create.after', $locale);
|
||||
|
||||
session()->flash('success', trans('admin::app.settings.locales.create-success'));
|
||||
|
||||
|
|
@ -111,11 +111,11 @@ class LocaleController extends Controller
|
|||
'direction' => 'in:ltr,rtl'
|
||||
]);
|
||||
|
||||
Event::fire('core.locale.update.before', $id);
|
||||
Event::dispatch('core.locale.update.before', $id);
|
||||
|
||||
$locale = $this->localeRepository->update(request()->all(), $id);
|
||||
|
||||
Event::fire('core.locale.update.after', $locale);
|
||||
Event::dispatch('core.locale.update.after', $locale);
|
||||
|
||||
session()->flash('success', trans('admin::app.settings.locales.update-success'));
|
||||
|
||||
|
|
@ -136,11 +136,11 @@ class LocaleController extends Controller
|
|||
session()->flash('error', trans('admin::app.settings.locales.last-delete-error'));
|
||||
} else {
|
||||
try {
|
||||
Event::fire('core.locale.delete.before', $id);
|
||||
Event::dispatch('core.locale.delete.before', $id);
|
||||
|
||||
$this->localeRepository->delete($id);
|
||||
|
||||
Event::fire('core.locale.delete.after', $id);
|
||||
Event::dispatch('core.locale.delete.after', $id);
|
||||
|
||||
session()->flash('success', trans('admin::app.settings.locales.delete-success'));
|
||||
|
||||
|
|
|
|||
|
|
@ -98,11 +98,11 @@ class RegistrationController extends Controller
|
|||
$verificationData['token'] = md5(uniqid(rand(), true));
|
||||
$data['token'] = $verificationData['token'];
|
||||
|
||||
Event::fire('customer.registration.before');
|
||||
Event::dispatch('customer.registration.before');
|
||||
|
||||
$customer = $this->customerRepository->create($data);
|
||||
|
||||
Event::fire('customer.registration.after', $customer);
|
||||
Event::dispatch('customer.registration.after', $customer);
|
||||
|
||||
if ($customer) {
|
||||
if (core()->getConfigData('customer.settings.email.verification')) {
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class SessionController extends Controller
|
|||
}
|
||||
|
||||
//Event passed to prepare cart after login
|
||||
Event::fire('customer.after.login', request('email'));
|
||||
Event::dispatch('customer.after.login', request('email'));
|
||||
|
||||
return redirect()->intended(route($this->_config['redirect']));
|
||||
}
|
||||
|
|
@ -100,7 +100,7 @@ class SessionController extends Controller
|
|||
{
|
||||
auth()->guard('customer')->logout();
|
||||
|
||||
Event::fire('customer.after.logout', $id);
|
||||
Event::dispatch('customer.after.logout', $id);
|
||||
|
||||
return redirect()->route($this->_config['redirect']);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class CustomerAddressRepository extends Repository
|
|||
*/
|
||||
public function create(array $data)
|
||||
{
|
||||
Event::fire('customer.addresses.create.before');
|
||||
Event::dispatch('customer.addresses.create.before');
|
||||
|
||||
if ( isset($data['default_address']) ) {
|
||||
$data['default_address'] = 1;
|
||||
|
|
@ -47,7 +47,7 @@ class CustomerAddressRepository extends Repository
|
|||
|
||||
$address = $this->model->create($data);
|
||||
|
||||
Event::fire('customer.addresses.create.after', $address);
|
||||
Event::dispatch('customer.addresses.create.after', $address);
|
||||
|
||||
return $address;
|
||||
}
|
||||
|
|
@ -61,7 +61,7 @@ class CustomerAddressRepository extends Repository
|
|||
{
|
||||
$address = $this->find($id);
|
||||
|
||||
Event::fire('customer.addresses.update.before', $id);
|
||||
Event::dispatch('customer.addresses.update.before', $id);
|
||||
|
||||
if (isset($data['default_address']) ) {
|
||||
$data['default_address'] = 1;
|
||||
|
|
@ -80,8 +80,8 @@ class CustomerAddressRepository extends Repository
|
|||
$address->update($data);
|
||||
}
|
||||
|
||||
Event::fire('customer.addresses.update.after', $id);
|
||||
Event::dispatch('customer.addresses.update.after', $id);
|
||||
|
||||
return $address;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -84,11 +84,11 @@ class InventorySourceController extends Controller
|
|||
|
||||
$data['status'] = !isset($data['status']) ? 0 : 1;
|
||||
|
||||
Event::fire('inventory.inventory_source.create.before');
|
||||
Event::dispatch('inventory.inventory_source.create.before');
|
||||
|
||||
$inventorySource = $this->inventorySourceRepository->create($data);
|
||||
|
||||
Event::fire('inventory.inventory_source.create.after', $inventorySource);
|
||||
Event::dispatch('inventory.inventory_source.create.after', $inventorySource);
|
||||
|
||||
session()->flash('success', trans('admin::app.settings.inventory_sources.create-success'));
|
||||
|
||||
|
|
@ -133,11 +133,11 @@ class InventorySourceController extends Controller
|
|||
|
||||
$data['status'] = !isset($data['status']) ? 0 : 1;
|
||||
|
||||
Event::fire('inventory.inventory_source.update.before', $id);
|
||||
Event::dispatch('inventory.inventory_source.update.before', $id);
|
||||
|
||||
$inventorySource = $this->inventorySourceRepository->update($data, $id);
|
||||
|
||||
Event::fire('inventory.inventory_source.update.after', $inventorySource);
|
||||
Event::dispatch('inventory.inventory_source.update.after', $inventorySource);
|
||||
|
||||
session()->flash('success', trans('admin::app.settings.inventory_sources.update-success'));
|
||||
|
||||
|
|
@ -158,11 +158,11 @@ class InventorySourceController extends Controller
|
|||
session()->flash('error', trans('admin::app.settings.inventory_sources.last-delete-error'));
|
||||
} else {
|
||||
try {
|
||||
Event::fire('inventory.inventory_source.delete.before', $id);
|
||||
Event::dispatch('inventory.inventory_source.delete.before', $id);
|
||||
|
||||
$this->inventorySourceRepository->delete($id);
|
||||
|
||||
Event::fire('inventory.inventory_source.delete.after', $id);
|
||||
Event::dispatch('inventory.inventory_source.delete.after', $id);
|
||||
|
||||
session()->flash('success', trans('admin::app.settings.inventory_sources.delete-success'));
|
||||
|
||||
|
|
|
|||
|
|
@ -310,7 +310,7 @@ class ProductController extends Controller
|
|||
*/
|
||||
public function sync()
|
||||
{
|
||||
Event::fire('products.datagrid.sync', true);
|
||||
Event::dispatch('products.datagrid.sync', true);
|
||||
|
||||
return redirect()->route('admin.catalog.products.index');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class ReviewController extends Controller
|
|||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\View\View
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
|
|
@ -56,7 +56,7 @@ class ReviewController extends Controller
|
|||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\View\View
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
|
|
@ -73,11 +73,11 @@ class ReviewController extends Controller
|
|||
*/
|
||||
public function update($id)
|
||||
{
|
||||
Event::fire('customer.review.update.before', $id);
|
||||
Event::dispatch('customer.review.update.before', $id);
|
||||
|
||||
$this->productReviewRepository->update(request()->all(), $id);
|
||||
|
||||
Event::fire('customer.review.update.after', $id);
|
||||
Event::dispatch('customer.review.update.after', $id);
|
||||
|
||||
session()->flash('success', trans('admin::app.response.update-success', ['name' => 'Review']));
|
||||
|
||||
|
|
@ -95,11 +95,11 @@ class ReviewController extends Controller
|
|||
$productReview = $this->productReviewRepository->findOrFail($id);
|
||||
|
||||
try {
|
||||
Event::fire('customer.review.delete.before', $id);
|
||||
Event::dispatch('customer.review.delete.before', $id);
|
||||
|
||||
$this->productReviewRepository->delete($id);
|
||||
|
||||
Event::fire('customer.review.delete.after', $id);
|
||||
Event::dispatch('customer.review.delete.after', $id);
|
||||
|
||||
session()->flash('success', trans('admin::app.response.delete-success', ['name' => 'Review']));
|
||||
|
||||
|
|
@ -127,11 +127,11 @@ class ReviewController extends Controller
|
|||
|
||||
foreach ($indexes as $key => $value) {
|
||||
try {
|
||||
Event::fire('customer.review.delete.before', $value);
|
||||
Event::dispatch('customer.review.delete.before', $value);
|
||||
|
||||
$this->productReviewRepository->delete($value);
|
||||
|
||||
Event::fire('customer.review.delete.after', $value);
|
||||
Event::dispatch('customer.review.delete.after', $value);
|
||||
} catch(\Exception $e) {
|
||||
$suppressFlash = true;
|
||||
|
||||
|
|
@ -173,11 +173,11 @@ class ReviewController extends Controller
|
|||
try {
|
||||
if ($data['massaction-type'] == 'update') {
|
||||
if ($data['update-options'] == 1) {
|
||||
Event::fire('customer.review.update.before', $value);
|
||||
Event::dispatch('customer.review.update.before', $value);
|
||||
|
||||
$review->update(['status' => 'approved']);
|
||||
|
||||
Event::fire('customer.review.update.after', $review);
|
||||
Event::dispatch('customer.review.update.after', $review);
|
||||
} else if ($data['update-options'] == 0) {
|
||||
$review->update(['status' => 'pending']);
|
||||
} else if ($data['update-options'] == 2) {
|
||||
|
|
|
|||
|
|
@ -58,13 +58,13 @@ class ProductRepository extends Repository
|
|||
*/
|
||||
public function create(array $data)
|
||||
{
|
||||
Event::fire('catalog.product.create.before');
|
||||
Event::dispatch('catalog.product.create.before');
|
||||
|
||||
$typeInstance = app(config('product_types.' . $data['type'] . '.class'));
|
||||
|
||||
$product = $typeInstance->create($data);
|
||||
|
||||
Event::fire('catalog.product.create.after', $product);
|
||||
Event::dispatch('catalog.product.create.after', $product);
|
||||
|
||||
return $product;
|
||||
}
|
||||
|
|
@ -77,7 +77,7 @@ class ProductRepository extends Repository
|
|||
*/
|
||||
public function update(array $data, $id, $attribute = "id")
|
||||
{
|
||||
Event::fire('catalog.product.update.before', $id);
|
||||
Event::dispatch('catalog.product.update.before', $id);
|
||||
|
||||
$product = $this->find($id);
|
||||
|
||||
|
|
@ -86,7 +86,7 @@ class ProductRepository extends Repository
|
|||
if (isset($data['channels']))
|
||||
$product['channels'] = $data['channels'];
|
||||
|
||||
Event::fire('catalog.product.update.after', $product);
|
||||
Event::dispatch('catalog.product.update.after', $product);
|
||||
|
||||
return $product;
|
||||
}
|
||||
|
|
@ -97,11 +97,11 @@ class ProductRepository extends Repository
|
|||
*/
|
||||
public function delete($id)
|
||||
{
|
||||
Event::fire('catalog.product.delete.before', $id);
|
||||
Event::dispatch('catalog.product.delete.before', $id);
|
||||
|
||||
parent::delete($id);
|
||||
|
||||
Event::fire('catalog.product.delete.after', $id);
|
||||
Event::dispatch('catalog.product.delete.after', $id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class InvoiceItemRepository extends Repository
|
|||
->whereIn('inventory_source_id', $data['invoice']->order->channel->inventory_sources()->pluck('id'))
|
||||
->orderBy('qty', 'desc')
|
||||
->get();
|
||||
|
||||
|
||||
foreach ($inventories as $key => $inventory) {
|
||||
if ($inventory->qty >= $data['qty']) {
|
||||
$inventory->update(['qty' => $inventory->qty - $data['qty']]);
|
||||
|
|
@ -65,6 +65,6 @@ class InvoiceItemRepository extends Repository
|
|||
}
|
||||
}
|
||||
|
||||
Event::fire('catalog.product.update.after', $data['product']);
|
||||
Event::dispatch('catalog.product.update.after', $data['product']);
|
||||
}
|
||||
}
|
||||
|
|
@ -94,7 +94,7 @@ class InvoiceRepository extends Repository
|
|||
DB::beginTransaction();
|
||||
|
||||
try {
|
||||
Event::fire('sales.invoice.save.before', $data);
|
||||
Event::dispatch('sales.invoice.save.before', $data);
|
||||
|
||||
$order = $this->orderRepository->find($data['order_id']);
|
||||
|
||||
|
|
@ -162,7 +162,7 @@ class InvoiceRepository extends Repository
|
|||
'product_type' => $childOrderItem->product_type,
|
||||
'additional' => $childOrderItem->additional
|
||||
]);
|
||||
|
||||
|
||||
if ($childOrderItem->product && ! $childOrderItem->getTypeInstance()->isStockable() && $childOrderItem->getTypeInstance()->showQuantityBox()) {
|
||||
$this->invoiceItemRepository->updateProductInventory([
|
||||
'invoice' => $invoice,
|
||||
|
|
@ -194,7 +194,7 @@ class InvoiceRepository extends Repository
|
|||
|
||||
$this->orderRepository->updateOrderStatus($order);
|
||||
|
||||
Event::fire('sales.invoice.save.after', $invoice);
|
||||
Event::dispatch('sales.invoice.save.after', $invoice);
|
||||
} catch (\Exception $e) {
|
||||
DB::rollBack();
|
||||
|
||||
|
|
@ -205,7 +205,7 @@ class InvoiceRepository extends Repository
|
|||
|
||||
return $invoice;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param mixed $invoice
|
||||
* @return mixed
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ class OrderRepository extends Repository
|
|||
DB::beginTransaction();
|
||||
|
||||
try {
|
||||
Event::fire('checkout.order.save.before', $data);
|
||||
Event::dispatch('checkout.order.save.before', $data);
|
||||
|
||||
if (isset($data['customer']) && $data['customer']) {
|
||||
$data['customer_id'] = $data['customer']->id;
|
||||
|
|
@ -103,7 +103,7 @@ class OrderRepository extends Repository
|
|||
$order->addresses()->create($data['billing_address']);
|
||||
|
||||
foreach ($data['items'] as $item) {
|
||||
Event::fire('checkout.order.orderitem.save.before', $data);
|
||||
Event::dispatch('checkout.order.orderitem.save.before', $data);
|
||||
|
||||
$orderItem = $this->orderItemRepository->create(array_merge($item, ['order_id' => $order->id]));
|
||||
|
||||
|
|
@ -117,10 +117,10 @@ class OrderRepository extends Repository
|
|||
|
||||
$this->downloadableLinkPurchasedRepository->saveLinks($orderItem, 'available');
|
||||
|
||||
Event::fire('checkout.order.orderitem.save.after', $data);
|
||||
Event::dispatch('checkout.order.orderitem.save.after', $data);
|
||||
}
|
||||
|
||||
Event::fire('checkout.order.save.after', $order);
|
||||
Event::dispatch('checkout.order.save.after', $order);
|
||||
} catch (\Exception $e) {
|
||||
DB::rollBack();
|
||||
|
||||
|
|
@ -145,7 +145,7 @@ class OrderRepository extends Repository
|
|||
return false;
|
||||
}
|
||||
|
||||
Event::fire('sales.order.cancel.before', $order);
|
||||
Event::dispatch('sales.order.cancel.before', $order);
|
||||
|
||||
foreach ($order->items as $item) {
|
||||
if (! $item->qty_to_cancel) {
|
||||
|
|
@ -186,7 +186,7 @@ class OrderRepository extends Repository
|
|||
|
||||
$this->updateOrderStatus($order);
|
||||
|
||||
Event::fire('sales.order.cancel.after', $order);
|
||||
Event::dispatch('sales.order.cancel.after', $order);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ class RefundRepository extends Repository
|
|||
DB::beginTransaction();
|
||||
|
||||
try {
|
||||
Event::fire('sales.refund.save.before', $data);
|
||||
Event::dispatch('sales.refund.save.before', $data);
|
||||
|
||||
$order = $this->orderRepository->find($data['order_id']);
|
||||
|
||||
|
|
@ -165,7 +165,7 @@ class RefundRepository extends Repository
|
|||
'product_type' => $childOrderItem->product_type,
|
||||
'additional' => $childOrderItem->additional
|
||||
]);
|
||||
|
||||
|
||||
if ($childOrderItem->getTypeInstance()->isStockable() || $childOrderItem->getTypeInstance()->showQuantityBox())
|
||||
$this->refundItemRepository->returnQtyToProductInventory($childOrderItem, $finalQty);
|
||||
|
||||
|
|
@ -189,7 +189,7 @@ class RefundRepository extends Repository
|
|||
|
||||
$this->orderRepository->updateOrderStatus($order);
|
||||
|
||||
Event::fire('sales.refund.save.after', $refund);
|
||||
Event::dispatch('sales.refund.save.after', $refund);
|
||||
} catch (\Exception $e) {
|
||||
DB::rollBack();
|
||||
|
||||
|
|
|
|||
|
|
@ -58,6 +58,6 @@ class ShipmentItemRepository extends Repository
|
|||
|
||||
$inventory->update(['qty' => $qty]);
|
||||
|
||||
Event::fire('catalog.product.update.after', $data['product']);
|
||||
Event::dispatch('catalog.product.update.after', $data['product']);
|
||||
}
|
||||
}
|
||||
|
|
@ -63,7 +63,7 @@ class ShipmentRepository extends Repository
|
|||
|
||||
parent::__construct($app);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Specify Model class name
|
||||
*
|
||||
|
|
@ -82,9 +82,9 @@ class ShipmentRepository extends Repository
|
|||
public function create(array $data)
|
||||
{
|
||||
DB::beginTransaction();
|
||||
|
||||
|
||||
try {
|
||||
Event::fire('sales.shipment.save.before', $data);
|
||||
Event::dispatch('sales.shipment.save.before', $data);
|
||||
|
||||
$order = $this->orderRepository->find($data['order_id']);
|
||||
|
||||
|
|
@ -141,7 +141,7 @@ class ShipmentRepository extends Repository
|
|||
'qty' => $finalQty,
|
||||
'vendor_id' => isset($data['vendor_id']) ? $data['vendor_id'] : 0
|
||||
]);
|
||||
|
||||
|
||||
$this->orderItemRepository->update(['qty_shipped' => $child->qty_shipped + $finalQty], $child->id);
|
||||
}
|
||||
} else {
|
||||
|
|
@ -162,13 +162,13 @@ class ShipmentRepository extends Repository
|
|||
|
||||
$this->orderRepository->updateOrderStatus($order);
|
||||
|
||||
Event::fire('sales.shipment.save.after', $shipment);
|
||||
Event::dispatch('sales.shipment.save.after', $shipment);
|
||||
} catch (\Exception $e) {
|
||||
DB::rollBack();
|
||||
|
||||
throw $e;
|
||||
}
|
||||
|
||||
|
||||
DB::commit();
|
||||
|
||||
return $shipment;
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@
|
|||
<span class="control-error" v-if="errors.has('title')">@{{ errors.first('title') }}</span>
|
||||
</div>
|
||||
|
||||
@if ($guest_review && ! auth()->guard('customer')->user())
|
||||
@if (core()->getConfigData('catalog.products.review.guest_review') && ! auth()->guard('customer')->user())
|
||||
<div class="control-group" :class="[errors.has('name') ? 'has-error' : '']">
|
||||
<label for="title" class="required">
|
||||
{{ __('shop::app.reviews.name') }}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ class TaxCategoryController extends Controller
|
|||
/**
|
||||
* Function to show the tax category form
|
||||
*
|
||||
* @return \Illuminate\View\View
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
public function show()
|
||||
{
|
||||
|
|
@ -82,14 +82,14 @@ class TaxCategoryController extends Controller
|
|||
'taxrates' => 'array|required'
|
||||
]);
|
||||
|
||||
Event::fire('tax.tax_category.create.before');
|
||||
Event::dispatch('tax.tax_category.create.before');
|
||||
|
||||
$taxCategory = $this->taxCategoryRepository->create($data);
|
||||
|
||||
//attach the categories in the tax map table
|
||||
$this->taxCategoryRepository->attachOrDetach($taxCategory, $data['taxrates']);
|
||||
|
||||
Event::fire('tax.tax_category.create.after', $taxCategory);
|
||||
Event::dispatch('tax.tax_category.create.after', $taxCategory);
|
||||
|
||||
session()->flash('success', trans('admin::app.settings.tax-categories.create-success'));
|
||||
|
||||
|
|
@ -100,7 +100,7 @@ class TaxCategoryController extends Controller
|
|||
* To show the edit form form the tax category
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\View\View
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
|
|
@ -127,11 +127,11 @@ class TaxCategoryController extends Controller
|
|||
|
||||
$data = request()->input();
|
||||
|
||||
Event::fire('tax.tax_category.update.before', $id);
|
||||
Event::dispatch('tax.tax_category.update.before', $id);
|
||||
|
||||
$taxCategory = $this->taxCategoryRepository->update($data, $id);
|
||||
|
||||
Event::fire('tax.tax_category.update.after', $taxCategory);
|
||||
Event::dispatch('tax.tax_category.update.after', $taxCategory);
|
||||
|
||||
if (! $taxCategory) {
|
||||
session()->flash('error', trans('admin::app.settings.tax-categories.update-error'));
|
||||
|
|
@ -160,11 +160,11 @@ class TaxCategoryController extends Controller
|
|||
$taxCategory = $this->taxCategoryRepository->findOrFail($id);
|
||||
|
||||
try {
|
||||
Event::fire('tax.tax_category.delete.before', $id);
|
||||
Event::dispatch('tax.tax_category.delete.before', $id);
|
||||
|
||||
$this->taxCategoryRepository->delete($id);
|
||||
|
||||
Event::fire('tax.tax_category.delete.after', $id);
|
||||
Event::dispatch('tax.tax_category.delete.after', $id);
|
||||
|
||||
session()->flash('success', trans('admin::app.response.delete-success', ['name' => 'Tax Category']));
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class TaxRateController extends Controller
|
|||
/**
|
||||
* Display a listing resource for the available tax rates.
|
||||
*
|
||||
* @return \Illuminate\View\View
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
|
||||
public function index() {
|
||||
|
|
@ -57,7 +57,7 @@ class TaxRateController extends Controller
|
|||
/**
|
||||
* Display a create form for tax rate
|
||||
*
|
||||
* @return \Illuminate\View\View
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
public function show()
|
||||
{
|
||||
|
|
@ -89,11 +89,11 @@ class TaxRateController extends Controller
|
|||
unset($data['zip_code']);
|
||||
}
|
||||
|
||||
Event::fire('tax.tax_rate.create.before');
|
||||
Event::dispatch('tax.tax_rate.create.before');
|
||||
|
||||
$taxRate = $this->taxRateRepository->create($data);
|
||||
|
||||
Event::fire('tax.tax_rate.create.after', $taxRate);
|
||||
Event::dispatch('tax.tax_rate.create.after', $taxRate);
|
||||
|
||||
session()->flash('success', trans('admin::app.settings.tax-rates.create-success'));
|
||||
|
||||
|
|
@ -103,7 +103,7 @@ class TaxRateController extends Controller
|
|||
/**
|
||||
* Show the edit form for the previously created tax rates.
|
||||
*
|
||||
* @return \Illuminate\View\View
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
|
|
@ -130,11 +130,11 @@ class TaxRateController extends Controller
|
|||
'tax_rate' => 'required|numeric|min:0.0001'
|
||||
]);
|
||||
|
||||
Event::fire('tax.tax_rate.update.before', $id);
|
||||
Event::dispatch('tax.tax_rate.update.before', $id);
|
||||
|
||||
$taxRate = $this->taxRateRepository->update(request()->input(), $id);
|
||||
|
||||
Event::fire('tax.tax_rate.update.after', $taxRate);
|
||||
Event::dispatch('tax.tax_rate.update.after', $taxRate);
|
||||
|
||||
session()->flash('success', trans('admin::app.settings.tax-rates.update-success'));
|
||||
|
||||
|
|
@ -152,11 +152,11 @@ class TaxRateController extends Controller
|
|||
$taxRate = $this->taxRateRepository->findOrFail($id);
|
||||
|
||||
try {
|
||||
Event::fire('tax.tax_rate.delete.before', $id);
|
||||
Event::dispatch('tax.tax_rate.delete.before', $id);
|
||||
|
||||
$this->taxRateRepository->delete($id);
|
||||
|
||||
Event::fire('tax.tax_rate.delete.after', $id);
|
||||
Event::dispatch('tax.tax_rate.delete.after', $id);
|
||||
|
||||
session()->flash('success', trans('admin::app.response.delete-success', ['name' => 'Tax Rate']));
|
||||
|
||||
|
|
@ -219,7 +219,7 @@ class TaxRateController extends Controller
|
|||
foreach ($filtered as $position => $identifier) {
|
||||
$message[] = trans('admin::app.export.duplicate-error', ['identifier' => $identifier, 'position' => $position]);
|
||||
}
|
||||
|
||||
|
||||
$finalMsg = implode(" ", $message);
|
||||
|
||||
session()->flash('error', $finalMsg);
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class ViewRenderEventManager
|
|||
{
|
||||
$this->params = $params ?? [];
|
||||
|
||||
Event::fire($eventName, $this);
|
||||
Event::dispatch($eventName, $this);
|
||||
|
||||
return $this->templates;
|
||||
}
|
||||
|
|
@ -77,7 +77,7 @@ class ViewRenderEventManager
|
|||
public function render()
|
||||
{
|
||||
$string = "";
|
||||
|
||||
|
||||
foreach ($this->templates as $template) {
|
||||
if (view()->exists($template)) {
|
||||
$string .= view($template , $this->params)->render();
|
||||
|
|
@ -86,7 +86,7 @@ class ViewRenderEventManager
|
|||
$string .= $template;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $string;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -425,7 +425,7 @@ abstract class DataGrid
|
|||
|
||||
$eventName = $className . '.' . $name;
|
||||
|
||||
Event::fire($eventName, $this->invoker);
|
||||
Event::dispatch($eventName, $this->invoker);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class RoleController extends Controller
|
|||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\View\View
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
|
|
@ -55,7 +55,7 @@ class RoleController extends Controller
|
|||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @return \Illuminate\View\View
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
|
|
@ -74,11 +74,11 @@ class RoleController extends Controller
|
|||
'permission_type' => 'required',
|
||||
]);
|
||||
|
||||
Event::fire('user.role.create.before');
|
||||
Event::dispatch('user.role.create.before');
|
||||
|
||||
$role = $this->roleRepository->create(request()->all());
|
||||
|
||||
Event::fire('user.role.create.after', $role);
|
||||
Event::dispatch('user.role.create.after', $role);
|
||||
|
||||
session()->flash('success', trans('admin::app.response.create-success', ['name' => 'Role']));
|
||||
|
||||
|
|
@ -89,7 +89,7 @@ class RoleController extends Controller
|
|||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\View\View
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
|
|
@ -111,11 +111,11 @@ class RoleController extends Controller
|
|||
'permission_type' => 'required',
|
||||
]);
|
||||
|
||||
Event::fire('user.role.update.before', $id);
|
||||
Event::dispatch('user.role.update.before', $id);
|
||||
|
||||
$role = $this->roleRepository->update(request()->all(), $id);
|
||||
|
||||
Event::fire('user.role.update.after', $role);
|
||||
Event::dispatch('user.role.update.after', $role);
|
||||
|
||||
session()->flash('success', trans('admin::app.response.update-success', ['name' => 'Role']));
|
||||
|
||||
|
|
@ -138,11 +138,11 @@ class RoleController extends Controller
|
|||
session()->flash('error', trans('admin::app.response.last-delete-error', ['name' => 'Role']));
|
||||
} else {
|
||||
try {
|
||||
Event::fire('user.role.delete.before', $id);
|
||||
Event::dispatch('user.role.delete.before', $id);
|
||||
|
||||
$this->roleRepository->delete($id);
|
||||
|
||||
Event::fire('user.role.delete.after', $id);
|
||||
Event::dispatch('user.role.delete.after', $id);
|
||||
|
||||
session()->flash('success', trans('admin::app.response.delete-success', ['name' => 'Role']));
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ class UserController extends Controller
|
|||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\View\View
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
|
|
@ -71,7 +71,7 @@ class UserController extends Controller
|
|||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @return \Illuminate\View\View
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
|
|
@ -93,11 +93,11 @@ class UserController extends Controller
|
|||
if (isset($data['password']) && $data['password'])
|
||||
$data['password'] = bcrypt($data['password']);
|
||||
|
||||
Event::fire('user.admin.create.before');
|
||||
Event::dispatch('user.admin.create.before');
|
||||
|
||||
$admin = $this->adminRepository->create($data);
|
||||
|
||||
Event::fire('user.admin.create.after', $admin);
|
||||
Event::dispatch('user.admin.create.after', $admin);
|
||||
|
||||
session()->flash('success', trans('admin::app.response.create-success', ['name' => 'User']));
|
||||
|
||||
|
|
@ -108,7 +108,7 @@ class UserController extends Controller
|
|||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param integer $id
|
||||
* @return \Illuminate\View\View
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
|
|
@ -141,11 +141,11 @@ class UserController extends Controller
|
|||
$data['status'] = 0;
|
||||
}
|
||||
|
||||
Event::fire('user.admin.update.before', $id);
|
||||
Event::dispatch('user.admin.update.before', $id);
|
||||
|
||||
$admin = $this->adminRepository->update($data, $id);
|
||||
|
||||
Event::fire('user.admin.update.after', $admin);
|
||||
Event::dispatch('user.admin.update.after', $admin);
|
||||
|
||||
session()->flash('success', trans('admin::app.response.update-success', ['name' => 'User']));
|
||||
|
||||
|
|
@ -156,7 +156,7 @@ class UserController extends Controller
|
|||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\JsonResponse|\Illuminate\View\View
|
||||
* @return \Illuminate\Http\JsonResponse|\Illuminate\View\View
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
|
|
@ -165,7 +165,7 @@ class UserController extends Controller
|
|||
if ($this->adminRepository->count() == 1) {
|
||||
session()->flash('error', trans('admin::app.response.last-delete-error', ['name' => 'Admin']));
|
||||
} else {
|
||||
Event::fire('user.admin.delete.before', $id);
|
||||
Event::dispatch('user.admin.delete.before', $id);
|
||||
|
||||
if (auth()->guard('admin')->user()->id == $id) {
|
||||
return view('admin::customers.confirm-password');
|
||||
|
|
@ -176,7 +176,7 @@ class UserController extends Controller
|
|||
|
||||
session()->flash('success', trans('admin::app.response.delete-success', ['name' => 'Admin']));
|
||||
|
||||
Event::fire('user.admin.delete.after', $id);
|
||||
Event::dispatch('user.admin.delete.after', $id);
|
||||
|
||||
return response()->json(['message' => true], 200);
|
||||
} catch (Exception $e) {
|
||||
|
|
@ -202,11 +202,11 @@ class UserController extends Controller
|
|||
} else {
|
||||
$id = auth()->guard('admin')->user()->id;
|
||||
|
||||
Event::fire('user.admin.delete.before', $id);
|
||||
Event::dispatch('user.admin.delete.before', $id);
|
||||
|
||||
$this->adminRepository->delete($id);
|
||||
|
||||
Event::fire('user.admin.delete.after', $id);
|
||||
Event::dispatch('user.admin.delete.after', $id);
|
||||
|
||||
session()->flash('success', trans('admin::app.users.users.delete-success'));
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
@extends('errors::minimal')
|
||||
|
||||
@section('title', __('Unauthorized'))
|
||||
@section('code', '401')
|
||||
@section('message', __('Unauthorized'))
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
@extends('errors::minimal')
|
||||
|
||||
@section('title', __('Forbidden'))
|
||||
@section('code', '403')
|
||||
@section('message', __($exception->getMessage() ?: 'Forbidden'))
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
@extends('errors::minimal')
|
||||
|
||||
@section('title', __('Not Found'))
|
||||
@section('code', '404')
|
||||
@section('message', __('Not Found'))
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
@extends('errors::minimal')
|
||||
|
||||
@section('title', __('Page Expired'))
|
||||
@section('code', '419')
|
||||
@section('message', __('Page Expired'))
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
@extends('errors::minimal')
|
||||
|
||||
@section('title', __('Too Many Requests'))
|
||||
@section('code', '429')
|
||||
@section('message', __('Too Many Requests'))
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
@extends('errors::minimal')
|
||||
|
||||
@section('title', __('Server Error'))
|
||||
@section('code', '500')
|
||||
@section('message', __('Server Error'))
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
@extends('errors::minimal')
|
||||
|
||||
@section('title', __('Service Unavailable'))
|
||||
@section('code', '503')
|
||||
@section('message', __($exception->getMessage() ?: 'Service Unavailable'))
|
||||
|
|
@ -0,0 +1,486 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
||||
<title>@yield('title')</title>
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="dns-prefetch" href="//fonts.gstatic.com">
|
||||
<link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">
|
||||
|
||||
<!-- Styles -->
|
||||
<style>
|
||||
html {
|
||||
line-height: 1.15;
|
||||
-ms-text-size-adjust: 100%;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
header,
|
||||
nav,
|
||||
section {
|
||||
display: block;
|
||||
}
|
||||
|
||||
figcaption,
|
||||
main {
|
||||
display: block;
|
||||
}
|
||||
|
||||
a {
|
||||
background-color: transparent;
|
||||
-webkit-text-decoration-skip: objects;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: monospace, monospace;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
dfn {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
svg:not(:root) {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
button,
|
||||
input {
|
||||
font-family: sans-serif;
|
||||
font-size: 100%;
|
||||
line-height: 1.15;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
button,
|
||||
input {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
button {
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
button,
|
||||
html [type="button"],
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
button::-moz-focus-inner,
|
||||
[type="button"]::-moz-focus-inner,
|
||||
[type="reset"]::-moz-focus-inner,
|
||||
[type="submit"]::-moz-focus-inner {
|
||||
border-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
button:-moz-focusring,
|
||||
[type="button"]:-moz-focusring,
|
||||
[type="reset"]:-moz-focusring,
|
||||
[type="submit"]:-moz-focusring {
|
||||
outline: 1px dotted ButtonText;
|
||||
}
|
||||
|
||||
legend {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
color: inherit;
|
||||
display: table;
|
||||
max-width: 100%;
|
||||
padding: 0;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
[type="checkbox"],
|
||||
[type="radio"] {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
[type="number"]::-webkit-inner-spin-button,
|
||||
[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
[type="search"] {
|
||||
-webkit-appearance: textfield;
|
||||
outline-offset: -2px;
|
||||
}
|
||||
|
||||
[type="search"]::-webkit-search-cancel-button,
|
||||
[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
-webkit-appearance: button;
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
menu {
|
||||
display: block;
|
||||
}
|
||||
|
||||
canvas {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
html {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
-webkit-box-sizing: inherit;
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
button {
|
||||
background: transparent;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
button:focus {
|
||||
outline: 1px dotted;
|
||||
outline: 5px auto -webkit-focus-ring-color;
|
||||
}
|
||||
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
border-width: 0;
|
||||
border-style: solid;
|
||||
border-color: #dae1e7;
|
||||
}
|
||||
|
||||
button,
|
||||
[type="button"],
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
button,
|
||||
input {
|
||||
font-family: inherit;
|
||||
}
|
||||
|
||||
input::-webkit-input-placeholder {
|
||||
color: inherit;
|
||||
opacity: .5;
|
||||
}
|
||||
|
||||
input:-ms-input-placeholder {
|
||||
color: inherit;
|
||||
opacity: .5;
|
||||
}
|
||||
|
||||
input::-ms-input-placeholder {
|
||||
color: inherit;
|
||||
opacity: .5;
|
||||
}
|
||||
|
||||
input::placeholder {
|
||||
color: inherit;
|
||||
opacity: .5;
|
||||
}
|
||||
|
||||
button,
|
||||
[role=button] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.bg-transparent {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.bg-white {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.bg-teal-light {
|
||||
background-color: #64d5ca;
|
||||
}
|
||||
|
||||
.bg-blue-dark {
|
||||
background-color: #2779bd;
|
||||
}
|
||||
|
||||
.bg-indigo-light {
|
||||
background-color: #7886d7;
|
||||
}
|
||||
|
||||
.bg-purple-light {
|
||||
background-color: #a779e9;
|
||||
}
|
||||
|
||||
.bg-no-repeat {
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.bg-cover {
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
.border-grey-light {
|
||||
border-color: #dae1e7;
|
||||
}
|
||||
|
||||
.hover\:border-grey:hover {
|
||||
border-color: #b8c2cc;
|
||||
}
|
||||
|
||||
.rounded-lg {
|
||||
border-radius: .5rem;
|
||||
}
|
||||
|
||||
.border-2 {
|
||||
border-width: 2px;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.flex {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.items-center {
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.justify-center {
|
||||
-webkit-box-pack: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.font-sans {
|
||||
font-family: Nunito, sans-serif;
|
||||
}
|
||||
|
||||
.font-light {
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.font-bold {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.font-black {
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.h-1 {
|
||||
height: .25rem;
|
||||
}
|
||||
|
||||
.leading-normal {
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.m-8 {
|
||||
margin: 2rem;
|
||||
}
|
||||
|
||||
.my-3 {
|
||||
margin-top: .75rem;
|
||||
margin-bottom: .75rem;
|
||||
}
|
||||
|
||||
.mb-8 {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.max-w-sm {
|
||||
max-width: 30rem;
|
||||
}
|
||||
|
||||
.min-h-screen {
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.py-3 {
|
||||
padding-top: .75rem;
|
||||
padding-bottom: .75rem;
|
||||
}
|
||||
|
||||
.px-6 {
|
||||
padding-left: 1.5rem;
|
||||
padding-right: 1.5rem;
|
||||
}
|
||||
|
||||
.pb-full {
|
||||
padding-bottom: 100%;
|
||||
}
|
||||
|
||||
.absolute {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.relative {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.pin {
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.text-black {
|
||||
color: #22292f;
|
||||
}
|
||||
|
||||
.text-grey-darkest {
|
||||
color: #3d4852;
|
||||
}
|
||||
|
||||
.text-grey-darker {
|
||||
color: #606f7b;
|
||||
}
|
||||
|
||||
.text-2xl {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.text-5xl {
|
||||
font-size: 3rem;
|
||||
}
|
||||
|
||||
.uppercase {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.antialiased {
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.tracking-wide {
|
||||
letter-spacing: .05em;
|
||||
}
|
||||
|
||||
.w-16 {
|
||||
width: 4rem;
|
||||
}
|
||||
|
||||
.w-full {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.md\:bg-left {
|
||||
background-position: left;
|
||||
}
|
||||
|
||||
.md\:bg-right {
|
||||
background-position: right;
|
||||
}
|
||||
|
||||
.md\:flex {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.md\:my-6 {
|
||||
margin-top: 1.5rem;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
.md\:min-h-screen {
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.md\:pb-0 {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.md\:text-3xl {
|
||||
font-size: 1.875rem;
|
||||
}
|
||||
|
||||
.md\:text-15xl {
|
||||
font-size: 9rem;
|
||||
}
|
||||
|
||||
.md\:w-1\/2 {
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 992px) {
|
||||
.lg\:bg-center {
|
||||
background-position: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="antialiased font-sans">
|
||||
<div class="md:flex min-h-screen">
|
||||
<div class="w-full md:w-1/2 bg-white flex items-center justify-center">
|
||||
<div class="max-w-sm m-8">
|
||||
<div class="text-black text-5xl md:text-15xl font-black">
|
||||
@yield('code', __('Oh no'))
|
||||
</div>
|
||||
|
||||
<div class="w-16 h-1 bg-purple-light my-3 md:my-6"></div>
|
||||
|
||||
<p class="text-grey-darker text-2xl md:text-3xl font-light mb-8 leading-normal">
|
||||
@yield('message')
|
||||
</p>
|
||||
|
||||
<a href="{{ app('router')->has('home') ? route('home') : url('/') }}">
|
||||
<button class="bg-transparent text-grey-darkest font-bold uppercase tracking-wide py-3 px-6 border-2 border-grey-light hover:border-grey rounded-lg">
|
||||
{{ __('Go Home') }}
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="relative pb-full md:flex md:pb-0 md:min-h-screen w-full md:w-1/2">
|
||||
@yield('image')
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<title>@yield('title')</title>
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="dns-prefetch" href="//fonts.gstatic.com">
|
||||
<link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet" type="text/css">
|
||||
|
||||
<!-- Styles -->
|
||||
<style>
|
||||
html, body {
|
||||
background-color: #fff;
|
||||
color: #636b6f;
|
||||
font-family: 'Nunito', sans-serif;
|
||||
font-weight: 100;
|
||||
height: 100vh;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.full-height {
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.flex-center {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.position-ref {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.content {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 36px;
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="flex-center position-ref full-height">
|
||||
<div class="content">
|
||||
<div class="title">
|
||||
@yield('message')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<title>@yield('title')</title>
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="dns-prefetch" href="//fonts.gstatic.com">
|
||||
<link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">
|
||||
|
||||
<!-- Styles -->
|
||||
<style>
|
||||
html, body {
|
||||
background-color: #fff;
|
||||
color: #636b6f;
|
||||
font-family: 'Nunito', sans-serif;
|
||||
font-weight: 100;
|
||||
height: 100vh;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.full-height {
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.flex-center {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.position-ref {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.code {
|
||||
border-right: 2px solid;
|
||||
font-size: 26px;
|
||||
padding: 0 15px 0 15px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.message {
|
||||
font-size: 18px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="flex-center position-ref full-height">
|
||||
<div class="code">
|
||||
@yield('code')
|
||||
</div>
|
||||
|
||||
<div class="message" style="padding: 10px;">
|
||||
@yield('message')
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1 @@
|
|||
{{ $slot }}: {{ $url }}
|
||||
|
|
@ -0,0 +1 @@
|
|||
{{ $slot }}
|
||||
|
|
@ -0,0 +1 @@
|
|||
[{{ $slot }}]({{ $url }})
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{!! strip_tags($header) !!}
|
||||
|
||||
{!! strip_tags($slot) !!}
|
||||
@isset($subcopy)
|
||||
|
||||
{!! strip_tags($subcopy) !!}
|
||||
@endisset
|
||||
|
||||
{!! strip_tags($footer) !!}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
@component('mail::layout')
|
||||
{{-- Header --}}
|
||||
@slot('header')
|
||||
@component('mail::header', ['url' => config('app.url')])
|
||||
{{ config('app.name') }}
|
||||
@endcomponent
|
||||
@endslot
|
||||
|
||||
{{-- Body --}}
|
||||
{{ $slot }}
|
||||
|
||||
{{-- Subcopy --}}
|
||||
@isset($subcopy)
|
||||
@slot('subcopy')
|
||||
@component('mail::subcopy')
|
||||
{{ $subcopy }}
|
||||
@endcomponent
|
||||
@endslot
|
||||
@endisset
|
||||
|
||||
{{-- Footer --}}
|
||||
@slot('footer')
|
||||
@component('mail::footer')
|
||||
© {{ date('Y') }} {{ config('app.name') }}. @lang('All rights reserved.')
|
||||
@endcomponent
|
||||
@endslot
|
||||
@endcomponent
|
||||
|
|
@ -0,0 +1 @@
|
|||
{{ $slot }}
|
||||
|
|
@ -0,0 +1 @@
|
|||
{{ $slot }}
|
||||
|
|
@ -0,0 +1 @@
|
|||
[{{ $slot }}]({{ $url }})
|
||||
|
|
@ -0,0 +1 @@
|
|||
{{ $slot }}
|
||||
|
|
@ -0,0 +1 @@
|
|||
{{ $slot }}
|
||||
Loading…
Reference in New Issue