diff --git a/.env.example b/.env.example
index d445610..18d461a 100644
--- a/.env.example
+++ b/.env.example
@@ -30,3 +30,6 @@ MAIL_ENCRYPTION=null
PUSHER_APP_ID=
PUSHER_KEY=
PUSHER_SECRET=
+
+ADMIN_ROLE_NAME=administrator
+CLIENT_ROLE_NAME=client
diff --git a/app/Http/Controllers/Admin/AttributeCrudController.php b/app/Http/Controllers/Admin/AttributeCrudController.php
index f1212cd..793b13d 100644
--- a/app/Http/Controllers/Admin/AttributeCrudController.php
+++ b/app/Http/Controllers/Admin/AttributeCrudController.php
@@ -38,6 +38,13 @@ public function setUp()
]
]);
+ /*
+ |--------------------------------------------------------------------------
+ | PERMISSIONS
+ |-------------------------------------------------------------------------
+ */
+ $this->setPermissions();
+
/*
|--------------------------------------------------------------------------
| FIELDS
@@ -52,18 +59,39 @@ public function setUp()
*/
$this->crud->enableAjaxTable();
- /*
- |--------------------------------------------------------------------------
- | ACCESS
- |--------------------------------------------------------------------------
- */
- // $this->crud->denyAccess(['delete']);
- //
}
- public function setFields()
+ public function setPermissions()
{
+ // Get authenticated user
+ $user = auth()->user();
+
+ // Deny all accesses
+ $this->crud->denyAccess(['list', 'create', 'update', 'delete']);
+
+ // Allow list access
+ if ($user->can('list_attributes')) {
+ $this->crud->allowAccess('list');
+ }
+
+ // Allow create access
+ if ($user->can('create_attribute')) {
+ $this->crud->allowAccess('create');
+ }
+ // Allow update access
+ if ($user->can('update_attribute')) {
+ $this->crud->allowAccess('update');
+ }
+
+ // Allow delete access
+ if ($user->can('delete_attribute')) {
+ $this->crud->allowAccess('delete');
+ }
+ }
+
+ public function setFields()
+ {
$this->crud->addFields([
[
'name' => 'name',
@@ -102,7 +130,6 @@ public function setFields()
'type' => 'attribute_types',
]
]);
-
}
public function store(StoreRequest $request)
diff --git a/app/Http/Controllers/Admin/AttributeSetCrudController.php b/app/Http/Controllers/Admin/AttributeSetCrudController.php
index be562ae..f01b3b7 100644
--- a/app/Http/Controllers/Admin/AttributeSetCrudController.php
+++ b/app/Http/Controllers/Admin/AttributeSetCrudController.php
@@ -35,6 +35,13 @@ public function setUp()
]
]);
+ /*
+ |--------------------------------------------------------------------------
+ | PERMISSIONS
+ |-------------------------------------------------------------------------
+ */
+ $this->setPermissions();
+
/*
|--------------------------------------------------------------------------
| FIELDS
@@ -51,9 +58,37 @@ public function setUp()
}
- public function setFields()
+ public function setPermissions()
{
+ // Get authenticated user
+ $user = auth()->user();
+
+ // Deny all accesses
+ $this->crud->denyAccess(['list', 'create', 'update', 'delete']);
+
+ // Allow list access
+ if ($user->can('list_attribute_sets')) {
+ $this->crud->allowAccess('list');
+ }
+
+ // Allow create access
+ if ($user->can('create_attribute_set')) {
+ $this->crud->allowAccess('create');
+ }
+
+ // Allow update access
+ if ($user->can('update_attribute_set')) {
+ $this->crud->allowAccess('update');
+ }
+ // Allow delete access
+ if ($user->can('delete_attribute_set')) {
+ $this->crud->allowAccess('delete');
+ }
+ }
+
+ public function setFields()
+ {
$this->crud->addFields([
[
'name' => 'name',
@@ -70,7 +105,6 @@ public function setFields()
'pivot' => true,
]
]);
-
}
public function ajaxGetAttributesBySetId(Request $request, Attribute $attribute)
diff --git a/app/Http/Controllers/Admin/CarrierCrudController.php b/app/Http/Controllers/Admin/CarrierCrudController.php
index c3c7c73..61042ea 100644
--- a/app/Http/Controllers/Admin/CarrierCrudController.php
+++ b/app/Http/Controllers/Admin/CarrierCrudController.php
@@ -35,6 +35,13 @@ public function setUp()
]
]);
+ /*
+ |--------------------------------------------------------------------------
+ | PERMISSIONS
+ |-------------------------------------------------------------------------
+ */
+ $this->setPermissions();
+
/*
|--------------------------------------------------------------------------
| FIELDS
@@ -51,9 +58,37 @@ public function setUp()
}
- public function setFields()
+ public function setPermissions()
{
+ // Get authenticated user
+ $user = auth()->user();
+
+ // Deny all accesses
+ $this->crud->denyAccess(['list', 'create', 'update', 'delete']);
+
+ // Allow list access
+ if ($user->can('list_carriers')) {
+ $this->crud->allowAccess('list');
+ }
+
+ // Allow create access
+ if ($user->can('create_carrier')) {
+ $this->crud->allowAccess('create');
+ }
+
+ // Allow update access
+ if ($user->can('update_carrier')) {
+ $this->crud->allowAccess('update');
+ }
+
+ // Allow delete access
+ if ($user->can('delete_carrier')) {
+ $this->crud->allowAccess('delete');
+ }
+ }
+ public function setFields()
+ {
$this->crud->addFields([
[
'name' => 'name',
@@ -83,7 +118,6 @@ public function setFields()
'prefix' => 'uploads/carriers/'
]
]);
-
}
diff --git a/app/Http/Controllers/Admin/CartRuleCrudController.php b/app/Http/Controllers/Admin/CartRuleCrudController.php
new file mode 100644
index 0000000..836d05a
--- /dev/null
+++ b/app/Http/Controllers/Admin/CartRuleCrudController.php
@@ -0,0 +1,451 @@
+crud->setModel('App\Models\CartRule');
+ $this->crud->setRoute('admin/cart-rules');
+ $this->crud->setEntityNameStrings('cart rule', 'cart rules');
+
+ /*
+ |--------------------------------------------------------------------------
+ | BASIC CRUD INFORMATION
+ |--------------------------------------------------------------------------
+ */
+
+ // $this->crud->setFromDb();
+
+ /*
+ |--------------------------------------------------------------------------
+ | CRUD COLUMNS
+ |--------------------------------------------------------------------------
+ */
+ $this->crud->addColumns([
+ [
+ 'name' => 'name',
+ 'label' => trans('cartrule.name'),
+ 'type' => 'text',
+ ],
+ [
+ 'name' => 'code',
+ 'label' => trans('cartrule.code'),
+ ],
+ [
+ 'name' => 'priority',
+ 'label' => trans('cartrule.priority'),
+ ],
+ [
+ 'name' => 'start_date',
+ 'label' => trans('cartrule.start_date'),
+ ],
+ [
+ 'name' => 'expiration_date',
+ 'label' => trans('cartrule.expiration_date'),
+ ],
+ [
+ 'name' => 'status',
+ 'label' => trans('cartrule.status'),
+ ],
+ ]);
+
+ /*
+ |--------------------------------------------------------------------------
+ | PERMISSIONS
+ |-------------------------------------------------------------------------
+ */
+ $this->setPermissions();
+
+ /*
+ |--------------------------------------------------------------------------
+ | FIELDS
+ |--------------------------------------------------------------------------
+ */
+ $this->setFields();
+
+ /*
+ |--------------------------------------------------------------------------
+ | AJAX TABLE VIEW
+ |--------------------------------------------------------------------------
+ */
+ $this->crud->enableAjaxTable();
+
+ // ------ CRUD FIELDS
+ // $this->crud->addField($options, 'update/create/both');
+ // $this->crud->addFields($array_of_arrays, 'update/create/both');
+ // $this->crud->removeField('name', 'update/create/both');
+ // $this->crud->removeFields($array_of_names, 'update/create/both');
+
+ // ------ CRUD COLUMNS
+ // $this->crud->addColumn(); // add a single column, at the end of the stack
+ // $this->crud->addColumns(); // add multiple columns, at the end of the stack
+ // $this->crud->removeColumn('column_name'); // remove a column from the stack
+ // $this->crud->removeColumns(['column_name_1', 'column_name_2']); // remove an array of columns from the stack
+ // $this->crud->setColumnDetails('column_name', ['attribute' => 'value']); // adjusts the properties of the passed in column (by name)
+ // $this->crud->setColumnsDetails(['column_1', 'column_2'], ['attribute' => 'value']);
+
+ // ------ CRUD BUTTONS
+ // possible positions: 'beginning' and 'end'; defaults to 'beginning' for the 'line' stack, 'end' for the others;
+ // $this->crud->addButton($stack, $name, $type, $content, $position); // add a button; possible types are: view, model_function
+ // $this->crud->addButtonFromModelFunction($stack, $name, $model_function_name, $position); // add a button whose HTML is returned by a method in the CRUD model
+ // $this->crud->addButtonFromView($stack, $name, $view, $position); // add a button whose HTML is in a view placed at resources\views\vendor\backpack\crud\buttons
+ // $this->crud->removeButton($name);
+ // $this->crud->removeButtonFromStack($name, $stack);
+ // $this->crud->removeAllButtons();
+ // $this->crud->removeAllButtonsFromStack('line');
+
+ // ------ CRUD ACCESS
+ // $this->crud->allowAccess(['list', 'create', 'update', 'reorder', 'delete']);
+ // $this->crud->denyAccess(['list', 'create', 'update', 'reorder', 'delete']);
+
+ // ------ CRUD REORDER
+ // $this->crud->enableReorder('label_name', MAX_TREE_LEVEL);
+ // NOTE: you also need to do allow access to the right users: $this->crud->allowAccess('reorder');
+
+ // ------ CRUD DETAILS ROW
+ // $this->crud->enableDetailsRow();
+ // NOTE: you also need to do allow access to the right users: $this->crud->allowAccess('details_row');
+ // NOTE: you also need to do overwrite the showDetailsRow($id) method in your EntityCrudController to show whatever you'd like in the details row OR overwrite the views/backpack/crud/details_row.blade.php
+
+ // ------ REVISIONS
+ // You also need to use \Venturecraft\Revisionable\RevisionableTrait;
+ // Please check out: https://laravel-backpack.readme.io/docs/crud#revisions
+ // $this->crud->allowAccess('revisions');
+
+ // ------ AJAX TABLE VIEW
+ // Please note the drawbacks of this though:
+ // - 1-n and n-n columns are not searchable
+ // - date and datetime columns won't be sortable anymore
+ // $this->crud->enableAjaxTable();
+
+ // ------ DATATABLE EXPORT BUTTONS
+ // Show export to PDF, CSV, XLS and Print buttons on the table view.
+ // Does not work well with AJAX datatables.
+ // $this->crud->enableExportButtons();
+
+ // ------ ADVANCED QUERIES
+ // $this->crud->addClause('active');
+ // $this->crud->addClause('type', 'car');
+ // $this->crud->addClause('where', 'name', '==', 'car');
+ // $this->crud->addClause('whereName', 'car');
+ // $this->crud->addClause('whereHas', 'posts', function($query) {
+ // $query->activePosts();
+ // });
+ // $this->crud->addClause('withoutGlobalScopes');
+ // $this->crud->addClause('withoutGlobalScope', VisibleScope::class);
+ // $this->crud->with(); // eager load relationships
+ // $this->crud->orderBy();
+ // $this->crud->groupBy();
+ // $this->crud->limit();
+ }
+
+ public function setPermissions()
+ {
+ // Get authenticated user
+ $user = auth()->user();
+
+ // Deny all accesses
+ $this->crud->denyAccess(['list', 'create', 'update', 'delete']);
+
+ // Allow list access
+ if ($user->can('list_cart_rules')) {
+ $this->crud->allowAccess('list');
+ }
+
+ // Allow create access
+ if ($user->can('create_cart_rule')) {
+ $this->crud->allowAccess('create');
+ }
+
+ // Allow update access
+ if ($user->can('update_cart_rule')) {
+ $this->crud->allowAccess('update');
+ }
+
+ // Allow delete access
+ if ($user->can('delete_cart_rule')) {
+ $this->crud->allowAccess('delete');
+ }
+
+ }
+
+
+ public function setFields()
+ {
+ $defaultCurrencyName = Currency::getDefaultCurrencyName();
+ $defaultCurrencyId = Currency::getDefaultCurrencyId();
+
+ $this->crud->addFields([
+ // INFORMATION TAB
+ [
+ 'name' => 'name',
+ 'label' => trans('cartrule.name'),
+ 'type' => 'text',
+ 'attributes'=> ['required' => 'true'],
+ 'tab' => trans('cartrule.information_tab'),
+ ],
+ [
+ 'name' => 'code',
+ 'label' => trans('cartrule.code'),
+ 'tab' => trans('cartrule.information_tab'),
+ ],
+ [
+ 'name' => 'highlight',
+ 'label' => trans('cartrule.highlight'),
+ 'type' => 'toggle_switch',
+ 'tab' => trans('cartrule.information_tab'),
+ ],
+ [
+ 'name' => 'priority',
+ 'label' => trans('cartrule.priority'),
+ 'type' => 'number',
+ 'attributes'=> [
+ 'step' => 'any',
+ ],
+ 'tab' => trans('cartrule.information_tab'),
+ ],
+ [
+ 'name' => 'status',
+ 'label' => trans('cartrule.status'),
+ 'type' => 'toggle_switch',
+ 'tab' => trans('cartrule.information_tab'),
+ ],
+ [
+ 'name' => 'promo_label',
+ 'label' => trans('cartrule.promo_label'),
+ 'tab' => trans('cartrule.information_tab'),
+ ],
+ [
+ 'name' => 'promo_text',
+ 'label' => trans('cartrule.promo_text'),
+ 'tab' => trans('cartrule.information_tab'),
+ 'type' => 'textarea',
+ ],
+
+ // CONDITIONS TAB
+ [
+ 'name' => 'customers',
+ 'label' => trans('cartrule.customer_groups_rule'),
+ 'type' => 'select2_multiple',
+ 'attribute' => 'name',
+ 'entity' => 'customers',
+ 'model' =>'App\User',
+ 'pivot' => true,
+ 'tab' => trans('cartrule.conditions_tab'),
+ ],
+ [
+ 'name' => 'start_date',
+ 'label' => trans('cartrule.start_date'),
+ 'type' => 'datetime_picker',
+ 'tab' => trans('cartrule.conditions_tab'),
+ ],
+ [
+ 'name' => 'expiration_date',
+ 'label' => trans('cartrule.expiration_date'),
+ 'type' => 'datetime_picker',
+ 'tab' => trans('cartrule.conditions_tab'),
+ ],
+ [
+ 'name' => 'total_available',
+ 'label' => trans('cartrule.total_available'),
+ 'type' => 'number',
+ 'attributes'=> [
+ 'step' => 'any',
+ ],
+ 'tab' => trans('cartrule.conditions_tab'),
+ ],
+ [
+ 'name' => 'total_available_each_user',
+ 'label' => trans('cartrule.total_available_each_user'),
+ 'type' => 'number',
+ 'attributes'=> [
+ 'step' => 'any',
+ ],
+ 'tab' => trans('cartrule.conditions_tab'),
+ ],
+ [
+ 'name' => 'min_nr_products',
+ 'label' => trans('cartrule.min_nr_products'),
+ 'type' => 'number',
+ 'attributes'=> [
+ 'step' => 'any',
+ ],
+ 'tab' => trans('cartrule.conditions_tab'),
+ ],
+ [
+ 'name' => 'minimum_amount',
+ 'label' => trans('cartrule.minimum_amount'),
+ 'type' => 'number',
+ 'attributes'=> [
+ 'step' => 'any',
+ ],
+ 'wrapperAttributes' => [
+ 'class' => 'form-group col-md-8'
+ ],
+ 'tab' => trans('cartrule.conditions_tab'),
+ ],
+ [
+ 'name' => 'minimum_amount_currency_id',
+ 'label' => trans('cartrule.currency'),
+ 'entity' => 'currency',
+ 'attribute' => 'name',
+ 'model' => 'App\Models\Currency',
+ 'wrapperAttributes' => [
+ 'class' => 'form-group col-md-4'
+ ],
+ 'type' => 'select2_currency',
+ 'default_currency' => $defaultCurrencyName,
+ 'default_currency_id' => $defaultCurrencyId,
+ 'tab' => trans('cartrule.conditions_tab'),
+ ],
+ [
+ 'name' => 'restrictions',
+ 'label' => '',
+ 'type' => 'custom_html',
+ 'value' => '
Restrictions ',
+ 'tab' => trans('cartrule.conditions_tab'),
+
+ ],
+ [
+ 'name' => 'categories',
+ 'label' => trans('cartrule.categories_rule'),
+ 'type' => 'select2_multiple',
+ 'entity' => 'categories',
+ 'attribute' => 'name',
+ 'model' => 'App\Models\Category',
+ 'pivot' => true,
+ 'tab' => trans('cartrule.conditions_tab'),
+ ],
+ [
+ 'name' => 'productGroups',
+ 'label' => trans('cartrule.product_groups_rule'),
+ 'type' => 'select2_multiple',
+ 'attribute' => 'id',
+ 'entity' => 'productGroups',
+ 'model' =>'App\Models\ProductGroup',
+ 'pivot' => true,
+ 'tab' => trans('cartrule.conditions_tab'),
+ ],
+ [
+ 'name' => 'products',
+ 'label' => trans('cartrule.products_rule'),
+ 'type' => 'select2_multiple',
+ 'attribute' => 'name',
+ 'entity' => 'products',
+ 'model' =>'App\Models\Product',
+ 'pivot' => true,
+ 'tab' => trans('cartrule.conditions_tab'),
+ ],
+ [
+ 'name' => 'compatibleCartRules',
+ 'label' => trans('cartrule.compatible_with_rules'),
+ 'type' => 'select2_multiple',
+ 'entity' => 'compatibleCartRules',
+ 'attribute' => 'name',
+ 'model' => 'App\Models\CartRule',
+ 'pivot' => true,
+ 'tab' => trans('cartrule.conditions_tab'),
+ ],
+
+ // ACTIONS TAB
+ [
+ 'name' => 'free_delivery',
+ 'label' => trans('cartrule.free_delivery'),
+ 'tab' => trans('cartrule.actions_tab'),
+ 'type' => 'toggle_switch',
+ ],
+ [
+ 'name' => 'discount_type',
+ 'label' => trans('cartrule.discount_type'),
+ 'type' => 'enum_discount_type',
+ 'attributes' => ['field_to_enable' => 'reduction_currency_id',
+ 'enable_field_on_option' => 'Amount - order'],
+ 'tab' => trans('cartrule.actions_tab'),
+ ],
+
+ [
+ 'name' => 'reduction_amount',
+ 'label' => trans('cartrule.reduction_value'),
+ 'type' => 'number',
+ 'attributes'=> [
+ 'step' => 'any',
+ ],
+ 'wrapperAttributes' => [
+ 'class' => 'form-group col-md-8'
+ ],
+ 'tab' => trans('cartrule.actions_tab'),
+ ],
+ [
+ 'name' => 'reduction_currency_id',
+ 'label' => trans('cartrule.currency'),
+ 'entity' => 'currency',
+ 'attribute' => 'name',
+ 'model' => 'App\Models\Currency',
+ 'attributes' => ['disabled' => 'disabled'],
+ 'wrapperAttributes' => [
+ 'class' => 'form-group col-md-4'
+ ],
+ 'type' => 'select2_currency',
+ 'default_currency' => $defaultCurrencyName,
+ 'default_currency_id' => $defaultCurrencyId,
+ 'tab' => trans('cartrule.actions_tab'),
+ ],
+ [
+ 'name' => 'send_free_gift',
+ 'label' => trans('cartrule.send_free_gift'),
+ 'type' => 'toggle_switch_free_gift',
+ 'attributes'=> ['field_to_enable' => 'gift_product_id',
+ 'field_to_enable_2' => 'multiply_gift'],
+ 'tab' => trans('cartrule.actions_tab'),
+ ],
+ [
+ 'name' => 'gift_product_id',
+ 'label' => trans('cartrule.gift'),
+ 'tab' => trans('cartrule.actions_tab'),
+ 'type' => 'select2',
+ 'entity' => 'products',
+ 'attribute' => 'name',
+ 'model' => 'App\Models\Product',
+ 'attributes'=> ['disabled' => 'disabled', ],
+ ],
+ [
+ 'name' => 'multiply_gift',
+ 'label' => trans('cartrule.multiply_gift'),
+ 'type' => 'toggle_switch',
+ 'attributes'=> ['disabled' => 'disabled', ],
+ 'tab' => trans('cartrule.actions_tab'),
+ ],
+ ]);
+ }
+
+
+ public function store(StoreRequest $request)
+ {
+ $redirect_location = parent::storeCrud();
+
+ return $redirect_location;
+ }
+
+ public function update(UpdateRequest $request)
+ {
+ $redirect_location = parent::updateCrud();
+
+ return $redirect_location;
+ }
+}
diff --git a/app/Http/Controllers/Admin/CategoryCrudController.php b/app/Http/Controllers/Admin/CategoryCrudController.php
index 408505f..afd2f64 100644
--- a/app/Http/Controllers/Admin/CategoryCrudController.php
+++ b/app/Http/Controllers/Admin/CategoryCrudController.php
@@ -29,7 +29,6 @@ public function setUp()
|--------------------------------------------------------------------------
*/
$this->crud->enableReorder('name', 0);
- $this->crud->allowAccess('reorder');
/*
|--------------------------------------------------------------------------
@@ -55,6 +54,13 @@ public function setUp()
]
]);
+ /*
+ |--------------------------------------------------------------------------
+ | PERMISSIONS
+ |-------------------------------------------------------------------------
+ */
+ $this->setPermissions();
+
/*
|--------------------------------------------------------------------------
| FIELDS
@@ -71,9 +77,42 @@ public function setUp()
}
- public function setFields()
+ public function setPermissions()
{
+ // Get authenticated user
+ $user = auth()->user();
+
+ // Deny all accesses
+ $this->crud->denyAccess(['list', 'create', 'update', 'reorder', 'delete']);
+
+ // Allow list access
+ if ($user->can('list_categories')) {
+ $this->crud->allowAccess('list');
+ }
+
+ // Allow create access
+ if ($user->can('create_category')) {
+ $this->crud->allowAccess('create');
+ }
+
+ // Allow update access
+ if ($user->can('update_category')) {
+ $this->crud->allowAccess('update');
+ }
+
+ // Allow reorder access
+ if ($user->can('reorder_categories')) {
+ $this->crud->allowAccess('reorder');
+ }
+
+ // Allow delete access
+ if ($user->can('delete_category')) {
+ $this->crud->allowAccess('delete');
+ }
+ }
+ public function setFields()
+ {
$this->crud->addFields([
[
'name' => 'name',
@@ -86,7 +125,6 @@ public function setFields()
'type' => 'text',
]
]);
-
}
public function store(StoreRequest $request)
diff --git a/app/Http/Controllers/Admin/ClientAddressController.php b/app/Http/Controllers/Admin/ClientAddressController.php
new file mode 100644
index 0000000..c67cbd3
--- /dev/null
+++ b/app/Http/Controllers/Admin/ClientAddressController.php
@@ -0,0 +1,67 @@
+input('client_id')) {
+ $addresses = $user->findOrFail($clientId)->addresses;
+
+ return view('renders.client_addresses', compact('addresses'));
+ }
+
+ return response()->json(['status' => 'error', 'messages' => [trans('address.client_is_required')]]);
+ }
+
+ /**
+ * @param Request $request
+ * @param User $user
+ * @param Address $address
+ *
+ * @return \Illuminate\Http\JsonResponse
+ */
+ public function addClientAddress(Request $request, User $user, Address $address)
+ {
+ if ($clientId = $request->input('address')['client_id']) {
+ $user = $user->findOrFail($clientId);
+
+ $user->addresses()->create($request->input('address'));
+
+ return response()->json(['status' => 'success']);
+
+ }
+
+ return response()->json(['status' => 'error', 'messages' => [trans('address.client_is_required')]]);
+ }
+
+ /**
+ * @param Request $request
+ * @param Address $address
+ *
+ * @return \Illuminate\Http\JsonResponse
+ */
+ public function deleteClientAddress(Request $request, Address $address)
+ {
+ if ($id = $request->input('id')) {
+ $address->findOrFail($id)->delete();
+
+ return response()->json(['status' => 'success']);
+ }
+
+ return response()->json(['status' => 'error', 'messages' => [trans('address.address_id_is_required')]]);
+ }
+}
diff --git a/app/Http/Controllers/Admin/ClientCompanyController.php b/app/Http/Controllers/Admin/ClientCompanyController.php
new file mode 100644
index 0000000..ed97f21
--- /dev/null
+++ b/app/Http/Controllers/Admin/ClientCompanyController.php
@@ -0,0 +1,66 @@
+input('client_id')) {
+ $companies = $user->findOrFail($clientId)->companies;
+
+ return view('renders.client_companies', compact('companies'));
+ }
+
+ return response()->json(['status' => 'error', 'messages' => [trans('company.client_is_required')]]);
+ }
+
+ /**
+ * @param Request $request
+ * @param User $user
+ * @param Company $company
+ *
+ * @return \Illuminate\Http\JsonResponse
+ */
+ public function addClientCompany(Request $request, User $user, Company $company)
+ {
+ if ($clientId = $request->input('company')['client_id']) {
+ $user = $user->findOrFail($clientId);
+
+ $user->companies()->create($request->input('company'));
+
+ return response()->json(['status' => 'success']);
+ }
+
+ return response()->json(['status' => 'error', 'messages' => [trans('company.client_is_required')]]);
+ }
+
+ /**
+ * @param Request $request
+ * @param Company $company
+ *
+ * @return \Illuminate\Http\JsonResponse
+ */
+ public function deleteClientCompany(Request $request, Company $company)
+ {
+ if ($id = $request->input('id')) {
+ $company->findOrFail($id)->delete();
+
+ return response()->json(['status' => 'success']);
+ }
+
+ return response()->json(['status' => 'error', 'messages' => [trans('company.company_is_required')]]);
+ }
+}
diff --git a/app/Http/Controllers/Admin/ClientCrudController.php b/app/Http/Controllers/Admin/ClientCrudController.php
new file mode 100644
index 0000000..f8321f5
--- /dev/null
+++ b/app/Http/Controllers/Admin/ClientCrudController.php
@@ -0,0 +1,240 @@
+crud->setModel('App\User');
+ $this->crud->setRoute(config('backpack.base.route_prefix') . '/clients');
+ $this->crud->setEntityNameStrings('client', 'clients');
+ $this->crud->addClause('whereHas', 'roles', function ($query) {
+ $clientRoleName = env('CLIENT_ROLE_NAME');
+ $query->whereName($clientRoleName ?: 'client');
+ });
+
+ /*
+ |--------------------------------------------------------------------------
+ | COLUMNS
+ |--------------------------------------------------------------------------
+ */
+ $this->crud->addColumns([
+ [
+ 'name' => 'salutation',
+ 'label' => trans('client.salutation'),
+ ],
+ [
+ 'name' => 'name',
+ 'label' => trans('client.name'),
+ ],
+ [
+ 'name' => 'gender',
+ 'label' => trans('client.gender'),
+ 'type' => 'boolean',
+ 'options' => [
+ 1 => trans('client.male'),
+ 2 => trans('client.female'),
+ ],
+ ],
+ [
+ 'name' => 'email',
+ 'label' => trans('client.email'),
+ ],
+ [
+ 'name' => 'active',
+ 'label' => trans('common.status'),
+ 'type' => 'boolean',
+ 'options' => [
+ 0 => trans('common.inactive'),
+ 1 => trans('common.active'),
+ ],
+ ]
+
+ ]);
+
+ /*
+ |--------------------------------------------------------------------------
+ | FIELDS
+ |--------------------------------------------------------------------------
+ */
+ $this->setFields();
+
+ /*
+ |--------------------------------------------------------------------------
+ | AJAX TABLE VIEW
+ |--------------------------------------------------------------------------
+ */
+ $this->crud->enableAjaxTable();
+
+ }
+
+ public function setFields()
+ {
+ $this->crud->addFields([
+ [
+ 'name' => 'salutation',
+ 'label' => trans('client.salutation'),
+ 'type' => 'text',
+
+ 'tab' => trans('client.tab_general'),
+ ],
+ [
+ 'name' => 'name',
+ 'label' => trans('client.name'),
+ 'type' => 'text',
+
+ 'tab' => trans('client.tab_general'),
+ ],
+ [
+ 'name' => 'email',
+ 'label' => trans('client.email'),
+ 'type' => 'email',
+
+ 'tab' => trans('client.tab_general'),
+ ],
+ [
+ 'name' => 'password',
+ 'label' => trans('client.password'),
+ 'type' => 'password',
+
+ 'tab' => trans('client.tab_general'),
+ ],
+ [
+ 'name' => 'password_confirmation',
+ 'label' => trans('client.password_confirmation'),
+ 'type' => 'password',
+
+ 'tab' => trans('client.tab_general'),
+ ],
+ [
+ 'name' => 'gender',
+ 'label' => trans('client.gender'),
+ 'type' => 'select_from_array',
+ 'options' => [
+ 1 => trans('client.male'),
+ 2 => trans('client.female'),
+ ],
+
+ 'tab' => trans('client.tab_general'),
+ ],
+ [
+ 'name' => 'birthday',
+ 'label' => trans('client.birthday'),
+ 'type' => 'date',
+
+ 'tab' => trans('client.tab_general'),
+ ],
+ [
+ 'name' => 'active',
+ 'label' => trans('common.status'),
+ 'type' => 'select_from_array',
+ 'options' => [
+ 0 => trans('common.inactive'),
+ 1 => trans('common.active'),
+ ],
+
+ 'tab' => trans('client.tab_general'),
+ ],
+ [
+ // two interconnected entities
+ 'label' => trans('permissionmanager.user_role_permission'),
+ 'field_unique_name' => 'user_role_permission',
+ 'type' => 'checklist_dependency',
+ 'name' => 'roles_and_permissions',
+ 'subfields' => [
+ 'primary' => [
+ 'label' => trans('permissionmanager.roles'),
+ 'name' => 'roles',
+ 'entity' => 'roles',
+ 'entity_secondary' => 'permissions',
+ 'attribute' => 'name',
+ 'model' => config('laravel-permission.models.role'),
+ 'pivot' => true,
+ 'number_columns' => 3, //can be 1,2,3,4,6
+ ],
+ 'secondary' => [
+ 'label' => ucfirst(trans('permissionmanager.permission_singular')),
+ 'name' => 'permissions',
+ 'entity' => 'permissions',
+ 'entity_primary' => 'roles',
+ 'attribute' => 'name',
+ 'model' => "Backpack\PermissionManager\app\Models\Permission",
+ 'pivot' => true,
+ 'number_columns' => 3, //can be 1,2,3,4,6
+ ],
+ ],
+
+ 'tab' => trans('client.tab_permissions'),
+ ],
+ ]);
+
+ $this->crud->addField([
+ 'name' => 'client_address',
+ 'type' => 'client_address',
+ 'country_model' => 'App\Models\Country',
+
+ 'tab' => trans('client.tab_address'),
+ ], 'update');
+
+ $this->crud->addField([
+ 'name' => 'client_company',
+ 'type' => 'client_company',
+ 'country_model' => 'App\Models\Company',
+
+ 'tab' => trans('client.tab_company'),
+ ], 'update');
+ }
+
+ public function store(StoreRequest $request)
+ {
+ $clientRoleName = env('CLIENT_ROLE_NAME');
+
+ $this->handlePasswordInput($request);
+
+ $redirect_location = parent::storeCrud($request);
+ // $clientRoleID = \DB::table('roles')->whereName($clientRoleName ?: 'client')->first()->id;
+ // $this->crud->entry->roles()->attach($clientRoleID);
+
+ return $redirect_location;
+ }
+
+ public function update(UpdateRequest $request)
+ {
+ $this->handlePasswordInput($request);
+
+ $redirect_location = parent::updateCrud($request);
+
+ return $redirect_location;
+ }
+
+ /**
+ * Handle password input fields.
+ *
+ * @param CrudRequest $request
+ */
+ protected function handlePasswordInput(CrudRequest $request)
+ {
+ // Remove fields not present on the user.
+ $request->request->remove('password_confirmation');
+
+ // Encrypt password if specified.
+ if ($request->input('password')) {
+ $request->request->set('password', bcrypt($request->input('password')));
+ } else {
+ $request->request->remove('password');
+ }
+ }
+}
diff --git a/app/Http/Controllers/Admin/CurrencyCrudController.php b/app/Http/Controllers/Admin/CurrencyCrudController.php
index f9c04e6..9ea7455 100644
--- a/app/Http/Controllers/Admin/CurrencyCrudController.php
+++ b/app/Http/Controllers/Admin/CurrencyCrudController.php
@@ -51,6 +51,13 @@ public function setUp()
]
]);
+ /*
+ |--------------------------------------------------------------------------
+ | PERMISSIONS
+ |-------------------------------------------------------------------------
+ */
+ $this->setPermissions();
+
/*
|--------------------------------------------------------------------------
| FIELDS
@@ -67,9 +74,37 @@ public function setUp()
}
- public function setFields()
+ public function setPermissions()
{
+ // Get authenticated user
+ $user = auth()->user();
+
+ // Deny all accesses
+ $this->crud->denyAccess(['list', 'create', 'update', 'delete']);
+
+ // Allow list access
+ if ($user->can('list_currencies')) {
+ $this->crud->allowAccess('list');
+ }
+
+ // Allow create access
+ if ($user->can('create_currency')) {
+ $this->crud->allowAccess('create');
+ }
+
+ // Allow update access
+ if ($user->can('update_currency')) {
+ $this->crud->allowAccess('update');
+ }
+ // Allow delete access
+ if ($user->can('delete_currency')) {
+ $this->crud->allowAccess('delete');
+ }
+ }
+
+ public function setFields()
+ {
$this->crud->addFields([
[
'name' => 'name',
@@ -92,7 +127,6 @@ public function setFields()
'type' => 'checkbox',
]
]);
-
}
public function store(StoreRequest $request)
diff --git a/app/Http/Controllers/Admin/NotificationTemplateCrudController.php b/app/Http/Controllers/Admin/NotificationTemplateCrudController.php
new file mode 100644
index 0000000..273d618
--- /dev/null
+++ b/app/Http/Controllers/Admin/NotificationTemplateCrudController.php
@@ -0,0 +1,218 @@
+crud->setModel('App\Models\NotificationTemplate');
+ $this->crud->setRoute(config('backpack.base.route_prefix') . '/notification-templates');
+ $this->crud->setEntityNameStrings(trans('notification_templates.notification_template'), trans('notification_templates.notification_templates'));
+
+ /*
+ |--------------------------------------------------------------------------
+ | COLUMNS
+ |--------------------------------------------------------------------------
+ */
+ $this->crud->addColumns([
+ [
+ 'name' => 'name',
+ 'label' => trans('notification_templates.name'),
+ ],
+ [
+ 'name' => 'slug',
+ 'label' => trans('notification_templates.slug'),
+ ],
+ [
+ 'name' => 'body',
+ 'label' => trans('notification_templates.body'),
+ ],
+ ]);
+
+ /*
+ |--------------------------------------------------------------------------
+ | PERMISSIONS
+ |-------------------------------------------------------------------------
+ */
+ $this->setPermissions();
+
+ /*
+ |--------------------------------------------------------------------------
+ | FIELDS
+ |--------------------------------------------------------------------------
+ */
+ $this->setFields();
+
+ }
+
+ public function setPermissions()
+ {
+ // Get authenticated user
+ $user = auth()->user();
+
+ // Deny all accesses
+ $this->crud->denyAccess(['list', 'create', 'update', 'delete']);
+
+ // Allow list access
+ if ($user->can('list_notification_templates')) {
+ $this->crud->allowAccess('list');
+ }
+
+ // Allow create access
+ if ($user->can('create_notification_template')) {
+ $this->crud->allowAccess('create');
+ }
+
+ // Allow update access
+ if ($user->can('update_notification_template')) {
+ $this->crud->allowAccess('update');
+ }
+
+ // Uncomment if you want to allow delete functionality
+ // Allow delete access
+ // if ($user->can('delete_notification_template')) {
+ // $this->crud->allowAccess('delete');
+ // }
+ }
+
+ public function setFields()
+ {
+ $availableModels = [
+ 'User' => 'App\Models\User',
+ 'Order' => 'App\Models\Order'
+ ];
+
+ $this->crud->addFields([
+ [
+ 'name' => 'name',
+ 'label' => trans('notification_templates.name'),
+ 'type' => 'text',
+ ],
+ [
+ 'name' => 'slug',
+ 'label' => trans('notification_templates.slug'),
+ 'type' => 'slug',
+ // 'attributes' => ['disabled' => 'disabled']
+ ],
+ [
+ 'name' => 'model',
+ 'label' => trans('notification_templates.model'),
+ 'type' => 'select2_from_array_notification_template_model',
+ 'options' => $availableModels
+ ],
+ [
+ 'name' => 'body',
+ 'label' => trans('notification_templates.body'),
+ 'type' => 'ckeditor',
+ 'wrapperAttributes' => [
+ 'class' => 'form-group col-md-9 col-xs-12'
+ ]
+ ],
+ [
+ 'name' => 'notification_list_variables',
+ 'label' => trans('notification_templates.available_variables'),
+ 'type' => 'notification_list_variables',
+ 'wrapperAttributes' => [
+ 'class' => 'form-group available-variables col-md-3 col-xs-12'
+ ]
+ ],
+ ]);
+ }
+
+ public function listModelVars(Request $request)
+ {
+ $modelClass = 'App\\Models\\'.$request->input('model');
+
+ if ($request->input('model') === 'User') {
+ $modelClass = 'App\\'.$request->input('model');
+ }
+
+ if (class_exists($modelClass)) {
+ $model = new $modelClass;
+
+ return response()->json($model->notificationVars);
+ }
+
+ return null;
+ }
+
+
+ /**
+ * Get model variables available to use in an email template
+ * @param string $modelName
+ * @return array
+ */
+ public function getModelVariables($modelName)
+ {
+ $modelClass = 'App\\Models\\'.$modelName;
+
+ if ($modelName === 'User') {
+ $modelClass = 'App\\'.$modelName;
+ }
+
+ if (class_exists($modelClass)) {
+ $model = new $modelClass;
+ }
+
+ return $model->notificationVars;
+ }
+
+ /**
+ * Check variables in body to match the available variables from the model
+ * @param $request
+ * @return boolean
+ */
+ public function checkModelVariables($request) {
+ preg_match_all('/(\{{2}\s?(.*?)\s?\}{2})/mi',
+ $request->body,
+ $out, PREG_PATTERN_ORDER);
+
+ if (count(array_diff($out[2], $this->getModelVariables($request->model))) > 0) {
+ return false;
+ }
+ return true;
+ }
+
+
+ public function store(StoreRequest $request)
+ {
+ if (!$this->checkModelVariables($request)) {
+ \Alert::error(trans('notification_templates.variables_error'))->flash();
+ return redirect()->back()->withInput();
+ }
+
+ // your additional operations before save here
+ $redirect_location = parent::storeCrud();
+ // your additional operations after save here
+ // use $this->data['entry'] or $this->crud->entry
+ return $redirect_location;
+ }
+
+
+ public function update(UpdateRequest $request)
+ {
+ if (!$this->checkModelVariables($request)) {
+ \Alert::error(trans('notification_templates.variables_error'))->flash();
+ return redirect()->back()->withInput();
+ }
+
+ // your additional operations before save here
+ $redirect_location = parent::updateCrud();
+ // your additional operations after save here
+ // use $this->data['entry'] or $this->crud->entry
+ return $redirect_location;
+ }
+}
diff --git a/app/Http/Controllers/Admin/OrderCrudController.php b/app/Http/Controllers/Admin/OrderCrudController.php
index 4254717..e10a38c 100644
--- a/app/Http/Controllers/Admin/OrderCrudController.php
+++ b/app/Http/Controllers/Admin/OrderCrudController.php
@@ -2,10 +2,12 @@
namespace App\Http\Controllers\Admin;
-use Backpack\CRUD\app\Http\Controllers\CrudController;
-// VALIDATION: change the requests to match your own file names if you need form validation
use App\Http\Requests\OrderRequest as StoreRequest;
use App\Http\Requests\OrderRequest as UpdateRequest;
+use App\Models\OrderStatus;
+use App\Models\OrderStatusHistory;
+use Backpack\CRUD\app\Http\Controllers\CrudController;
+use Illuminate\Http\Request;
class OrderCrudController extends CrudController
{
@@ -19,39 +21,130 @@ public function setUp()
|--------------------------------------------------------------------------
*/
$this->crud->setModel("App\Models\Order");
- $this->crud->setRoute("admin/order");
+ $this->crud->setRoute("admin/orders");
$this->crud->setEntityNameStrings('order', 'orders');
/*
|--------------------------------------------------------------------------
- | BASIC CRUD INFORMATION
+ | COLUMNS
|--------------------------------------------------------------------------
*/
+ $this->crud->addColumns([
+ [
+ 'name' => 'id',
+ 'label' => '#',
+ ],
+ [
+ 'label' => trans('client.client'),
+ 'type' => 'select',
+ 'name' => 'user_id',
+ 'entity' => 'user',
+ 'attribute' => 'name',
+ 'model' => 'App\User',
+ ],
+ [
+ 'label' => trans('order.status'),
+ 'type' => 'select',
+ 'name' => 'status_id',
+ 'entity' => 'status',
+ 'attribute' => 'name',
+ 'model' => 'App\Models\OrderStatus',
+ ],
+ [
+ 'name' => 'total',
+ 'label' => trans('common.total'),
+ ],
+ [
+ 'label' => trans('currency.currency'),
+ 'type' => 'select',
+ 'name' => 'currency_id',
+ 'entity' => 'currency',
+ 'attribute' => 'name',
+ 'model' => 'App\Models\Currency',
+ ],
+ [
+ 'name' => 'created_at',
+ 'label' => trans('order.created_at'),
+ ]
+ ]);
- $this->crud->setFromDb();
/*
|--------------------------------------------------------------------------
- | WORK IN PROGRESS
+ | PERMISSIONS
+ |-------------------------------------------------------------------------
+ */
+ $this->setPermissions();
+
+ /*
+ |--------------------------------------------------------------------------
+ | FIELDS
|--------------------------------------------------------------------------
*/
+ // $this->setFields();
+
+ /*
+ |--------------------------------------------------------------------------
+ | AJAX TABLE VIEW
+ |--------------------------------------------------------------------------
+ */
+ // $this->crud->enableAjaxTable();
+
+
+ }
+
+ public function setPermissions()
+ {
+ // Get authenticated user
+ $user = auth()->user();
+
+ // Deny all accesses
+ $this->crud->denyAccess(['create', 'delete', 'update']);
+
+ // Allow access to show and replace preview button with view
+ $this->crud->allowAccess('show');
+ $this->crud->removeButton('preview');
+ $this->crud->addButtonFromView('line', 'view', 'view', 'end');
+ }
+
+ // public function setFields()
+ // {
+ // }
+
+ public function show($id)
+ {
+ $this->crud->hasAccessOrFail('show');
+
+ $order = $this->crud->getEntry($id);
+ $orderStatuses = OrderStatus::get();
+ $crud = $this->crud;
+
+ return view('admin.order.view', compact('crud', 'order', 'orderStatuses'));
+ }
+
+ public function updateStatus(Request $request, OrderStatusHistory $orderStatusHistory)
+ {
+ // Create history entry
+ $orderStatusHistory->create($request->except('_token'));
+
+ $this->crud->update($request->input('order_id'), ['status_id' => $request->input('status_id')]);
+
+ \Alert::success(trans('order.status_updated'))->flash();
+
+ return redirect()->back();
}
public function store(StoreRequest $request)
{
- // your additional operations before save here
$redirect_location = parent::storeCrud();
- // your additional operations after save here
- // use $this->data['entry'] or $this->crud->entry
+
return $redirect_location;
}
public function update(UpdateRequest $request)
{
- // your additional operations before save here
$redirect_location = parent::updateCrud();
- // your additional operations after save here
- // use $this->data['entry'] or $this->crud->entry
+
return $redirect_location;
}
diff --git a/app/Http/Controllers/Admin/OrderStatusCrudController.php b/app/Http/Controllers/Admin/OrderStatusCrudController.php
index a7b8fc5..a1ea57b 100644
--- a/app/Http/Controllers/Admin/OrderStatusCrudController.php
+++ b/app/Http/Controllers/Admin/OrderStatusCrudController.php
@@ -32,9 +32,22 @@ public function setUp()
[
'name' => 'name',
'label' => trans('order.status_name'),
+ ],
+ [
+ 'name' => 'notification',
+ 'label' => trans('order.notification'),
+ 'type' => 'boolean',
+ 'options' => [0 => 'Disabled', 1 => 'Enabled']
]
]);
+ /*
+ |--------------------------------------------------------------------------
+ | PERMISSIONS
+ |-------------------------------------------------------------------------
+ */
+ $this->setPermissions();
+
/*
|--------------------------------------------------------------------------
| FIELDS
@@ -51,17 +64,52 @@ public function setUp()
}
- public function setFields()
+ public function setPermissions()
{
+ // Get authenticated user
+ $user = auth()->user();
+
+ // Deny all accesses
+ $this->crud->denyAccess(['list', 'create', 'update', 'delete']);
+
+ // Allow list access
+ if ($user->can('list_order_statuses')) {
+ $this->crud->allowAccess('list');
+ }
+
+ // Allow create access
+ if ($user->can('create_order_status')) {
+ $this->crud->allowAccess('create');
+ }
+
+ // Allow update access
+ if ($user->can('update_order_status')) {
+ $this->crud->allowAccess('update');
+ }
+
+ // Allow delete access
+ if ($user->can('delete_order_status')) {
+ $this->crud->allowAccess('delete');
+ }
+ }
+ public function setFields()
+ {
$this->crud->addFields([
[
'name' => 'name',
'label' => trans('order.status_name'),
'type' => 'text',
+ ],
+ [
+ 'name' => 'notification',
+ 'type' => 'select_from_array',
+ 'options' => [
+ 1 => 'Enabled',
+ 0 => 'Disabled'
+ ]
]
]);
-
}
public function store(StoreRequest $request)
diff --git a/app/Http/Controllers/Admin/ProductCrudController.php b/app/Http/Controllers/Admin/ProductCrudController.php
index d7c70bf..fdeef61 100644
--- a/app/Http/Controllers/Admin/ProductCrudController.php
+++ b/app/Http/Controllers/Admin/ProductCrudController.php
@@ -9,6 +9,7 @@
use App\Models\ProductGroup;
use App\Models\ProductImage;
use App\Models\Tax;
+use App\Models\SpecificPrice;
use Backpack\CRUD\app\Http\Controllers\CrudController;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
@@ -31,8 +32,8 @@ public function setUp()
|--------------------------------------------------------------------------
| BUTTONS
|--------------------------------------------------------------------------
+ | See setPermissions method
*/
- $this->crud->addButtonFromView('line', 'Clone Product', 'clone_product', 'end');
/*
|--------------------------------------------------------------------------
@@ -41,39 +42,46 @@ public function setUp()
*/
$this->crud->addColumns([
[
- 'name' => 'name',
- 'label' => trans('product.name'),
+ 'name' => 'name',
+ 'label' => trans('product.name'),
],
[
- 'type' => "select_multiple",
- 'label' => trans('category.categories'),
- 'name' => 'categories',
- 'entity' => 'categories',
- 'attribute' => "name",
- 'model' => "App\Models\Category",
+ 'type' => "select_multiple",
+ 'label' => trans('category.categories'),
+ 'name' => 'categories',
+ 'entity' => 'categories',
+ 'attribute' => "name",
+ 'model' => "App\Models\Category",
],
[
- 'name' => 'sku',
- 'label' => trans('product.sku'),
+ 'name' => 'sku',
+ 'label' => trans('product.sku'),
],
[
- 'name' => 'price',
- 'label' => trans('product.price'),
+ 'name' => 'price',
+ 'label' => trans('product.price'),
],
[
- 'name' => 'stock',
- 'label' => trans('product.stock'),
+ 'name' => 'stock',
+ 'label' => trans('product.stock'),
],
[
- 'name' => 'active',
- 'label' => trans('common.status'),
- 'type' => 'boolean',
- 'options' => [
- 0 => trans('common.inactive'),
- 1 => trans('common.active')
- ],
+ 'name' => 'active',
+ 'label' => trans('common.status'),
+ 'type' => 'boolean',
+ 'options' => [
+ 0 => trans('common.inactive'),
+ 1 => trans('common.active')
+ ],
]
- ]);
+ ]);
+
+ /*
+ |--------------------------------------------------------------------------
+ | PERMISSIONS
+ |-------------------------------------------------------------------------
+ */
+ $this->setPermissions();
/*
|--------------------------------------------------------------------------
@@ -91,24 +99,58 @@ public function setUp()
}
- public function setFields()
+ public function setPermissions()
{
+ // Get authenticated user
+ $user = auth()->user();
+ // Deny all accesses
+ $this->crud->denyAccess(['list', 'create', 'update', 'delete']);
+
+ // Allow list access
+ if ($user->can('list_products')) {
+ $this->crud->allowAccess('list');
+ }
+
+ // Allow create access
+ if ($user->can('create_product')) {
+ $this->crud->allowAccess('create');
+ }
+
+ // Allow update access
+ if ($user->can('update_product')) {
+ $this->crud->allowAccess('update');
+ }
+
+ // Allow clone access
+ if ($user->can('clone_product')) {
+ $this->crud->addButtonFromView('line', trans('product.clone'), 'clone_product', 'end');
+ }
+
+ // Allow delete access
+ if ($user->can('delete_product')) {
+ $this->crud->allowAccess('delete');
+ }
+ }
+
+ public function setFields()
+ {
$this->crud->addFields([
[
'name' => 'name',
'label' => trans('product.name'),
'type' => 'text',
- // TAB
+ // TAB
'tab' => trans('product.general_tab'),
],
[
'name' => 'description',
'label' => trans('product.description'),
- 'type' => 'ckeditor',
+ // 'type' => 'ckeditor',
+ 'type' => 'text',
- // TAB
+ // TAB
'tab' => trans('product.general_tab'),
],
[
@@ -121,7 +163,7 @@ public function setFields()
'model' => "App\Models\Category",
'pivot' => true,
- // TAB
+ // TAB
'tab' => trans('product.general_tab'),
],
[
@@ -129,7 +171,7 @@ public function setFields()
'label' => trans('product.sku'),
'type' => 'text',
- // TAB
+ // TAB
'tab' => trans('product.general_tab'),
],
[
@@ -137,7 +179,7 @@ public function setFields()
'label' => trans('product.stock'),
'type' => 'number',
- // TAB
+ // TAB
'tab' => trans('product.general_tab'),
],
[
@@ -148,7 +190,7 @@ public function setFields()
'step' => 'any',
],
- // TAB
+ // TAB
'tab' => trans('product.general_tab'),
],
[
@@ -159,26 +201,28 @@ public function setFields()
'readonly' => 'readonly',
],
- // TAB
+ // TAB
'tab' => trans('product.general_tab'),
],
[
'name' => 'price_vat_calculator',
'type' => 'product_vat',
+ 'tab' => trans('product.general_tab'),
+
],
[
- 'type' => 'select2_tax',
- 'label' => trans('tax.tax'),
- 'name' => 'tax_id',
- 'entity' => 'tax',
- 'attribute' => 'name',
- 'data_value' => 'value',
- 'model' => "App\Models\Tax",
- 'attributes' => [
- 'id' => 'tax',
- ],
-
- // TAB
+ 'type' => 'select2_tax',
+ 'label' => trans('tax.tax'),
+ 'name' => 'tax_id',
+ 'entity' => 'tax',
+ 'attribute' => 'name',
+ 'data_value' => 'value',
+ 'model' => "App\Models\Tax",
+ 'attributes' => [
+ 'id' => 'tax',
+ ],
+
+ // TAB
'tab' => trans('product.general_tab'),
],
[
@@ -186,58 +230,104 @@ public function setFields()
'label' => trans('common.status'),
'type' => 'select_from_array',
'options' => [
- '0' => trans('common.inactive'),
- '1' => trans('common.active'),
- ],
+ '0' => trans('common.inactive'),
+ '1' => trans('common.active'),
+ ],
- // TAB
+ // TAB
'tab' => trans('product.general_tab'),
],
[
- 'name' => 'attribute_set_id',
- 'label' => trans('attribute.attribute_sets'),
- 'type' => 'select2',
- 'entity' => 'attributes',
- 'attribute' => 'name',
- 'model' => "App\Models\AttributeSet",
- 'attributes' => [
- 'id' => 'attributes-set'
- ],
-
- // TAB
- 'tab' => trans('product.attributes_tab'),
+ 'name' => 'attribute_set_id',
+ 'label' => trans('attribute.attribute_sets'),
+ 'type' => 'select2',
+ 'entity' => 'attributes',
+ 'attribute' => 'name',
+ 'model' => "App\Models\AttributeSet",
+ 'attributes' => [
+ 'id' => 'attributes-set'
+ ],
+
+ // TAB
+ 'tab' => trans('product.attributes_tab'),
],
[
'name' => 'attribute_types',
'label' => trans('attribute.name'),
'type' => 'product_attributes',
- // TAB
+ // TAB
'tab' => trans('product.attributes_tab'),
]
- ]);
+ ]);
$this->crud->addField([
- 'name' => 'dropzone',
- 'type' => 'dropzone',
- 'disk' => 'products', // disk where images will be uploaded
- 'mimes' => [
+ 'name' => 'dropzone',
+ 'type' => 'dropzone',
+ 'disk' => 'products', // disk where images will be uploaded
+ 'mimes' => [
'image/*'
- ],
- 'filesize' => 5, // maximum file size in MB
+ ],
+ 'filesize' => 5, // maximum file size in MB
- // TAB
- 'tab' => trans('product.product_images_tab'),
- ], 'update');
+ // TAB
+ 'tab' => trans('product.product_images_tab'),
+ ], 'update');
$this->crud->addField([
- 'name' => 'product_group',
- 'type' => 'product_group',
- 'model' => 'App\Models\Product',
+ 'name' => 'product_group',
+ 'type' => 'product_group',
+ 'model' => 'App\Models\Product',
+
+ // TAB
+ 'tab' => trans('product.group_tab'),
+ ], 'update');
- // TAB
- 'tab' => trans('product.group_tab'),
- ], 'update');
+
+ // Specific price functionality
+ $this->crud->addFields([
+ [
+ 'name' => 'discount_type',
+ 'label' => trans('specificprice.discount_type'),
+ 'model' =>'App\Models\SpecificPrice',
+ 'entity' => 'specificPrice',
+ 'type' => 'enum_discount_simple',
+
+ // TAB
+ 'tab' => trans('specificprice.specific_price')
+ ],
+ [
+ 'name' => 'reduction',
+ 'label' => trans('specificprice.reduction'),
+ 'model' => 'App\Models\SpecificPrice',
+ 'attribute' => 'reduction',
+ 'type' => 'number',
+
+
+ // TAB
+ 'tab' => trans('specificprice.specific_price')
+ ],
+ [
+ 'name' => 'start_date',
+ 'label' => trans('specificprice.start_date'),
+ 'type' => 'datetime_picker',
+ 'model' => 'App\Models\SpecificPrice',
+ 'attribute' => 'start_date',
+ // TAB
+ 'tab' => trans('specificprice.specific_price')
+ ],
+ [
+ 'name' => 'expiration_date',
+ 'label' => trans('specificprice.expiration_date'),
+ 'type' => 'datetime_picker',
+ 'model' => 'App\Models\SpecificPrice',
+ 'attribute' => 'expiration_date',
+
+ // TAB
+ 'tab' => trans('specificprice.specific_price')
+ ],
+
+ ]);
}
@@ -303,7 +393,7 @@ public function ajaxDeleteProductImage(Request $request, ProductImage $productIm
}
}
- public function store(StoreRequest $request, ProductGroup $productGroup)
+ public function store(StoreRequest $request, ProductGroup $productGroup, SpecificPrice $specificPrice)
{
// Create group entry
$productGroup = $productGroup->create();
@@ -327,9 +417,50 @@ public function store(StoreRequest $request, ProductGroup $productGroup)
}
}
+ $productId = $this->crud->entry->id;
+ $reduction = $request->input('reduction');
+ $discountType = $request->input('discount_type');
+ $startDate = $request->input('start_date');
+ $expirationDate = $request->input('expiration_date');
+
+ if(!$request->has('start_date') || !$request->has('expiration_date')) {
+ \Alert::error(trans('specificprice.dates_cant_be_null'))->flash();
+ return $redirect_location;
+ }
+
+ // Check if a specific price reduction doesn't already exist in this period
+ if(!$this->validateProductDates($productId, $startDate, $expirationDate)) {
+ $product = Product::find($productId);
+ $productName = $product->name;
+
+ \Alert::error(trans('specificprice.wrong_dates', ['productName' => $productName]))->flash();
+ return $redirect_location;
+ }
+
+ // Check if the price after reduction is not less than 0
+ if($request->has('reduction') && $request->has('discount_type')) {
+ if(!$this->validateReductionPrice($productId, $reduction,
+ $discountType)) {
+ \Alert::error(
+ trans('specificprice.reduction_price_not_ok'))->flash();
+ }
+ else{
+ // Save specific price
+ $specificPrice->discount_type = $discountType;
+ $specificPrice->reduction = $reduction;
+ $specificPrice->start_date = $startDate;
+ $specificPrice->expiration_date = $expirationDate;
+ $specificPrice->product_id = $productId;
+ $specificPrice = $specificPrice->save();
+ }
+ }
+
+
+
return $redirect_location;
}
+
public function update(UpdateRequest $request, Attribute $attribute, Product $product)
{
// Get current product data
@@ -389,6 +520,51 @@ public function update(UpdateRequest $request, Attribute $attribute, Product $pr
}
}
+
+ $discountType = $request->input('discount_type');
+ $reduction = $request->input('reduction');
+ $startDate = $request->input('start_date');
+ $expirationDate = $request->input('expiration_date');
+ $productId = $this->crud->entry->id;
+
+
+ // Check if the price after reduction is not less than 0
+ if($request->has('reduction') && $request->has('discount_type') && $discountType) {
+ if(!$this->validateReductionPrice($productId, $reduction,
+ $discountType)) {
+ \Alert::error(
+ trans('specificprice.reduction_price_not_ok'))->flash();
+ return $redirect_location;
+ }
+ }
+
+ if(!$request->has('start_date') || !$request->has('expiration_date')) {
+ \Alert::error(trans('specificprice.dates_cant_be_null'))->flash();
+ return $redirect_location;
+ }
+
+ // Check if a specific price reduction doesn't already exist in this period
+ if(!$this->validateProductDates($productId, $startDate, $expirationDate)) {
+ $product = Product::find($productId);
+ $productName = $product->name;
+
+ \Alert::error(trans('specificprice.wrong_dates', ['productName' => $productName]))->flash();
+ return $redirect_location;
+ }
+
+ if($request->has('reduction') && $request->has('discount_type') && $discountType) {
+ // Save specific price
+ $specificPrice = new SpecificPrice();
+
+ $specificPrice->discount_type = $discountType;
+ $specificPrice->reduction = $reduction;
+ $specificPrice->start_date = $startDate;
+ $specificPrice->expiration_date = $expirationDate;
+ $specificPrice->product_id = $productId;
+ $specificPrice = $specificPrice->save();
+ }
+
+
return $redirect_location;
}
@@ -440,21 +616,21 @@ public function cloneProduct(Product $product, Request $request)
switch($relationType) {
case 'hasMany':
- if (count($product->{$relationName}) > 0) {
- foreach ($product->{$relationName} as $relationValue) {
- $clone->{$relationName}()->create($relationValue->toArray());
- }
+ if (count($product->{$relationName}) > 0) {
+ foreach ($product->{$relationName} as $relationValue) {
+ $clone->{$relationName}()->create($relationValue->toArray());
}
+ }
break;
case 'hasOne':
- if ($product->{$relationName}) {
- $clone->{$relationName}()->create($values->toArray());
- }
+ if ($product->{$relationName}) {
+ $clone->{$relationName}()->create($values->toArray());
+ }
break;
case 'belongsToMany':
- $clone->{$relationName}()->sync($values);
+ $clone->{$relationName}()->sync($values);
break;
}
}
@@ -464,4 +640,62 @@ public function cloneProduct(Product $product, Request $request)
return redirect()->back();
}
+
+ /**
+ * Validate if the price after reduction is not less than 0
+ *
+ * @return boolean
+ */
+ public function validateReductionPrice($productId, $reduction,
+ $discountType)
+ {
+
+ $product = Product::find($productId);
+ $oldPrice = $product->price;
+ if($discountType == 'Amount') {
+ $newPrice = $oldPrice - $reduction;
+ }
+ if($discountType == 'Percent') {
+ $newPrice = $oldPrice - $reduction/100.00 * $oldPrice;
+ }
+
+ if($newPrice < 0) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Check if it doesn't already exist a specific price reduction for the same
+ * period for a product
+ *
+ * @return boolean
+ */
+ public function validateProductDates($productId, $startDate, $expirationDate)
+ {
+ $specificPrice = SpecificPrice::where('product_id', $productId)->get();
+
+ foreach ($specificPrice as $item) {
+ $existingStartDate = $item->start_date;
+ $existingExpirationDate = $item->expiration_date;
+ if($expirationDate >= $existingStartDate
+ && $startDate <= $existingExpirationDate) {
+ return false;
+ }
+ if($expirationDate >= $existingStartDate
+ && $startDate <= $existingExpirationDate) {
+ return false;
+ }
+ if($startDate <= $existingStartDate
+ && $expirationDate >= $existingExpirationDate) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
}
+
+
+
diff --git a/app/Http/Controllers/Admin/SpecificPriceCrudController.php b/app/Http/Controllers/Admin/SpecificPriceCrudController.php
new file mode 100644
index 0000000..3f5740f
--- /dev/null
+++ b/app/Http/Controllers/Admin/SpecificPriceCrudController.php
@@ -0,0 +1,347 @@
+crud->setModel('App\Models\SpecificPrice');
+ $this->crud->setRoute('admin/specific-prices');
+ $this->crud->setEntityNameStrings('specific price', 'specific prices');
+
+ /*
+ |--------------------------------------------------------------------------
+ | BASIC CRUD INFORMATION
+ |--------------------------------------------------------------------------
+ */
+ // $this->crud->setFromDb();
+
+ /*
+ |--------------------------------------------------------------------------
+ | CRUD COLUMNS
+ |--------------------------------------------------------------------------
+ */
+ $this->crud->addColumns([
+ [
+ 'name' => 'product_id',
+ 'label' => trans('specificprice.product'),
+ 'attribute' => 'name',
+ 'model' => 'App\Models\Product',
+ 'type' => "model_function",
+ 'function_name' => 'getProductName',
+ ],
+ [
+ 'name' => 'start_date',
+ 'label' => trans('specificprice.start_date'),
+ ],
+ [
+ 'name' => 'expiration_date',
+ 'label' => trans('specificprice.expiration_date'),
+ ],
+ [
+ 'name' => 'discount_type',
+ 'label' => trans('specificprice.discount_type'),
+ 'type' => 'enum',
+ ],
+ [
+ 'name' => "reduction",
+ 'label' => trans('specificprice.reduction'),
+ 'type' => "model_function",
+ 'function_name' => 'getReduction',
+ ],
+ [
+ 'name' => "old_price",
+ 'label' => trans('specificprice.old_price'),
+ 'type' => "model_function",
+ 'function_name' => 'getOldPrice',
+ ],
+ [
+ 'name' => "reduced_price",
+ 'label' => trans('specificprice.reduced_price'),
+ 'type' => "model_function",
+ 'function_name' => 'getReducedPrice',
+ ]
+
+ ]);
+
+ /*
+ |--------------------------------------------------------------------------
+ | PERMISSIONS
+ |-------------------------------------------------------------------------
+ */
+ $this->setPermissions();
+
+ /*
+ |--------------------------------------------------------------------------
+ | FIELDS
+ |--------------------------------------------------------------------------
+ */
+ $this->setFields();
+
+ /*
+ |--------------------------------------------------------------------------
+ | AJAX TABLE VIEW
+ |--------------------------------------------------------------------------
+ */
+ // $this->crud->enableAjaxTable();
+ }
+
+
+ public function setPermissions()
+ {
+ // Get authenticated user
+ $user = auth()->user();
+
+ // Deny all accesses
+ $this->crud->denyAccess(['list', 'create', 'update', 'delete']);
+
+ // Allow list access
+ if ($user->can('list_specific_prices')) {
+ $this->crud->allowAccess('list');
+ }
+
+ // Allow create access
+ if ($user->can('create_specific_price')) {
+ $this->crud->allowAccess('create');
+ }
+
+ // Allow update access
+ if ($user->can('update_specific_price')) {
+ $this->crud->allowAccess('update');
+ }
+
+ // Allow delete access
+ if ($user->can('delete_specific_price')) {
+ $this->crud->allowAccess('delete');
+ }
+
+ }
+
+ public function setFields(){
+ $this->crud->addField(
+ [
+ 'name' => 'product_id',
+ 'label' => trans('specificprice.product'),
+ 'model' => 'App\Models\Product',
+ 'entity' => 'product',
+ 'attribute' => 'name',
+ 'type' =>'select2',
+ ], 'update');
+
+ $this->crud->addField(
+ [
+ 'name' => 'product_id',
+ 'label' => trans('specificprice.products'),
+ 'model' => 'App\Models\Product',
+ 'entity' => 'product',
+ 'attribute' => 'name',
+ 'type' =>'select2_multiple',
+ ], 'create');
+
+ $this->crud->addFields([
+
+ [
+ 'name' => 'discount_type',
+ 'label' => trans('specificprice.discount_type'),
+ 'type' => 'enum_discount_type',
+ 'attributes'=> ['field_to_enable' => 'currency_id',
+ 'enable_field_on_option' => 'Amount'],
+ ],
+ [
+ 'name' => 'reduction',
+ 'label' => trans('specificprice.reduction'),
+ 'model' => 'App\Models\SpecificPrice',
+ 'type' => 'number',
+ ],
+ [
+ 'name' => 'start_date',
+ 'label' => trans('specificprice.start_date'),
+ 'type' => 'datetime_picker',
+ ],
+
+ [
+ 'name' => 'expiration_date',
+ 'label' => trans('specificprice.expiration_date'),
+ 'type' => 'datetime_picker',
+ ],
+
+ ]);
+ }
+
+
+ public function store(StoreRequest $request)
+ {
+
+ $productIDs = $request->input()['product_id'];
+ $nrOfRequests = count($request->input()['product_id']);
+
+ $discountType = $request->input()['discount_type'];
+ $reduction = $request->input()['reduction'];
+ $startDate = $request->input()['start_date'];
+ $expirationDate = $request->input()['expiration_date'];
+
+
+ // Get the first product which price is less than 0 after reduction
+ $productNotValidatedName = $this
+ ->getInvalidReductionProduct($productIDs, $reduction, $discountType);
+
+ if (isset($productNotValidatedName)) {
+ \Alert::error(
+ trans('specificprice.reduction_price_not_ok', ['productName' => $productNotValidatedName ]))
+ ->flash();
+
+ return redirect()->back()->withInput();
+ }
+
+ foreach ($productIDs as $productId) {
+ if(!$this->validateProductDates($productId, $startDate, $expirationDate)) {
+ $product = Product::find($productId);
+ $productName = $product->name;
+
+ \Alert::error(trans('specificprice.wrong_dates', ['productName' => $productName]))->flash();
+ return redirect()->back()->withInput();
+ }
+ }
+
+ // Save request for each product separately
+ for($i=0; $i<$nrOfRequests; $i++){
+ $request->request->set('product_id', $productIDs[$i]);
+ $specific_price = SpecificPrice::create(
+ $request->except(['save_action', '_token', '_method']));
+ }
+
+ $redirectUrl = $this->crud->route;
+ return \Redirect::to($redirectUrl);
+ }
+
+
+
+ public function update($id, UpdateRequest $request)
+ {
+ $productId = $request->input()['product_id'];
+
+ $discountType = $request->input()['discount_type'];
+ $reduction = $request->input()['reduction'];
+ $startDate = $request->input()['start_date'];
+ $expirationDate = $request->input()['expiration_date'];
+
+
+ // Check if price after reduction is not less than 0
+ if(!$this->validateReductionPrice($productId, $reduction,
+ $discountType)) {
+ $product = Product::find($productId);
+ $productName = $product->name;
+ \Alert::error(
+ trans('specificprice.reduction_price_not_ok',
+ ['productName' => $productName ]))->flash();
+ return redirect()->back()->withInput();
+ }
+
+ $specificPriceId = $id ;
+
+ if(!$this->validateProductDates($productId, $startDate, $expirationDate, $specificPriceId )) {
+ $product = Product::find($productId);
+ $productName = $product->name;
+
+ \Alert::error(trans('specificprice.wrong_dates', ['productName' => $productName]))->flash();
+ return redirect()->back()->withInput();
+ }
+
+
+ $redirect_location = parent::updateCrud();
+
+ return $redirect_location;
+ }
+
+
+ /**
+ * Validate if the price after reduction is not less than 0
+ *
+ * @return boolean
+ */
+ public function validateReductionPrice($productId, $reduction,
+ $discountType)
+ {
+ $product = Product::find($productId);
+ $oldPrice = $product->price;
+ if($discountType == 'Amount') {
+ $newPrice = $oldPrice - $reduction;
+ }
+ if($discountType == 'Percent') {
+ $newPrice = $oldPrice - $reduction/100.00 * $oldPrice;
+ }
+
+ if($newPrice < 0) {
+ return false;
+ }
+ return true;
+ }
+
+
+ /**
+ * Get the first product name which price is less than 0 after reduction, or NULL
+ *
+ * @return string or NULL
+ */
+ public function getInvalidReductionProduct($productIDs, $reduction, $discountType)
+ {
+ foreach ($productIDs as $productId) {
+ if(!$this->validateReductionPrice($productId, $reduction, $discountType)) {
+ $product = Product::find($productId);
+ $productName = $product->name;
+
+ return $productName;
+ }
+ }
+ return NULL;
+ }
+
+ /**
+ * Check if it doesn't already exist a specific price reduction for the same
+ * period for a product
+ *
+ * @return boolean
+ */
+ public function validateProductDates($productId, $startDate, $expirationDate, $specificPriceId=0)
+ {
+ $specificPrice = SpecificPrice::where('product_id', $productId)->get();
+
+ foreach ($specificPrice as $item) {
+ if($item->id == $specificPriceId) {
+ break;
+ }
+ $existingStartDate = $item->start_date;
+ $existingExpirationDate = $item->expiration_date;
+ if($expirationDate >= $existingStartDate
+ && $startDate <= $existingExpirationDate) {
+ return false;
+ }
+ if($expirationDate >= $existingStartDate
+ && $startDate <= $existingExpirationDate) {
+ return false;
+ }
+ if($startDate <= $existingStartDate
+ && $expirationDate >= $existingExpirationDate) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+}
diff --git a/app/Http/Controllers/Admin/TaxCrudController.php b/app/Http/Controllers/Admin/TaxCrudController.php
index a82f5b6..9d6aa45 100644
--- a/app/Http/Controllers/Admin/TaxCrudController.php
+++ b/app/Http/Controllers/Admin/TaxCrudController.php
@@ -39,6 +39,13 @@ public function setUp()
]
]);
+ /*
+ |--------------------------------------------------------------------------
+ | PERMISSIONS
+ |-------------------------------------------------------------------------
+ */
+ $this->setPermissions();
+
/*
|--------------------------------------------------------------------------
| FIELDS
@@ -55,9 +62,37 @@ public function setUp()
}
- public function setFields()
+ public function setPermissions()
{
+ // Get authenticated user
+ $user = auth()->user();
+
+ // Deny all accesses
+ $this->crud->denyAccess(['list', 'create', 'update', 'delete']);
+
+ // Allow list access
+ if ($user->can('list_taxes')) {
+ $this->crud->allowAccess('list');
+ }
+
+ // Allow create access
+ if ($user->can('create_tax')) {
+ $this->crud->allowAccess('create');
+ }
+
+ // Allow update access
+ if ($user->can('update_tax')) {
+ $this->crud->allowAccess('update');
+ }
+
+ // Allow delete access
+ if ($user->can('delete_tax')) {
+ $this->crud->allowAccess('delete');
+ }
+ }
+ public function setFields()
+ {
$this->crud->addFields([
[
'name' => 'name',
@@ -71,7 +106,6 @@ public function setFields()
'type' => 'text',
]
]);
-
}
public function store(StoreRequest $request)
diff --git a/app/Http/Controllers/Admin/UserCrudController.php b/app/Http/Controllers/Admin/UserCrudController.php
new file mode 100644
index 0000000..b99469e
--- /dev/null
+++ b/app/Http/Controllers/Admin/UserCrudController.php
@@ -0,0 +1,210 @@
+crud->setModel('App\User');
+ $this->crud->setRoute(config('backpack.base.route_prefix') . '/users');
+ $this->crud->setEntityNameStrings('user', 'users');
+
+ // Include all users except clients
+ $this->crud->addClause('whereDoesntHave', 'roles', function ($query) {
+ $clientRoleName = env('CLIENT_ROLE_NAME');
+ return $query->where("name", $clientRoleName ?: 'client');
+ });
+
+
+ /*
+ |--------------------------------------------------------------------------
+ | COLUMNS
+ |--------------------------------------------------------------------------
+ */
+ $this->crud->addColumns([
+ [
+ 'name' => 'salutation',
+ 'label' => trans('user.salutation'),
+ ],
+ [
+ 'name' => 'name',
+ 'label' => trans('user.name'),
+ ],
+ [
+ 'name' => 'gender',
+ 'label' => trans('user.gender'),
+ 'type' => 'boolean',
+ 'options' => [
+ 1 => trans('user.male'),
+ 2 => trans('user.female'),
+ ],
+ ],
+ [
+ 'name' => 'email',
+ 'label' => trans('user.email'),
+ ],
+ [
+ 'label' => trans('permissionmanager.roles'),
+ 'type' => 'select_multiple',
+ 'name' => 'roles',
+ 'entity' => 'roles',
+ 'attribute' => 'name',
+ 'model' => config('laravel-permission.models.role'),
+ ],
+ [
+ 'name' => 'active',
+ 'label' => trans('common.status'),
+ 'type' => 'boolean',
+ 'options' => [
+ 0 => trans('common.inactive'),
+ 1 => trans('common.active'),
+ ],
+ ]
+
+ ]);
+
+ /*
+ |--------------------------------------------------------------------------
+ | FIELDS
+ |--------------------------------------------------------------------------
+ */
+ $this->setFields();
+
+ /*
+ |--------------------------------------------------------------------------
+ | AJAX TABLE VIEW
+ |--------------------------------------------------------------------------
+ */
+ $this->crud->enableAjaxTable();
+
+ }
+
+ public function setFields()
+ {
+
+ // dd($this->crud->model->find(1)->roles->first()->name);
+
+ $this->crud->addFields([
+ [
+ 'name' => 'name',
+ 'label' => trans('user.name'),
+ 'type' => 'text',
+
+ 'tab' => trans('user.tab_general'),
+ ],
+ [
+ 'name' => 'email',
+ 'label' => trans('user.email'),
+ 'type' => 'email',
+
+ 'tab' => trans('user.tab_general'),
+ ],
+ [
+ 'name' => 'password',
+ 'label' => trans('user.password'),
+ 'type' => 'password',
+
+ 'tab' => trans('user.tab_general'),
+ ],
+ [
+ 'name' => 'password_confirmation',
+ 'label' => trans('user.password_confirmation'),
+ 'type' => 'password',
+
+ 'tab' => trans('user.tab_general'),
+ ],
+ [
+ 'name' => 'active',
+ 'label' => trans('common.status'),
+ 'type' => 'select_from_array',
+ 'options' => [
+ 0 => trans('common.inactive'),
+ 1 => trans('common.active'),
+ ],
+
+ 'tab' => trans('user.tab_general'),
+ ],
+ [
+ // two interconnected entities
+ 'label' => trans('permissionmanager.user_role_permission'),
+ 'field_unique_name' => 'user_role_permission',
+ 'type' => 'checklist_dependency',
+ 'name' => 'roles_and_permissions',
+ 'subfields' => [
+ 'primary' => [
+ 'label' => trans('permissionmanager.roles'),
+ 'name' => 'roles',
+ 'entity' => 'roles',
+ 'entity_secondary' => 'permissions',
+ 'attribute' => 'name',
+ 'model' => config('laravel-permission.models.role'),
+ 'pivot' => true,
+ 'number_columns' => 3, //can be 1,2,3,4,6
+ ],
+ 'secondary' => [
+ 'label' => ucfirst(trans('permissionmanager.permission_singular')),
+ 'name' => 'permissions',
+ 'entity' => 'permissions',
+ 'entity_primary' => 'roles',
+ 'attribute' => 'name',
+ 'model' => "Backpack\PermissionManager\app\Models\Permission",
+ 'pivot' => true,
+ 'number_columns' => 3, //can be 1,2,3,4,6
+ ],
+ ],
+
+ 'tab' => trans('user.tab_permissions'),
+ ],
+ ]);
+ }
+
+ public function store(StoreRequest $request)
+ {
+
+ $this->handlePasswordInput($request);
+
+ $redirect_location = parent::storeCrud($request);
+
+ return $redirect_location;
+ }
+
+ public function update(UpdateRequest $request)
+ {
+ $this->handlePasswordInput($request);
+
+ $redirect_location = parent::updateCrud($request);
+
+ return $redirect_location;
+ }
+
+ /**
+ * Handle password input fields.
+ *
+ * @param CrudRequest $request
+ */
+ protected function handlePasswordInput(CrudRequest $request)
+ {
+ // Remove fields not present on the user.
+ $request->request->remove('password_confirmation');
+
+ // Encrypt password if specified.
+ if ($request->input('password')) {
+ $request->request->set('password', bcrypt($request->input('password')));
+ } else {
+ $request->request->remove('password');
+ }
+ }
+}
diff --git a/app/Http/Requests/CartRuleRequest.php b/app/Http/Requests/CartRuleRequest.php
new file mode 100644
index 0000000..030412b
--- /dev/null
+++ b/app/Http/Requests/CartRuleRequest.php
@@ -0,0 +1,66 @@
+ 'required|min:5|max:255',
+ 'code' => 'required|min:5|max:255',
+ 'priority' => 'required|numeric',
+ 'start_date' => 'required|date',
+ 'expiration_date' => 'required|date',
+ 'promo_label' => 'max:255',
+ 'promo_text' => 'max:1000',
+ 'multiply_gift' => 'numeric',
+ 'min_nr_products' => 'numeric',
+ 'reduction_amount' => 'numeric',
+ 'total_available' => 'numeric',
+ 'total_available_each_user' => 'numeric',
+ ];
+ }
+
+ /**
+ * Get the validation attributes that apply to the request.
+ *
+ * @return array
+ */
+ public function attributes()
+ {
+ return [
+ //
+ ];
+ }
+
+ /**
+ * Get the validation messages that apply to the request.
+ *
+ * @return array
+ */
+ public function messages()
+ {
+ return [
+ //
+ ];
+ }
+}
diff --git a/app/Http/Requests/NotificationTemplateRequest.php b/app/Http/Requests/NotificationTemplateRequest.php
new file mode 100644
index 0000000..a7ce887
--- /dev/null
+++ b/app/Http/Requests/NotificationTemplateRequest.php
@@ -0,0 +1,55 @@
+ 'required|unique:notification_templates,slug,'.$this->segment(3)
+ ];
+ }
+
+ /**
+ * Get the validation attributes that apply to the request.
+ *
+ * @return array
+ */
+ public function attributes()
+ {
+ return [
+ //
+ ];
+ }
+
+ /**
+ * Get the validation messages that apply to the request.
+ *
+ * @return array
+ */
+ public function messages()
+ {
+ return [
+ //
+ ];
+ }
+}
diff --git a/app/Http/Requests/SpecificPriceRequest.php b/app/Http/Requests/SpecificPriceRequest.php
new file mode 100644
index 0000000..e9a75e3
--- /dev/null
+++ b/app/Http/Requests/SpecificPriceRequest.php
@@ -0,0 +1,59 @@
+ 'required|numeric',
+ 'start_date' => 'required|date|before:expiration_date',
+ 'expiration_date' => 'required|date|after:start_date',
+ 'product_id' => 'required',
+ ];
+ }
+
+ /**
+ * Get the validation attributes that apply to the request.
+ *
+ * @return array
+ */
+ public function attributes()
+ {
+ return [
+ //
+ ];
+ }
+
+ /**
+ * Get the validation messages that apply to the request.
+ *
+ * @return array
+ */
+ public function messages()
+ {
+ return [
+ 'start_date.before' => 'The start date should be before to end date',
+ 'expiration_date.after' => 'The expiration date should be after start date'
+ ];
+ }
+}
diff --git a/app/Http/Requests/UserStoreRequest.php b/app/Http/Requests/UserStoreRequest.php
new file mode 100644
index 0000000..8f83821
--- /dev/null
+++ b/app/Http/Requests/UserStoreRequest.php
@@ -0,0 +1,57 @@
+ 'required',
+ 'email' => 'required|unique:'.config('laravel-permission.table_names.users', 'users').',email',
+ 'password' => 'required|confirmed',
+ ];
+ }
+
+ /**
+ * Get the validation attributes that apply to the request.
+ *
+ * @return array
+ */
+ public function attributes()
+ {
+ return [
+ //
+ ];
+ }
+
+ /**
+ * Get the validation messages that apply to the request.
+ *
+ * @return array
+ */
+ public function messages()
+ {
+ return [
+ //
+ ];
+ }
+}
diff --git a/app/Http/Requests/UserUpdateRequest.php b/app/Http/Requests/UserUpdateRequest.php
new file mode 100644
index 0000000..a5d48cd
--- /dev/null
+++ b/app/Http/Requests/UserUpdateRequest.php
@@ -0,0 +1,57 @@
+ 'required',
+ 'name' => 'required',
+ 'password' => 'confirmed',
+ ];
+ }
+
+ /**
+ * Get the validation attributes that apply to the request.
+ *
+ * @return array
+ */
+ public function attributes()
+ {
+ return [
+ //
+ ];
+ }
+
+ /**
+ * Get the validation messages that apply to the request.
+ *
+ * @return array
+ */
+ public function messages()
+ {
+ return [
+ //
+ ];
+ }
+}
diff --git a/app/Http/helpers.php b/app/Http/helpers.php
index 08e1ddd..a1c1902 100644
--- a/app/Http/helpers.php
+++ b/app/Http/helpers.php
@@ -6,4 +6,36 @@ function getRelationType($relation = null) {
$type = lcfirst(substr($type, strrpos($type, '\\') + 1));
return $type;
+}
+
+// Format number with decimals
+function decimalFormat($number = 0, $decimals = 2)
+{
+ return number_format((float)$number, $decimals, '.', '');
+}
+
+// Get models
+function getModels($path, $exception = []){
+ $out = [];
+ $results = scandir($path);
+ foreach ($results as $result) {
+ if ($result === '.' or $result === '..') continue;
+ $filename = $path . '/' . $result;
+ if (is_dir($filename)) {
+ $out = array_merge($out, getModels($filename));
+ } else {
+ $out[] = substr($filename,0,-4);
+ }
+ }
+ return $out;
+}
+
+function getStringBetween($string, $start, $end){
+ $string = ' ' . $string;
+ $ini = strpos($string, $start);
+ if ($ini == 0) return '';
+ $ini += strlen($start);
+ $len = strpos($string, $end, $ini) - $ini;
+
+ return substr($string, $ini, $len);
}
\ No newline at end of file
diff --git a/app/Mail/NotificationTemplateMail.php b/app/Mail/NotificationTemplateMail.php
new file mode 100644
index 0000000..407f59e
--- /dev/null
+++ b/app/Mail/NotificationTemplateMail.php
@@ -0,0 +1,46 @@
+template = NotificationTemplate::where('slug', $slug)->first();
+ $this->model = $model;
+ }
+
+ /**
+ * Build the message.
+ *
+ * @return $this
+ */
+ public function build()
+ {
+ $variables = $this->model->notificationVariables();
+
+ $patterns = collect($variables)->map(function ($variable, $key) {
+ return '/(\{{2}\s?'.$key.'\s?\}{2})/mi';
+ });
+
+ $body = preg_replace($patterns->toArray(), $variables, $this->template->body);
+
+ return $this->view('email.notification_template.layout', compact('body'));
+ }
+}
diff --git a/app/Models/Address.php b/app/Models/Address.php
new file mode 100644
index 0000000..09f9bed
--- /dev/null
+++ b/app/Models/Address.php
@@ -0,0 +1,71 @@
+hasOne('App\Models\Country', 'id', 'country_id');
+ }
+
+ /*
+ |--------------------------------------------------------------------------
+ | SCOPES
+ |--------------------------------------------------------------------------
+ */
+
+ /*
+ |--------------------------------------------------------------------------
+ | ACCESORS
+ |--------------------------------------------------------------------------
+ */
+
+ /*
+ |--------------------------------------------------------------------------
+ | MUTATORS
+ |--------------------------------------------------------------------------
+ */
+}
diff --git a/app/Models/CartRule.php b/app/Models/CartRule.php
new file mode 100644
index 0000000..0915375
--- /dev/null
+++ b/app/Models/CartRule.php
@@ -0,0 +1,146 @@
+compatibleCartRules()->detach();
+ $model->products()->detach();
+ $model->categories()->detach();
+ $model->productGroups()->detach();
+ $model->customers()->detach();
+ });
+
+ }
+ /*
+ |--------------------------------------------------------------------------
+ | FUNCTIONS
+ |--------------------------------------------------------------------------
+ */
+
+ /*
+ |--------------------------------------------------------------------------
+ | RELATIONS
+ |--------------------------------------------------------------------------
+ */
+
+ public function customer()
+ {
+ return $this->hasOne('App\User');
+ }
+
+ public function gift()
+ {
+ return $this->hasOne('App\Models\Product');
+ }
+
+ public function reductionCurrency()
+ {
+ return $this->hasOne('App\Models\Currency');
+ }
+
+ public function minimumAmountCurrency()
+ {
+ return $this->hasOne('App\Models\Currency');
+ }
+
+ public function compatibleCartRules()
+ {
+ return $this->belongsToMany('App\Models\CartRule', 'cart_rules_combinations', 'cart_rule_id_1', 'cart_rule_id_2');
+ }
+
+
+ public function products()
+ {
+ return $this->belongsToMany('App\Models\Product',
+ 'cart_rules_products', 'cart_rule_id', 'product_id');
+ }
+
+ public function categories()
+ {
+ return $this->belongsToMany('App\Models\Category',
+ 'cart_rules_categories', 'cart_rule_id', 'category_id');
+ }
+
+ public function productGroups()
+ {
+ return $this->belongsToMany('App\Models\ProductGroup',
+ 'cart_rules_product_groups', 'cart_rule_id', 'product_group_id');
+ }
+
+ public function customers()
+ {
+ return $this->belongsToMany('App\User',
+ 'cart_rules_customers', 'cart_rule_id', 'customer_id');
+ }
+
+ /*
+ |--------------------------------------------------------------------------
+ | SCOPES
+ |--------------------------------------------------------------------------
+ */
+
+ /*
+ |--------------------------------------------------------------------------
+ | ACCESORS
+ |--------------------------------------------------------------------------
+ */
+
+ /*
+ |--------------------------------------------------------------------------
+ | MUTATORS
+ |--------------------------------------------------------------------------
+ */
+}
diff --git a/app/Models/Category.php b/app/Models/Category.php
index 02f0b16..7578249 100644
--- a/app/Models/Category.php
+++ b/app/Models/Category.php
@@ -52,6 +52,11 @@ public function children()
return $this->hasMany('App\Models\Category', 'parent_id');
}
+ public function cartRules()
+ {
+ return $this->belongsToMany('App\Models\CartRule');
+ }
+
/*
|--------------------------------------------------------------------------
| SCOPES
diff --git a/app/Models/Company.php b/app/Models/Company.php
new file mode 100644
index 0000000..af529a1
--- /dev/null
+++ b/app/Models/Company.php
@@ -0,0 +1,64 @@
+first();
+
+ if(isset($default_currency)){
+ $default_currency_name = $default_currency->name;
+ } else {
+ $default_currency_name = '-';
+ }
+
+ return $default_currency_name;
+ }
+
+
+ public static function getDefaultCurrencyId() {
+ $default_currency = Currency::where('default', 1)->first();
+
+ if(isset($default_currency)){
+ $default_currency_id = $default_currency->id;
+ } else {
+ $default_currency_id = NULL;
+ }
+
+ return $default_currency_id;
+ }
+
/*
|--------------------------------------------------------------------------
| RELATIONS
|--------------------------------------------------------------------------
*/
+ public function specificPrice()
+ {
+ return $this->belongsTo('App\Models\SpecificPrice', 'id');
+ }
+
/*
|--------------------------------------------------------------------------
diff --git a/app/Models/NotificationTemplate.php b/app/Models/NotificationTemplate.php
new file mode 100644
index 0000000..03fbea9
--- /dev/null
+++ b/app/Models/NotificationTemplate.php
@@ -0,0 +1,60 @@
+ $this->user->salutation,
+ 'userName' => $this->user->name,
+ 'userEmail' => $this->user->email,
+ 'total' => $this->total(),
+ 'carrier' => $this->carrier()->first()->name,
+ 'status' => $this->status->name
+ ];
+ }
+
+ /*
+ |--------------------------------------------------------------------------
+ | EVENTS
+ |--------------------------------------------------------------------------
+ */
+ protected static function boot()
+ {
+ parent::boot();
+
+ static::updating(function($order) {
+ // Send notification when order status was changed
+ $oldStatus = $order->getOriginal();
+ if ($order->status_id != $oldStatus['status_id'] && $order->status->notification != 0) {
+ // example of usage: (be sure that a notification template mail with the slug "example-slug" exists in db)
+ return \Mail::to($order->user->email)->send(new NotificationTemplateMail($order, "order-status-changed"));
+ }
+ });
+ }
/*
|--------------------------------------------------------------------------
| FUNCTIONS
|--------------------------------------------------------------------------
*/
+ public function total()
+ {
+ return decimalFormat($this->products->sum(function ($product) {
+ return $product->pivot->price_with_tax * $product->pivot->quantity;
+ }, 0) + $this->carrier->price);
+ }
/*
|--------------------------------------------------------------------------
| RELATIONS
|--------------------------------------------------------------------------
*/
+ public function user()
+ {
+ return $this->hasOne('App\User', 'id', 'user_id');
+ }
+
+ public function status()
+ {
+ return $this->hasOne('App\Models\OrderStatus', 'id', 'status_id');
+ }
+
+ public function statusHistory()
+ {
+ return $this->hasMany('App\Models\OrderStatusHistory')->orderBy('created_at', 'DESC');
+ }
+
+ public function carrier()
+ {
+ return $this->hasOne('App\Models\Carrier', 'id', 'carrier_id');
+ }
+
+ public function shippingAddress()
+ {
+ return $this->hasOne('App\Models\Address', 'id', 'shipping_address_id');
+ }
+
+ public function billingAddress()
+ {
+ return $this->hasOne('App\Models\Address', 'id', 'billing_address_id');
+ }
+
+ public function billingCompanyInfo()
+ {
+ return $this->hasOne('App\Models\Company', 'id', 'billing_company_id');
+ }
+
+ public function currency()
+ {
+ return $this->hasOne('App\Models\Currency', 'id', 'currency_id');
+ }
+
+ public function products()
+ {
+ return $this->belongsToMany('App\Models\Product')->withPivot(['name', 'sku', 'price', 'price_with_tax', 'quantity']);
+ }
/*
|--------------------------------------------------------------------------
@@ -65,4 +161,8 @@ class Order extends Model
| MUTATORS
|--------------------------------------------------------------------------
*/
+ public function getCreatedAtAttribute($value)
+ {
+ return \Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $value)->format('d-m-Y H:i:s');
+ }
}
diff --git a/app/Models/OrderStatus.php b/app/Models/OrderStatus.php
index ef1e022..2b16ef9 100644
--- a/app/Models/OrderStatus.php
+++ b/app/Models/OrderStatus.php
@@ -15,7 +15,7 @@ class OrderStatus extends Model
|--------------------------------------------------------------------------
*/
- //protected $table = 'order_statuss';
+ protected $table = 'order_statuses';
//protected $primaryKey = 'id';
public $timestamps = false;
// protected $guarded = ['id'];
diff --git a/app/Models/OrderStatusHistory.php b/app/Models/OrderStatusHistory.php
new file mode 100644
index 0000000..f51c52e
--- /dev/null
+++ b/app/Models/OrderStatusHistory.php
@@ -0,0 +1,66 @@
+hasOne('App\Models\OrderStatus', 'id', 'status_id');
+ }
+
+ /*
+ |--------------------------------------------------------------------------
+ | SCOPES
+ |--------------------------------------------------------------------------
+ */
+
+ /*
+ |--------------------------------------------------------------------------
+ | ACCESORS
+ |--------------------------------------------------------------------------
+ */
+
+ /*
+ |--------------------------------------------------------------------------
+ | MUTATORS
+ |--------------------------------------------------------------------------
+ */
+ public function getCreatedAtAttribute($value)
+ {
+ return \Carbon\Carbon::createFromFormat('Y-m-d H:i:s', $value)->format('d-m-Y H:i:s');
+ }
+}
diff --git a/app/Models/Product.php b/app/Models/Product.php
index 9834adf..a604494 100644
--- a/app/Models/Product.php
+++ b/app/Models/Product.php
@@ -100,6 +100,18 @@ public function group()
return $this->belongsTo('App\Models\ProductGroup');
}
+ public function cartRules()
+ {
+ return $this->belongsToMany('App\Models\CartRule');
+ }
+
+ public function specificPrice()
+ {
+ return $this->belongsTo('App\Models\SpecificPrice');
+ }
+
+
+
/*
|--------------------------------------------------------------------------
| SCOPES
@@ -115,6 +127,7 @@ public function scopeActive($query)
return $query->where('active', 1);
}
+
/*
|--------------------------------------------------------------------------
| ACCESORS
diff --git a/app/Models/ProductGroup.php b/app/Models/ProductGroup.php
index fd7ed19..7f1afa0 100644
--- a/app/Models/ProductGroup.php
+++ b/app/Models/ProductGroup.php
@@ -35,6 +35,11 @@ class ProductGroup extends Model
|--------------------------------------------------------------------------
*/
+ public function cartRules()
+ {
+ return $this->belongsToMany('App\Models\CartRule');
+ }
+
/*
|--------------------------------------------------------------------------
| SCOPES
diff --git a/app/Models/SpecificPrice.php b/app/Models/SpecificPrice.php
new file mode 100644
index 0000000..22b88c1
--- /dev/null
+++ b/app/Models/SpecificPrice.php
@@ -0,0 +1,124 @@
+reduction;
+
+ if(isset($reduction)){
+ if($this->discount_type=='Percent') {
+ return $reduction . ' %';
+ }
+ return $reduction;
+ }
+ return '-';
+ }
+
+ public function getOldPrice()
+ {
+ $product = Product::find($this->product_id);
+ if(isset($product)) {
+ return number_format($product->price . $product->currency, 2);
+ }
+ return '-';
+ }
+
+ public function getReducedPrice()
+ {
+ $product = Product::find($this->product_id);
+
+ if(isset($product)) {
+ $oldPrice = $product->price;
+ if($this->discount_type == 'Percent'){
+ return number_format($oldPrice - $this->reduction/100 * $oldPrice, 2);
+ }
+ if($this->discount_type == 'Amount'){
+ return number_format($oldPrice - $this->reduction, 2);
+ }
+ return number_format($product->price, 2);
+ }
+ return '-';
+ }
+
+ public function getProductName()
+ {
+ $product = Product::find($this->product_id);
+ if(isset($product)) {
+ return $product->name;
+ }
+ return "-";
+ }
+
+
+ /*
+ |--------------------------------------------------------------------------
+ | RELATIONS
+ |--------------------------------------------------------------------------
+ */
+
+ public function product(){
+ return $this->hasOne('App\Models\Product');
+ }
+
+ /*
+ |--------------------------------------------------------------------------
+ | SCOPES
+ |--------------------------------------------------------------------------
+ */
+
+ /*
+ |--------------------------------------------------------------------------
+ | ACCESORS
+ |--------------------------------------------------------------------------
+ */
+
+ /*
+ |--------------------------------------------------------------------------
+ | MUTATORS
+ |--------------------------------------------------------------------------
+ */
+}
diff --git a/app/User.php b/app/User.php
index 73e5653..1a136a3 100644
--- a/app/User.php
+++ b/app/User.php
@@ -2,48 +2,128 @@
namespace App;
+use Backpack\CRUD\CrudTrait;
+use Spatie\Permission\Traits\HasRoles;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Backpack\Base\app\Notifications\ResetPasswordNotification as ResetPasswordNotification;
class User extends Authenticatable
{
- use Notifiable;
+ use Notifiable, HasRoles, CrudTrait;
- /**
- * The attributes that are mass assignable.
- *
- * @var array
- */
+ /*
+ |--------------------------------------------------------------------------
+ | GLOBAL VARIABLES
+ |--------------------------------------------------------------------------
+ */
+ protected $table = 'users';
+ // protected $primaryKey = 'id';
+ // public $timestamps = false;
+ // protected $guarded = ['id'];
protected $fillable = [
'name',
'email',
'password',
'salutation',
- 'first_name',
- 'last_name',
'birthday',
'gender',
'active',
];
- /**
- * The attributes that should be hidden for arrays.
- *
- * @var array
- */
protected $hidden = [
- 'password', 'remember_token',
+ 'password',
+ 'remember_token',
+ ];
+
+ public $notificationVars = [
+ 'userSalutation',
+ 'userName',
+ 'userEmail',
+ 'age',
];
- /**
- * Send the password reset notification.
- *
- * @param string $token
- * @return void
- */
+ /*
+ |--------------------------------------------------------------------------
+ | NOTIFICATIONS VARIABLES
+ |--------------------------------------------------------------------------
+ */
+ public function notificationVariables()
+ {
+ return [
+ 'userSalutation' => $this->user->salutation,
+ 'userName' => $this->user->name,
+ 'userEmail' => $this->user->email,
+ 'age' => $this->age(),
+ ];
+ }
+
+
+ /*
+ |--------------------------------------------------------------------------
+ | FUNCTIONS
+ |--------------------------------------------------------------------------
+ */
public function sendPasswordResetNotification($token)
{
$this->notify(new ResetPasswordNotification($token));
}
+
+ public function age()
+ {
+ if ($this->birthday) {
+ return \Carbon\Carbon::createFromFormat('d-m-Y', $this->birthday)->age;
+ }
+ }
+
+ /*
+ |--------------------------------------------------------------------------
+ | RELATIONS
+ |--------------------------------------------------------------------------
+ */
+ public function addresses()
+ {
+ return $this->hasMany('App\Models\Address');
+ }
+
+ public function companies()
+ {
+ return $this->hasMany('App\Models\Company');
+ }
+
+ public function orders()
+ {
+ return $this->hasMany('App\Models\Order');
+ }
+
+ public function cartRules()
+ {
+ return $this->belongsToMany('App\Models\CartRule');
+ }
+
+
+ /*
+ |--------------------------------------------------------------------------
+ | SCOPES
+ |--------------------------------------------------------------------------
+ */
+
+ /*
+ |--------------------------------------------------------------------------
+ | ACCESORS
+ |--------------------------------------------------------------------------
+ */
+
+ /*
+ |--------------------------------------------------------------------------
+ | MUTATORS
+ |--------------------------------------------------------------------------
+ */
+ public function getBirthdayAttribute($value)
+ {
+ if ($value) {
+ return \Carbon\Carbon::createFromFormat('Y-m-d', $value)->format('d-m-Y');
+ }
+ }
+
}
diff --git a/composer.json b/composer.json
index 8c9b835..0e0fcce 100644
--- a/composer.json
+++ b/composer.json
@@ -6,19 +6,21 @@
"type": "project",
"require": {
"php": ">=5.6.4",
- "laravel/framework": "5.4.*",
- "backpack/base": "^0.7.16",
- "backpack/crud": "^3.2",
- "backpack/settings": "^2.0"
+ "laravel/framework": "5.5.*",
+ "backpack/base": "^0.8.0",
+ "backpack/crud": "^3.3.0",
+ "backpack/settings": "^2.0",
+ "backpack/permissionmanager": "^2.1"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
- "phpunit/phpunit": "~5.0",
+ "phpunit/phpunit": "~6.0",
"symfony/css-selector": "3.1.*",
"symfony/dom-crawler": "3.1.*",
"laracasts/generators": "dev-master as 1.1.4",
- "backpack/generators": "^1.1"
+ "backpack/generators": "^1.1",
+ "filp/whoops": "~2.0"
},
"autoload": {
"classmap": [
@@ -50,6 +52,10 @@
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"php artisan optimize"
+ ],
+ "post-autoload-dump": [
+ "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
+ "@php artisan package:discover"
]
},
"config": {
diff --git a/composer.lock b/composer.lock
index f8caed9..4d4bd2c 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,8 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "hash": "66fca0a0cb354eda5e654b4ad2ec91bd",
- "content-hash": "fa8591b5389c9e5d992091ac637518c5",
+ "content-hash": "70ad68115ac7870322a2375d9ab0ae0e",
"packages": [
{
"name": "almasaeed2010/adminlte",
@@ -45,33 +44,33 @@
"theme",
"web"
],
- "time": "2017-01-08 21:03:57"
+ "time": "2017-01-08T21:03:57+00:00"
},
{
"name": "backpack/base",
- "version": "0.7.19",
+ "version": "0.8.7",
"source": {
"type": "git",
"url": "https://github.com/Laravel-Backpack/Base.git",
- "reference": "1e81a3130a927b643bab1e2e0eb8cbeeef603039"
+ "reference": "81931ed91a5d1a155559b9535fe0deea85e9d0cd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Laravel-Backpack/Base/zipball/1e81a3130a927b643bab1e2e0eb8cbeeef603039",
- "reference": "1e81a3130a927b643bab1e2e0eb8cbeeef603039",
+ "url": "https://api.github.com/repos/Laravel-Backpack/Base/zipball/81931ed91a5d1a155559b9535fe0deea85e9d0cd",
+ "reference": "81931ed91a5d1a155559b9535fe0deea85e9d0cd",
"shasum": ""
},
"require": {
"almasaeed2010/adminlte": "2.3.*",
- "illuminate/support": "~5.1",
+ "creativeorange/gravatar": "~1.0",
"jenssegers/date": "^3.2",
- "laravel/framework": "5.3.*|5.4.*",
+ "laravel/framework": "5.5.*",
"prologue/alerts": "^0.4.1"
},
"require-dev": {
"backpack/generators": "^1.1",
"laracasts/generators": "^1.1",
- "phpunit/phpunit": "4.*",
+ "phpunit/phpunit": "~6.0",
"scrutinizer/ocular": "~1.1",
"squizlabs/php_codesniffer": "~2.3"
},
@@ -79,6 +78,11 @@
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
+ },
+ "laravel": {
+ "providers": [
+ "Backpack\\Base\\BaseServiceProvider"
+ ]
}
},
"autoload": {
@@ -88,7 +92,7 @@
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "MIT"
+ "proprietary"
],
"authors": [
{
@@ -104,39 +108,48 @@
"backpack",
"base"
],
- "time": "2017-04-25 13:55:39"
+ "time": "2018-01-17T20:04:51+00:00"
},
{
"name": "backpack/crud",
- "version": "3.2.12",
+ "version": "3.3.6",
"source": {
"type": "git",
"url": "https://github.com/Laravel-Backpack/CRUD.git",
- "reference": "b5e8f929310d86d831b43310ca68eea2e1d254d0"
+ "reference": "9439535025a60fa0b12bd71aa0e913a823853f31"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Laravel-Backpack/CRUD/zipball/b5e8f929310d86d831b43310ca68eea2e1d254d0",
- "reference": "b5e8f929310d86d831b43310ca68eea2e1d254d0",
+ "url": "https://api.github.com/repos/Laravel-Backpack/CRUD/zipball/9439535025a60fa0b12bd71aa0e913a823853f31",
+ "reference": "9439535025a60fa0b12bd71aa0e913a823853f31",
"shasum": ""
},
"require": {
- "backpack/base": "^0.7.15",
+ "backpack/base": "^0.8.0",
"barryvdh/laravel-elfinder": "^0.3.10",
"doctrine/dbal": "^2.5",
"intervention/image": "^2.3",
"laravelcollective/html": "~5.0",
- "livecontrol/eloquent-datatable": "^0.1.5",
"venturecraft/revisionable": "1.*"
},
"require-dev": {
- "phpunit/phpunit": "4.*",
+ "orchestra/database": "~3.4",
+ "orchestra/testbench": "~3.0",
+ "phpunit/phpunit": "~6.0",
"scrutinizer/ocular": "~1.1"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
+ },
+ "laravel": {
+ "providers": [
+ "Backpack\\CRUD\\CrudServiceProvider"
+ ],
+ "aliases": {
+ "CRUD": "Backpack\\CRUD\\CrudServiceProvider"
+ }
}
},
"autoload": {
@@ -150,7 +163,7 @@
],
"authors": [
{
- "name": "Cristian tabacitu",
+ "name": "Cristian Tabacitu",
"email": "hello@tabacitu.ro",
"homepage": "http://www.tabacitu.ro",
"role": "Chief Architect & Lead Developer"
@@ -160,32 +173,109 @@
"homepage": "https://github.com/laravel-backpack/CRUD",
"keywords": [
"Admin Interface",
+ "Content management system",
"admin panel",
"cms",
+ "content management framework",
"create",
"crud",
"delete",
"read",
"update"
],
- "time": "2017-05-31 05:40:02"
+ "time": "2018-01-16T12:19:49+00:00"
+ },
+ {
+ "name": "backpack/permissionmanager",
+ "version": "2.1.24",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Laravel-Backpack/PermissionManager.git",
+ "reference": "d82f33a6d56b6562a44cf199c78afbacd8093829"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Laravel-Backpack/PermissionManager/zipball/d82f33a6d56b6562a44cf199c78afbacd8093829",
+ "reference": "d82f33a6d56b6562a44cf199c78afbacd8093829",
+ "shasum": ""
+ },
+ "require": {
+ "backpack/crud": "^3.3.0",
+ "spatie/laravel-permission": "^1.4"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "4.*",
+ "scrutinizer/ocular": "~1.1"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ },
+ "laravel": {
+ "providers": [
+ "Backpack\\PermissionManager\\PermissionManagerServiceProvider"
+ ]
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Backpack\\PermissionManager\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "proprietary"
+ ],
+ "authors": [
+ {
+ "name": "Marius Constantin",
+ "email": "marius@updivision.com",
+ "homepage": "http://www.updivision.com",
+ "role": "Lead Developer"
+ },
+ {
+ "name": "Cristian Tabacitu",
+ "email": "hello@tabacitu.ro",
+ "homepage": "http://www.tabacitu.ro",
+ "role": "Chief Architect"
+ }
+ ],
+ "description": "Users and permissions management interface for Laravel 5 using Backpack CRUD.",
+ "homepage": "https://github.com/laravel-backpack/permissionmanager",
+ "keywords": [
+ "backpack",
+ "backpack permission",
+ "backpack roles",
+ "backpack user management",
+ "dick",
+ "dick permission",
+ "laravel backpack",
+ "manage permission",
+ "manage roles",
+ "manage users",
+ "tabacitu",
+ "updivision",
+ "users roles admin"
+ ],
+ "time": "2017-12-13T05:34:02+00:00"
},
{
"name": "backpack/settings",
- "version": "2.0.16",
+ "version": "2.0.27",
"source": {
"type": "git",
"url": "https://github.com/Laravel-Backpack/Settings.git",
- "reference": "7ed5b32a29b1d3b95fb9e5a7b0627ff088bd7776"
+ "reference": "b51d4a92305f03fba6d4221767b9c5b1cbeb2e66"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Laravel-Backpack/Settings/zipball/7ed5b32a29b1d3b95fb9e5a7b0627ff088bd7776",
- "reference": "7ed5b32a29b1d3b95fb9e5a7b0627ff088bd7776",
+ "url": "https://api.github.com/repos/Laravel-Backpack/Settings/zipball/b51d4a92305f03fba6d4221767b9c5b1cbeb2e66",
+ "reference": "b51d4a92305f03fba6d4221767b9c5b1cbeb2e66",
"shasum": ""
},
"require": {
- "backpack/crud": "3.2.*"
+ "backpack/crud": "^3.2"
},
"require-dev": {
"phpunit/phpunit": "4.*",
@@ -195,6 +285,11 @@
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
+ },
+ "laravel": {
+ "providers": [
+ "Backpack\\Settings\\SettingsServiceProvider"
+ ]
}
},
"autoload": {
@@ -204,11 +299,11 @@
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "MIT"
+ "proprietary"
],
"authors": [
{
- "name": "Cristian tabacitu",
+ "name": "Cristian Tabacitu",
"email": "hello@tabacitu.ro",
"homepage": "http://www.tabacitu.ro",
"role": "Chief Architect & Lead Developer"
@@ -227,20 +322,20 @@
"tabacitu",
"updivision"
],
- "time": "2017-04-21 16:25:43"
+ "time": "2017-12-14T23:20:32+00:00"
},
{
"name": "barryvdh/elfinder-flysystem-driver",
- "version": "v0.2.0",
+ "version": "v0.2.1",
"source": {
"type": "git",
"url": "https://github.com/barryvdh/elfinder-flysystem-driver.git",
- "reference": "61d70d94786e12eecdfb97de289ffa5c33c521e5"
+ "reference": "1f323056495fdce019b6ef1621be697f2945c609"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/barryvdh/elfinder-flysystem-driver/zipball/61d70d94786e12eecdfb97de289ffa5c33c521e5",
- "reference": "61d70d94786e12eecdfb97de289ffa5c33c521e5",
+ "url": "https://api.github.com/repos/barryvdh/elfinder-flysystem-driver/zipball/1f323056495fdce019b6ef1621be697f2945c609",
+ "reference": "1f323056495fdce019b6ef1621be697f2945c609",
"shasum": ""
},
"require": {
@@ -283,25 +378,25 @@
"elfinder",
"filesystem"
],
- "time": "2016-04-05 14:47:48"
+ "time": "2017-07-08T17:59:38+00:00"
},
{
"name": "barryvdh/laravel-elfinder",
- "version": "v0.3.10",
+ "version": "v0.3.11",
"source": {
"type": "git",
"url": "https://github.com/barryvdh/laravel-elfinder.git",
- "reference": "797c16d1ca7a5f9040cfb59346fdfc2a8e65415f"
+ "reference": "e39c7831b68c8d2e4d84f2c43026e091f115e7ae"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/barryvdh/laravel-elfinder/zipball/797c16d1ca7a5f9040cfb59346fdfc2a8e65415f",
- "reference": "797c16d1ca7a5f9040cfb59346fdfc2a8e65415f",
+ "url": "https://api.github.com/repos/barryvdh/laravel-elfinder/zipball/e39c7831b68c8d2e4d84f2c43026e091f115e7ae",
+ "reference": "e39c7831b68c8d2e4d84f2c43026e091f115e7ae",
"shasum": ""
},
"require": {
"barryvdh/elfinder-flysystem-driver": "^0.1.4|^0.2",
- "illuminate/support": "5.0.x|5.1.x|5.2.x|5.3.x|5.4.x",
+ "illuminate/support": "5.0.x|5.1.x|5.2.x|5.3.x|5.4.x|5.5.x",
"league/flysystem": "^1.0",
"league/flysystem-cached-adapter": "^1.0",
"php": ">=5.4.0",
@@ -335,7 +430,51 @@
"laravel",
"tinymce"
],
- "time": "2017-01-27 08:46:01"
+ "time": "2017-08-28T11:46:35+00:00"
+ },
+ {
+ "name": "creativeorange/gravatar",
+ "version": "1.0.10",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/creativeorange/gravatar.git",
+ "reference": "a0e84f0c8e8922ad151168d6ebd8db6a1b2d8cd2"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/creativeorange/gravatar/zipball/a0e84f0c8e8922ad151168d6ebd8db6a1b2d8cd2",
+ "reference": "a0e84f0c8e8922ad151168d6ebd8db6a1b2d8cd2",
+ "shasum": ""
+ },
+ "require": {
+ "illuminate/support": "5.*",
+ "php": ">=5.4.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Creativeorange\\Gravatar\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Jaco Tijssen",
+ "email": "jaco@creativeorange.nl",
+ "homepage": "https://www.creativeorange.nl",
+ "role": "Developer"
+ }
+ ],
+ "description": "A Laravel 5.0, 5.1, 5.2 and 5.3 gravatar package for retrieving gravatar image URLs or checking the existance of an image.",
+ "keywords": [
+ "avatar",
+ "gravatar",
+ "laravel"
+ ],
+ "time": "2017-02-15T22:07:40+00:00"
},
{
"name": "doctrine/annotations",
@@ -403,20 +542,20 @@
"docblock",
"parser"
],
- "time": "2017-02-24 16:22:25"
+ "time": "2017-02-24T16:22:25+00:00"
},
{
"name": "doctrine/cache",
- "version": "v1.6.1",
+ "version": "v1.6.2",
"source": {
"type": "git",
"url": "https://github.com/doctrine/cache.git",
- "reference": "b6f544a20f4807e81f7044d31e679ccbb1866dc3"
+ "reference": "eb152c5100571c7a45470ff2a35095ab3f3b900b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/cache/zipball/b6f544a20f4807e81f7044d31e679ccbb1866dc3",
- "reference": "b6f544a20f4807e81f7044d31e679ccbb1866dc3",
+ "url": "https://api.github.com/repos/doctrine/cache/zipball/eb152c5100571c7a45470ff2a35095ab3f3b900b",
+ "reference": "eb152c5100571c7a45470ff2a35095ab3f3b900b",
"shasum": ""
},
"require": {
@@ -473,7 +612,7 @@
"cache",
"caching"
],
- "time": "2016-10-29 11:16:17"
+ "time": "2017-07-22T12:49:21+00:00"
},
{
"name": "doctrine/collections",
@@ -540,20 +679,20 @@
"collections",
"iterator"
],
- "time": "2017-01-03 10:49:41"
+ "time": "2017-01-03T10:49:41+00:00"
},
{
"name": "doctrine/common",
- "version": "v2.7.2",
+ "version": "v2.7.3",
"source": {
"type": "git",
"url": "https://github.com/doctrine/common.git",
- "reference": "930297026c8009a567ac051fd545bf6124150347"
+ "reference": "4acb8f89626baafede6ee5475bc5844096eba8a9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/common/zipball/930297026c8009a567ac051fd545bf6124150347",
- "reference": "930297026c8009a567ac051fd545bf6124150347",
+ "url": "https://api.github.com/repos/doctrine/common/zipball/4acb8f89626baafede6ee5475bc5844096eba8a9",
+ "reference": "4acb8f89626baafede6ee5475bc5844096eba8a9",
"shasum": ""
},
"require": {
@@ -613,20 +752,20 @@
"persistence",
"spl"
],
- "time": "2017-01-13 14:02:13"
+ "time": "2017-07-22T08:35:12+00:00"
},
{
"name": "doctrine/dbal",
- "version": "v2.5.12",
+ "version": "v2.5.13",
"source": {
"type": "git",
"url": "https://github.com/doctrine/dbal.git",
- "reference": "7b9e911f9d8b30d43b96853dab26898c710d8f44"
+ "reference": "729340d8d1eec8f01bff708e12e449a3415af873"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/dbal/zipball/7b9e911f9d8b30d43b96853dab26898c710d8f44",
- "reference": "7b9e911f9d8b30d43b96853dab26898c710d8f44",
+ "url": "https://api.github.com/repos/doctrine/dbal/zipball/729340d8d1eec8f01bff708e12e449a3415af873",
+ "reference": "729340d8d1eec8f01bff708e12e449a3415af873",
"shasum": ""
},
"require": {
@@ -684,37 +823,37 @@
"persistence",
"queryobject"
],
- "time": "2017-02-08 12:53:47"
+ "time": "2017-07-22T20:44:48+00:00"
},
{
"name": "doctrine/inflector",
- "version": "v1.1.0",
+ "version": "v1.2.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/inflector.git",
- "reference": "90b2128806bfde671b6952ab8bea493942c1fdae"
+ "reference": "e11d84c6e018beedd929cff5220969a3c6d1d462"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/inflector/zipball/90b2128806bfde671b6952ab8bea493942c1fdae",
- "reference": "90b2128806bfde671b6952ab8bea493942c1fdae",
+ "url": "https://api.github.com/repos/doctrine/inflector/zipball/e11d84c6e018beedd929cff5220969a3c6d1d462",
+ "reference": "e11d84c6e018beedd929cff5220969a3c6d1d462",
"shasum": ""
},
"require": {
- "php": ">=5.3.2"
+ "php": "^7.0"
},
"require-dev": {
- "phpunit/phpunit": "4.*"
+ "phpunit/phpunit": "^6.2"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.1.x-dev"
+ "dev-master": "1.2.x-dev"
}
},
"autoload": {
- "psr-0": {
- "Doctrine\\Common\\Inflector\\": "lib/"
+ "psr-4": {
+ "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -751,7 +890,7 @@
"singularize",
"string"
],
- "time": "2015-11-06 14:35:42"
+ "time": "2017-07-22T12:18:28+00:00"
},
{
"name": "doctrine/lexer",
@@ -805,25 +944,85 @@
"lexer",
"parser"
],
- "time": "2014-09-09 13:34:57"
+ "time": "2014-09-09T13:34:57+00:00"
+ },
+ {
+ "name": "egulias/email-validator",
+ "version": "2.1.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/egulias/EmailValidator.git",
+ "reference": "1bec00a10039b823cc94eef4eddd47dcd3b2ca04"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/1bec00a10039b823cc94eef4eddd47dcd3b2ca04",
+ "reference": "1bec00a10039b823cc94eef4eddd47dcd3b2ca04",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/lexer": "^1.0.1",
+ "php": ">= 5.5"
+ },
+ "require-dev": {
+ "dominicsayers/isemail": "dev-master",
+ "phpunit/phpunit": "^4.8.35",
+ "satooshi/php-coveralls": "^1.0.1"
+ },
+ "suggest": {
+ "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Egulias\\EmailValidator\\": "EmailValidator"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Eduardo Gulias Davis"
+ }
+ ],
+ "description": "A library for validating emails against several RFCs",
+ "homepage": "https://github.com/egulias/EmailValidator",
+ "keywords": [
+ "email",
+ "emailvalidation",
+ "emailvalidator",
+ "validation",
+ "validator"
+ ],
+ "time": "2017-11-15T23:40:40+00:00"
},
{
"name": "erusev/parsedown",
- "version": "1.6.2",
+ "version": "1.6.4",
"source": {
"type": "git",
"url": "https://github.com/erusev/parsedown.git",
- "reference": "1bf24f7334fe16c88bf9d467863309ceaf285b01"
+ "reference": "fbe3fe878f4fe69048bb8a52783a09802004f548"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/erusev/parsedown/zipball/1bf24f7334fe16c88bf9d467863309ceaf285b01",
- "reference": "1bf24f7334fe16c88bf9d467863309ceaf285b01",
+ "url": "https://api.github.com/repos/erusev/parsedown/zipball/fbe3fe878f4fe69048bb8a52783a09802004f548",
+ "reference": "fbe3fe878f4fe69048bb8a52783a09802004f548",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
+ "require-dev": {
+ "phpunit/phpunit": "^4.8.35"
+ },
"type": "library",
"autoload": {
"psr-0": {
@@ -847,7 +1046,7 @@
"markdown",
"parser"
],
- "time": "2017-03-29 16:04:15"
+ "time": "2017-11-14T20:44:03+00:00"
},
{
"name": "guzzlehttp/psr7",
@@ -912,20 +1111,20 @@
"uri",
"url"
],
- "time": "2017-03-20 17:10:46"
+ "time": "2017-03-20T17:10:46+00:00"
},
{
"name": "intervention/image",
- "version": "2.3.13",
+ "version": "2.4.1",
"source": {
"type": "git",
"url": "https://github.com/Intervention/image.git",
- "reference": "15a517f052ee15d373ffa145c9642d5fec7ddf5c"
+ "reference": "3603dbcc9a17d307533473246a6c58c31cf17919"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Intervention/image/zipball/15a517f052ee15d373ffa145c9642d5fec7ddf5c",
- "reference": "15a517f052ee15d373ffa145c9642d5fec7ddf5c",
+ "url": "https://api.github.com/repos/Intervention/image/zipball/3603dbcc9a17d307533473246a6c58c31cf17919",
+ "reference": "3603dbcc9a17d307533473246a6c58c31cf17919",
"shasum": ""
},
"require": {
@@ -935,7 +1134,7 @@
},
"require-dev": {
"mockery/mockery": "~0.9.2",
- "phpunit/phpunit": "3.*"
+ "phpunit/phpunit": "^4.8 || ^5.7"
},
"suggest": {
"ext-gd": "to use GD library based image processing.",
@@ -946,6 +1145,14 @@
"extra": {
"branch-alias": {
"dev-master": "2.3-dev"
+ },
+ "laravel": {
+ "providers": [
+ "Intervention\\Image\\ImageServiceProvider"
+ ],
+ "aliases": {
+ "Image": "Intervention\\Image\\Facades\\Image"
+ }
}
},
"autoload": {
@@ -960,8 +1167,8 @@
"authors": [
{
"name": "Oliver Vogel",
- "email": "oliver@olivervogel.net",
- "homepage": "http://olivervogel.net/"
+ "email": "oliver@olivervogel.com",
+ "homepage": "http://olivervogel.com/"
}
],
"description": "Image handling and manipulation library with support for Laravel integration",
@@ -974,20 +1181,20 @@
"thumbnail",
"watermark"
],
- "time": "2017-04-23 18:45:36"
+ "time": "2017-09-21T16:29:17+00:00"
},
{
"name": "jenssegers/date",
- "version": "v3.2.11",
+ "version": "v3.2.12",
"source": {
"type": "git",
"url": "https://github.com/jenssegers/date.git",
- "reference": "68262b137a4811cc351b3c26308e252505606b8f"
+ "reference": "1db4d580d1d45085a48fd4a332697619b9a3851c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/jenssegers/date/zipball/68262b137a4811cc351b3c26308e252505606b8f",
- "reference": "68262b137a4811cc351b3c26308e252505606b8f",
+ "url": "https://api.github.com/repos/jenssegers/date/zipball/1db4d580d1d45085a48fd4a332697619b9a3851c",
+ "reference": "1db4d580d1d45085a48fd4a332697619b9a3851c",
"shasum": ""
},
"require": {
@@ -1003,6 +1210,14 @@
"extra": {
"branch-alias": {
"dev-master": "3.1-dev"
+ },
+ "laravel": {
+ "providers": [
+ "Jenssegers\\Date\\DateServiceProvider"
+ ],
+ "aliases": {
+ "Date": "Jenssegers\\Date\\Date"
+ }
}
},
"autoload": {
@@ -1031,43 +1246,44 @@
"time",
"translation"
],
- "time": "2017-06-06 11:42:35"
+ "time": "2017-06-30T11:51:03+00:00"
},
{
"name": "laravel/framework",
- "version": "v5.4.25",
+ "version": "v5.5.32",
"source": {
"type": "git",
"url": "https://github.com/laravel/framework.git",
- "reference": "6bcc9b1f542b3deed16d51f6aa1fe318ab407c2a"
+ "reference": "254e4c3e133f5bc8d6068cdf28ea062abc10adf2"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laravel/framework/zipball/6bcc9b1f542b3deed16d51f6aa1fe318ab407c2a",
- "reference": "6bcc9b1f542b3deed16d51f6aa1fe318ab407c2a",
+ "url": "https://api.github.com/repos/laravel/framework/zipball/254e4c3e133f5bc8d6068cdf28ea062abc10adf2",
+ "reference": "254e4c3e133f5bc8d6068cdf28ea062abc10adf2",
"shasum": ""
},
"require": {
- "doctrine/inflector": "~1.0",
+ "doctrine/inflector": "~1.1",
"erusev/parsedown": "~1.6",
"ext-mbstring": "*",
"ext-openssl": "*",
"league/flysystem": "~1.0",
- "monolog/monolog": "~1.11",
+ "monolog/monolog": "~1.12",
"mtdowling/cron-expression": "~1.0",
"nesbot/carbon": "~1.20",
- "paragonie/random_compat": "~1.4|~2.0",
- "php": ">=5.6.4",
+ "php": ">=7.0",
+ "psr/container": "~1.0",
+ "psr/simple-cache": "^1.0",
"ramsey/uuid": "~3.0",
- "swiftmailer/swiftmailer": "~5.4",
- "symfony/console": "~3.2",
- "symfony/debug": "~3.2",
- "symfony/finder": "~3.2",
- "symfony/http-foundation": "~3.2",
- "symfony/http-kernel": "~3.2",
- "symfony/process": "~3.2",
- "symfony/routing": "~3.2",
- "symfony/var-dumper": "~3.2",
+ "swiftmailer/swiftmailer": "~6.0",
+ "symfony/console": "~3.3",
+ "symfony/debug": "~3.3",
+ "symfony/finder": "~3.3",
+ "symfony/http-foundation": "~3.3",
+ "symfony/http-kernel": "~3.3",
+ "symfony/process": "~3.3",
+ "symfony/routing": "~3.3",
+ "symfony/var-dumper": "~3.3",
"tijsverkoyen/css-to-inline-styles": "~2.2",
"vlucas/phpdotenv": "~2.2"
},
@@ -1084,7 +1300,6 @@
"illuminate/database": "self.version",
"illuminate/encryption": "self.version",
"illuminate/events": "self.version",
- "illuminate/exception": "self.version",
"illuminate/filesystem": "self.version",
"illuminate/hashing": "self.version",
"illuminate/http": "self.version",
@@ -1106,33 +1321,38 @@
"require-dev": {
"aws/aws-sdk-php": "~3.0",
"doctrine/dbal": "~2.5",
- "mockery/mockery": "~0.9.4",
+ "filp/whoops": "^2.1.4",
+ "mockery/mockery": "~1.0",
+ "orchestra/testbench-core": "3.5.*",
"pda/pheanstalk": "~3.0",
- "phpunit/phpunit": "~5.7",
- "predis/predis": "~1.0",
- "symfony/css-selector": "~3.2",
- "symfony/dom-crawler": "~3.2"
+ "phpunit/phpunit": "~6.0",
+ "predis/predis": "^1.1.1",
+ "symfony/css-selector": "~3.3",
+ "symfony/dom-crawler": "~3.3"
},
"suggest": {
"aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (~3.0).",
"doctrine/dbal": "Required to rename columns and drop SQLite columns (~2.5).",
+ "ext-pcntl": "Required to use all features of the queue worker.",
+ "ext-posix": "Required to use all features of the queue worker.",
"fzaninotto/faker": "Required to use the eloquent factory builder (~1.4).",
"guzzlehttp/guzzle": "Required to use the Mailgun and Mandrill mail drivers and the ping methods on schedules (~6.0).",
"laravel/tinker": "Required to use the tinker console command (~1.0).",
"league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (~1.0).",
+ "league/flysystem-cached-adapter": "Required to use Flysystem caching (~1.0).",
"league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0).",
"nexmo/client": "Required to use the Nexmo transport (~1.0).",
"pda/pheanstalk": "Required to use the beanstalk queue driver (~3.0).",
"predis/predis": "Required to use the redis cache and queue drivers (~1.0).",
- "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (~2.0).",
- "symfony/css-selector": "Required to use some of the crawler integration testing tools (~3.2).",
- "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (~3.2).",
- "symfony/psr-http-message-bridge": "Required to psr7 bridging features (0.2.*)."
+ "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (~3.0).",
+ "symfony/css-selector": "Required to use some of the crawler integration testing tools (~3.3).",
+ "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (~3.3).",
+ "symfony/psr-http-message-bridge": "Required to psr7 bridging features (~1.0)."
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.4-dev"
+ "dev-master": "5.5-dev"
}
},
"autoload": {
@@ -1160,36 +1380,47 @@
"framework",
"laravel"
],
- "time": "2017-06-07 13:35:12"
+ "time": "2018-01-18T13:27:23+00:00"
},
{
"name": "laravelcollective/html",
- "version": "v5.4.8",
+ "version": "v5.5.1",
"source": {
"type": "git",
"url": "https://github.com/LaravelCollective/html.git",
- "reference": "9b8f51e7a2368911c896f5d42757886bae0717b5"
+ "reference": "2f6dc39ab3655724a615fe8a652d8b7f04fc9ac6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/LaravelCollective/html/zipball/9b8f51e7a2368911c896f5d42757886bae0717b5",
- "reference": "9b8f51e7a2368911c896f5d42757886bae0717b5",
+ "url": "https://api.github.com/repos/LaravelCollective/html/zipball/2f6dc39ab3655724a615fe8a652d8b7f04fc9ac6",
+ "reference": "2f6dc39ab3655724a615fe8a652d8b7f04fc9ac6",
"shasum": ""
},
"require": {
- "illuminate/http": "5.4.*",
- "illuminate/routing": "5.4.*",
- "illuminate/session": "5.4.*",
- "illuminate/support": "5.4.*",
- "illuminate/view": "5.4.*",
- "php": ">=5.6.4"
+ "illuminate/http": "5.5.*",
+ "illuminate/routing": "5.5.*",
+ "illuminate/session": "5.5.*",
+ "illuminate/support": "5.5.*",
+ "illuminate/view": "5.5.*",
+ "php": ">=7.0.0"
},
"require-dev": {
- "illuminate/database": "5.4.*",
+ "illuminate/database": "5.5.*",
"mockery/mockery": "~0.9.4",
"phpunit/phpunit": "~5.4"
},
"type": "library",
+ "extra": {
+ "laravel": {
+ "providers": [
+ "Collective\\Html\\HtmlServiceProvider"
+ ],
+ "aliases": {
+ "Form": "Collective\\Html\\FormFacade",
+ "Html": "Collective\\Html\\HtmlFacade"
+ }
+ }
+ },
"autoload": {
"psr-4": {
"Collective\\Html\\": "src/"
@@ -1214,20 +1445,20 @@
],
"description": "HTML and Form Builders for the Laravel Framework",
"homepage": "http://laravelcollective.com",
- "time": "2017-05-22 06:35:07"
+ "time": "2017-08-31T14:46:03+00:00"
},
{
"name": "league/flysystem",
- "version": "1.0.40",
+ "version": "1.0.41",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/flysystem.git",
- "reference": "3828f0b24e2c1918bb362d57a53205d6dc8fde61"
+ "reference": "f400aa98912c561ba625ea4065031b7a41e5a155"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/3828f0b24e2c1918bb362d57a53205d6dc8fde61",
- "reference": "3828f0b24e2c1918bb362d57a53205d6dc8fde61",
+ "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/f400aa98912c561ba625ea4065031b7a41e5a155",
+ "reference": "f400aa98912c561ba625ea4065031b7a41e5a155",
"shasum": ""
},
"require": {
@@ -1248,13 +1479,13 @@
"league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3",
"league/flysystem-azure": "Allows you to use Windows Azure Blob storage",
"league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching",
- "league/flysystem-copy": "Allows you to use Copy.com storage",
"league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem",
"league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files",
"league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib",
"league/flysystem-webdav": "Allows you to use WebDAV storage",
"league/flysystem-ziparchive": "Allows you to use ZipArchive adapter",
- "spatie/flysystem-dropbox": "Allows you to use Dropbox storage"
+ "spatie/flysystem-dropbox": "Allows you to use Dropbox storage",
+ "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications"
},
"type": "library",
"extra": {
@@ -1297,7 +1528,7 @@
"sftp",
"storage"
],
- "time": "2017-04-28 10:15:08"
+ "time": "2017-08-06T17:41:04+00:00"
},
{
"name": "league/flysystem-cached-adapter",
@@ -1345,65 +1576,20 @@
}
],
"description": "An adapter decorator to enable meta-data caching.",
- "time": "2017-03-20 09:59:34"
- },
- {
- "name": "livecontrol/eloquent-datatable",
- "version": "0.1.5",
- "source": {
- "type": "git",
- "url": "https://github.com/LiveControl/EloquentDataTable.git",
- "reference": "49488446f3116ebf725447bb805bb76c28109d1b"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/LiveControl/EloquentDataTable/zipball/49488446f3116ebf725447bb805bb76c28109d1b",
- "reference": "49488446f3116ebf725447bb805bb76c28109d1b",
- "shasum": ""
- },
- "require": {
- "illuminate/database": "5.*",
- "php": ">=5.4.0"
- },
- "require-dev": {
- "phpspec/phpspec": "~2.1"
- },
- "type": "library",
- "autoload": {
- "psr-0": {
- "LiveControl\\EloquentDataTable": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Jeffrey de Vreede",
- "email": "jeffrey@devreede.eu"
- }
- ],
- "description": "Eloquent DataTable plugin for server side ajax call handling.",
- "keywords": [
- "datatable",
- "eloquent",
- "laravel"
- ],
- "time": "2015-09-15 11:39:39"
+ "time": "2017-03-20T09:59:34+00:00"
},
{
"name": "monolog/monolog",
- "version": "1.22.1",
+ "version": "1.23.0",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
- "reference": "1e044bc4b34e91743943479f1be7a1d5eb93add0"
+ "reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Seldaek/monolog/zipball/1e044bc4b34e91743943479f1be7a1d5eb93add0",
- "reference": "1e044bc4b34e91743943479f1be7a1d5eb93add0",
+ "url": "https://api.github.com/repos/Seldaek/monolog/zipball/fd8c787753b3a2ad11bc60c063cff1358a32a3b4",
+ "reference": "fd8c787753b3a2ad11bc60c063cff1358a32a3b4",
"shasum": ""
},
"require": {
@@ -1424,7 +1610,7 @@
"phpunit/phpunit-mock-objects": "2.3.0",
"ruflin/elastica": ">=0.90 <3.0",
"sentry/sentry": "^0.13",
- "swiftmailer/swiftmailer": "~5.3"
+ "swiftmailer/swiftmailer": "^5.3|^6.0"
},
"suggest": {
"aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
@@ -1468,11 +1654,11 @@
"logging",
"psr-3"
],
- "time": "2017-03-13 07:08:03"
+ "time": "2017-06-19T01:22:40+00:00"
},
{
"name": "mtdowling/cron-expression",
- "version": "v1.2.0",
+ "version": "v1.2.1",
"source": {
"type": "git",
"url": "https://github.com/mtdowling/cron-expression.git",
@@ -1512,7 +1698,7 @@
"cron",
"schedule"
],
- "time": "2017-01-23 04:29:33"
+ "time": "2017-01-23T04:29:33+00:00"
},
{
"name": "nesbot/carbon",
@@ -1565,20 +1751,20 @@
"datetime",
"time"
],
- "time": "2017-01-16 07:55:07"
+ "time": "2017-01-16T07:55:07+00:00"
},
{
"name": "paragonie/random_compat",
- "version": "v2.0.10",
+ "version": "v2.0.11",
"source": {
"type": "git",
"url": "https://github.com/paragonie/random_compat.git",
- "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d"
+ "reference": "5da4d3c796c275c55f057af5a643ae297d96b4d8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/paragonie/random_compat/zipball/634bae8e911eefa89c1abfbf1b66da679ac8f54d",
- "reference": "634bae8e911eefa89c1abfbf1b66da679ac8f54d",
+ "url": "https://api.github.com/repos/paragonie/random_compat/zipball/5da4d3c796c275c55f057af5a643ae297d96b4d8",
+ "reference": "5da4d3c796c275c55f057af5a643ae297d96b4d8",
"shasum": ""
},
"require": {
@@ -1613,7 +1799,7 @@
"pseudorandom",
"random"
],
- "time": "2017-03-13 16:27:32"
+ "time": "2017-09-27T21:40:39+00:00"
},
{
"name": "prologue/alerts",
@@ -1663,7 +1849,7 @@
"laravel",
"messages"
],
- "time": "2017-01-24 13:22:25"
+ "time": "2017-01-24T13:22:25+00:00"
},
{
"name": "psr/cache",
@@ -1709,7 +1895,56 @@
"psr",
"psr-6"
],
- "time": "2016-08-06 20:24:11"
+ "time": "2016-08-06T20:24:11+00:00"
+ },
+ {
+ "name": "psr/container",
+ "version": "1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/container.git",
+ "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
+ "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\Container\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Common Container Interface (PHP FIG PSR-11)",
+ "homepage": "https://github.com/php-fig/container",
+ "keywords": [
+ "PSR-11",
+ "container",
+ "container-interface",
+ "container-interop",
+ "psr"
+ ],
+ "time": "2017-02-14T16:28:37+00:00"
},
{
"name": "psr/http-message",
@@ -1759,7 +1994,7 @@
"request",
"response"
],
- "time": "2016-08-06 14:39:51"
+ "time": "2016-08-06T14:39:51+00:00"
},
{
"name": "psr/log",
@@ -1806,20 +2041,68 @@
"psr",
"psr-3"
],
- "time": "2016-10-10 12:19:37"
+ "time": "2016-10-10T12:19:37+00:00"
+ },
+ {
+ "name": "psr/simple-cache",
+ "version": "1.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/simple-cache.git",
+ "reference": "753fa598e8f3b9966c886fe13f370baa45ef0e24"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/753fa598e8f3b9966c886fe13f370baa45ef0e24",
+ "reference": "753fa598e8f3b9966c886fe13f370baa45ef0e24",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Psr\\SimpleCache\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "http://www.php-fig.org/"
+ }
+ ],
+ "description": "Common interfaces for simple caching",
+ "keywords": [
+ "cache",
+ "caching",
+ "psr",
+ "psr-16",
+ "simple-cache"
+ ],
+ "time": "2017-01-02T13:31:39+00:00"
},
{
"name": "ramsey/uuid",
- "version": "3.6.1",
+ "version": "3.7.3",
"source": {
"type": "git",
"url": "https://github.com/ramsey/uuid.git",
- "reference": "4ae32dd9ab8860a4bbd750ad269cba7f06f7934e"
+ "reference": "44abcdad877d9a46685a3a4d221e3b2c4b87cb76"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/ramsey/uuid/zipball/4ae32dd9ab8860a4bbd750ad269cba7f06f7934e",
- "reference": "4ae32dd9ab8860a4bbd750ad269cba7f06f7934e",
+ "url": "https://api.github.com/repos/ramsey/uuid/zipball/44abcdad877d9a46685a3a4d221e3b2c4b87cb76",
+ "reference": "44abcdad877d9a46685a3a4d221e3b2c4b87cb76",
"shasum": ""
},
"require": {
@@ -1830,17 +2113,15 @@
"rhumsaa/uuid": "self.version"
},
"require-dev": {
- "apigen/apigen": "^4.1",
- "codeception/aspect-mock": "^1.0 | ^2.0",
+ "codeception/aspect-mock": "^1.0 | ~2.0.0",
"doctrine/annotations": "~1.2.0",
"goaop/framework": "1.0.0-alpha.2 | ^1.0 | ^2.1",
"ircmaxell/random-lib": "^1.1",
"jakub-onderka/php-parallel-lint": "^0.9.0",
- "mockery/mockery": "^0.9.4",
+ "mockery/mockery": "^0.9.9",
"moontoast/math": "^1.1",
"php-mock/php-mock-phpunit": "^0.3|^1.1",
- "phpunit/phpunit": "^4.7|>=5.0 <5.4",
- "satooshi/php-coveralls": "^0.6.1",
+ "phpunit/phpunit": "^4.7|^5.0",
"squizlabs/php_codesniffer": "^2.3"
},
"suggest": {
@@ -1888,20 +2169,80 @@
"identifier",
"uuid"
],
- "time": "2017-03-26 20:37:53"
+ "time": "2018-01-20T00:28:24+00:00"
+ },
+ {
+ "name": "spatie/laravel-permission",
+ "version": "1.15.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/spatie/laravel-permission.git",
+ "reference": "4e733d026d95fded179b919c652186b9b529f2f0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/spatie/laravel-permission/zipball/4e733d026d95fded179b919c652186b9b529f2f0",
+ "reference": "4e733d026d95fded179b919c652186b9b529f2f0",
+ "shasum": ""
+ },
+ "require": {
+ "illuminate/contracts": "~5.1.0|~5.2.0|~5.3.0|~5.4.0|~5.5.0",
+ "laravel/framework": "~5.1.11|~5.2.0|~5.3.0|~5.4.0|~5.5.0",
+ "php": ">=5.6.0"
+ },
+ "require-dev": {
+ "monolog/monolog": "^1.22",
+ "orchestra/testbench": "~3.3.0|~3.4.0|~3.5.0",
+ "phpunit/phpunit": "^5.7.8|~6.0"
+ },
+ "type": "library",
+ "extra": {
+ "laravel": {
+ "providers": [
+ "Spatie\\Permission\\PermissionServiceProvider"
+ ]
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Spatie\\Permission\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Freek Van der Herten",
+ "email": "freek@spatie.be",
+ "homepage": "https://spatie.be",
+ "role": "Developer"
+ }
+ ],
+ "description": "Permission handling for Laravel 5.1 and up",
+ "homepage": "https://github.com/spatie/laravel-permission",
+ "keywords": [
+ "acl",
+ "laravel",
+ "permission",
+ "security",
+ "spatie"
+ ],
+ "time": "2017-12-08T14:04:29+00:00"
},
{
"name": "studio-42/elfinder",
- "version": "2.1.24",
+ "version": "2.1.31",
"source": {
"type": "git",
"url": "https://github.com/Studio-42/elFinder.git",
- "reference": "085b4f8b470335f89ca0dce0a8d31243e46e6b7d"
+ "reference": "4cfb7541c672e06581fcbe34bfaca0e233932d9b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Studio-42/elFinder/zipball/085b4f8b470335f89ca0dce0a8d31243e46e6b7d",
- "reference": "085b4f8b470335f89ca0dce0a8d31243e46e6b7d",
+ "url": "https://api.github.com/repos/Studio-42/elFinder/zipball/4cfb7541c672e06581fcbe34bfaca0e233932d9b",
+ "reference": "4cfb7541c672e06581fcbe34bfaca0e233932d9b",
"shasum": ""
},
"require": {
@@ -1946,33 +2287,34 @@
],
"description": "File manager for web",
"homepage": "http://elfinder.org",
- "time": "2017-05-19 06:16:48"
+ "time": "2017-12-27T09:38:20+00:00"
},
{
"name": "swiftmailer/swiftmailer",
- "version": "v5.4.8",
+ "version": "v6.0.2",
"source": {
"type": "git",
"url": "https://github.com/swiftmailer/swiftmailer.git",
- "reference": "9a06dc570a0367850280eefd3f1dc2da45aef517"
+ "reference": "412333372fb6c8ffb65496a2bbd7321af75733fc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/9a06dc570a0367850280eefd3f1dc2da45aef517",
- "reference": "9a06dc570a0367850280eefd3f1dc2da45aef517",
+ "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/412333372fb6c8ffb65496a2bbd7321af75733fc",
+ "reference": "412333372fb6c8ffb65496a2bbd7321af75733fc",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "egulias/email-validator": "~2.0",
+ "php": ">=7.0.0"
},
"require-dev": {
"mockery/mockery": "~0.9.1",
- "symfony/phpunit-bridge": "~3.2"
+ "symfony/phpunit-bridge": "~3.3@dev"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.4-dev"
+ "dev-master": "6.0-dev"
}
},
"autoload": {
@@ -1994,55 +2336,55 @@
}
],
"description": "Swiftmailer, free feature-rich PHP mailer",
- "homepage": "http://swiftmailer.org",
+ "homepage": "http://swiftmailer.symfony.com",
"keywords": [
"email",
"mail",
"mailer"
],
- "time": "2017-05-01 15:54:03"
+ "time": "2017-09-30T22:39:41+00:00"
},
{
"name": "symfony/console",
- "version": "v3.3.2",
+ "version": "v3.4.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
- "reference": "70d2a29b2911cbdc91a7e268046c395278238b2e"
+ "reference": "8394c8ef121949e8f858f13bc1e34f05169e4e7d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/console/zipball/70d2a29b2911cbdc91a7e268046c395278238b2e",
- "reference": "70d2a29b2911cbdc91a7e268046c395278238b2e",
+ "url": "https://api.github.com/repos/symfony/console/zipball/8394c8ef121949e8f858f13bc1e34f05169e4e7d",
+ "reference": "8394c8ef121949e8f858f13bc1e34f05169e4e7d",
"shasum": ""
},
"require": {
- "php": ">=5.5.9",
- "symfony/debug": "~2.8|~3.0",
+ "php": "^5.5.9|>=7.0.8",
+ "symfony/debug": "~2.8|~3.0|~4.0",
"symfony/polyfill-mbstring": "~1.0"
},
"conflict": {
- "symfony/dependency-injection": "<3.3"
+ "symfony/dependency-injection": "<3.4",
+ "symfony/process": "<3.3"
},
"require-dev": {
"psr/log": "~1.0",
- "symfony/config": "~3.3",
- "symfony/dependency-injection": "~3.3",
- "symfony/event-dispatcher": "~2.8|~3.0",
- "symfony/filesystem": "~2.8|~3.0",
- "symfony/http-kernel": "~2.8|~3.0",
- "symfony/process": "~2.8|~3.0"
+ "symfony/config": "~3.3|~4.0",
+ "symfony/dependency-injection": "~3.4|~4.0",
+ "symfony/event-dispatcher": "~2.8|~3.0|~4.0",
+ "symfony/lock": "~3.4|~4.0",
+ "symfony/process": "~3.3|~4.0"
},
"suggest": {
"psr/log": "For using the console logger",
"symfony/event-dispatcher": "",
- "symfony/filesystem": "",
+ "symfony/lock": "",
"symfony/process": ""
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.3-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -2069,7 +2411,7 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
- "time": "2017-06-02 19:24:58"
+ "time": "2018-01-03T07:37:34+00:00"
},
{
"name": "symfony/css-selector",
@@ -2122,36 +2464,36 @@
],
"description": "Symfony CssSelector Component",
"homepage": "https://symfony.com",
- "time": "2017-01-02 20:31:54"
+ "time": "2017-01-02T20:31:54+00:00"
},
{
"name": "symfony/debug",
- "version": "v3.3.2",
+ "version": "v3.4.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
- "reference": "e9c50482841ef696e8fa1470d950a79c8921f45d"
+ "reference": "603b95dda8b00020e4e6e60dc906e7b715b1c245"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/debug/zipball/e9c50482841ef696e8fa1470d950a79c8921f45d",
- "reference": "e9c50482841ef696e8fa1470d950a79c8921f45d",
+ "url": "https://api.github.com/repos/symfony/debug/zipball/603b95dda8b00020e4e6e60dc906e7b715b1c245",
+ "reference": "603b95dda8b00020e4e6e60dc906e7b715b1c245",
"shasum": ""
},
"require": {
- "php": ">=5.5.9",
+ "php": "^5.5.9|>=7.0.8",
"psr/log": "~1.0"
},
"conflict": {
"symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2"
},
"require-dev": {
- "symfony/http-kernel": "~2.8|~3.0"
+ "symfony/http-kernel": "~2.8|~3.0|~4.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.3-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -2178,34 +2520,34 @@
],
"description": "Symfony Debug Component",
"homepage": "https://symfony.com",
- "time": "2017-06-01 21:01:25"
+ "time": "2018-01-03T17:14:19+00:00"
},
{
"name": "symfony/event-dispatcher",
- "version": "v3.3.2",
+ "version": "v3.4.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
- "reference": "4054a102470665451108f9b59305c79176ef98f0"
+ "reference": "26b87b6bca8f8f797331a30b76fdae5342dc26ca"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/4054a102470665451108f9b59305c79176ef98f0",
- "reference": "4054a102470665451108f9b59305c79176ef98f0",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/26b87b6bca8f8f797331a30b76fdae5342dc26ca",
+ "reference": "26b87b6bca8f8f797331a30b76fdae5342dc26ca",
"shasum": ""
},
"require": {
- "php": ">=5.5.9"
+ "php": "^5.5.9|>=7.0.8"
},
"conflict": {
"symfony/dependency-injection": "<3.3"
},
"require-dev": {
"psr/log": "~1.0",
- "symfony/config": "~2.8|~3.0",
- "symfony/dependency-injection": "~3.3",
- "symfony/expression-language": "~2.8|~3.0",
- "symfony/stopwatch": "~2.8|~3.0"
+ "symfony/config": "~2.8|~3.0|~4.0",
+ "symfony/dependency-injection": "~3.3|~4.0",
+ "symfony/expression-language": "~2.8|~3.0|~4.0",
+ "symfony/stopwatch": "~2.8|~3.0|~4.0"
},
"suggest": {
"symfony/dependency-injection": "",
@@ -2214,7 +2556,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.3-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -2241,29 +2583,29 @@
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
- "time": "2017-06-04 18:15:29"
+ "time": "2018-01-03T07:37:34+00:00"
},
{
"name": "symfony/finder",
- "version": "v3.3.2",
+ "version": "v3.4.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
- "reference": "baea7f66d30854ad32988c11a09d7ffd485810c4"
+ "reference": "613e26310776f49a1773b6737c6bd554b8bc8c6f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/finder/zipball/baea7f66d30854ad32988c11a09d7ffd485810c4",
- "reference": "baea7f66d30854ad32988c11a09d7ffd485810c4",
+ "url": "https://api.github.com/repos/symfony/finder/zipball/613e26310776f49a1773b6737c6bd554b8bc8c6f",
+ "reference": "613e26310776f49a1773b6737c6bd554b8bc8c6f",
"shasum": ""
},
"require": {
- "php": ">=5.5.9"
+ "php": "^5.5.9|>=7.0.8"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.3-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -2290,33 +2632,34 @@
],
"description": "Symfony Finder Component",
"homepage": "https://symfony.com",
- "time": "2017-06-01 21:01:25"
+ "time": "2018-01-03T07:37:34+00:00"
},
{
"name": "symfony/http-foundation",
- "version": "v3.3.2",
+ "version": "v3.4.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
- "reference": "80eb5a1f968448b77da9e8b2c0827f6e8d767846"
+ "reference": "4a213be1cc8598089b8c7451529a2927b49b5d26"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-foundation/zipball/80eb5a1f968448b77da9e8b2c0827f6e8d767846",
- "reference": "80eb5a1f968448b77da9e8b2c0827f6e8d767846",
+ "url": "https://api.github.com/repos/symfony/http-foundation/zipball/4a213be1cc8598089b8c7451529a2927b49b5d26",
+ "reference": "4a213be1cc8598089b8c7451529a2927b49b5d26",
"shasum": ""
},
"require": {
- "php": ">=5.5.9",
- "symfony/polyfill-mbstring": "~1.1"
+ "php": "^5.5.9|>=7.0.8",
+ "symfony/polyfill-mbstring": "~1.1",
+ "symfony/polyfill-php70": "~1.6"
},
"require-dev": {
- "symfony/expression-language": "~2.8|~3.0"
+ "symfony/expression-language": "~2.8|~3.0|~4.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.3-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -2343,56 +2686,58 @@
],
"description": "Symfony HttpFoundation Component",
"homepage": "https://symfony.com",
- "time": "2017-06-05 13:06:51"
+ "time": "2018-01-03T17:14:19+00:00"
},
{
"name": "symfony/http-kernel",
- "version": "v3.3.2",
+ "version": "v3.4.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
- "reference": "be8280f7fa8e95b86514f1e1be997668a53b2888"
+ "reference": "1c2a82d6a8ec9b354fe4ef48ad1ad3f1a4f7db0e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/http-kernel/zipball/be8280f7fa8e95b86514f1e1be997668a53b2888",
- "reference": "be8280f7fa8e95b86514f1e1be997668a53b2888",
+ "url": "https://api.github.com/repos/symfony/http-kernel/zipball/1c2a82d6a8ec9b354fe4ef48ad1ad3f1a4f7db0e",
+ "reference": "1c2a82d6a8ec9b354fe4ef48ad1ad3f1a4f7db0e",
"shasum": ""
},
"require": {
- "php": ">=5.5.9",
+ "php": "^5.5.9|>=7.0.8",
"psr/log": "~1.0",
- "symfony/debug": "~2.8|~3.0",
- "symfony/event-dispatcher": "~2.8|~3.0",
- "symfony/http-foundation": "~3.3"
+ "symfony/debug": "~2.8|~3.0|~4.0",
+ "symfony/event-dispatcher": "~2.8|~3.0|~4.0",
+ "symfony/http-foundation": "^3.3.11|~4.0"
},
"conflict": {
"symfony/config": "<2.8",
- "symfony/dependency-injection": "<3.3",
+ "symfony/dependency-injection": "<3.4",
"symfony/var-dumper": "<3.3",
"twig/twig": "<1.34|<2.4,>=2"
},
+ "provide": {
+ "psr/log-implementation": "1.0"
+ },
"require-dev": {
"psr/cache": "~1.0",
- "symfony/browser-kit": "~2.8|~3.0",
+ "symfony/browser-kit": "~2.8|~3.0|~4.0",
"symfony/class-loader": "~2.8|~3.0",
- "symfony/config": "~2.8|~3.0",
- "symfony/console": "~2.8|~3.0",
- "symfony/css-selector": "~2.8|~3.0",
- "symfony/dependency-injection": "~3.3",
- "symfony/dom-crawler": "~2.8|~3.0",
- "symfony/expression-language": "~2.8|~3.0",
- "symfony/finder": "~2.8|~3.0",
- "symfony/process": "~2.8|~3.0",
- "symfony/routing": "~2.8|~3.0",
- "symfony/stopwatch": "~2.8|~3.0",
- "symfony/templating": "~2.8|~3.0",
- "symfony/translation": "~2.8|~3.0",
- "symfony/var-dumper": "~3.3"
+ "symfony/config": "~2.8|~3.0|~4.0",
+ "symfony/console": "~2.8|~3.0|~4.0",
+ "symfony/css-selector": "~2.8|~3.0|~4.0",
+ "symfony/dependency-injection": "~3.4|~4.0",
+ "symfony/dom-crawler": "~2.8|~3.0|~4.0",
+ "symfony/expression-language": "~2.8|~3.0|~4.0",
+ "symfony/finder": "~2.8|~3.0|~4.0",
+ "symfony/process": "~2.8|~3.0|~4.0",
+ "symfony/routing": "~3.4|~4.0",
+ "symfony/stopwatch": "~2.8|~3.0|~4.0",
+ "symfony/templating": "~2.8|~3.0|~4.0",
+ "symfony/translation": "~2.8|~3.0|~4.0",
+ "symfony/var-dumper": "~3.3|~4.0"
},
"suggest": {
"symfony/browser-kit": "",
- "symfony/class-loader": "",
"symfony/config": "",
"symfony/console": "",
"symfony/dependency-injection": "",
@@ -2402,7 +2747,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.3-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -2427,42 +2772,102 @@
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony HttpKernel Component",
- "homepage": "https://symfony.com",
- "time": "2017-06-06 03:59:58"
+ "description": "Symfony HttpKernel Component",
+ "homepage": "https://symfony.com",
+ "time": "2018-01-05T08:33:00+00:00"
+ },
+ {
+ "name": "symfony/polyfill-mbstring",
+ "version": "v1.6.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-mbstring.git",
+ "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296",
+ "reference": "2ec8b39c38cb16674bbf3fea2b6ce5bf117e1296",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "suggest": {
+ "ext-mbstring": "For best performance"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.6-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Mbstring\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for the Mbstring extension",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "mbstring",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "time": "2017-10-11T12:05:26+00:00"
},
{
- "name": "symfony/polyfill-mbstring",
- "version": "v1.4.0",
+ "name": "symfony/polyfill-php70",
+ "version": "v1.6.0",
"source": {
"type": "git",
- "url": "https://github.com/symfony/polyfill-mbstring.git",
- "reference": "f29dca382a6485c3cbe6379f0c61230167681937"
+ "url": "https://github.com/symfony/polyfill-php70.git",
+ "reference": "0442b9c0596610bd24ae7b5f0a6cdbbc16d9fcff"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f29dca382a6485c3cbe6379f0c61230167681937",
- "reference": "f29dca382a6485c3cbe6379f0c61230167681937",
+ "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/0442b9c0596610bd24ae7b5f0a6cdbbc16d9fcff",
+ "reference": "0442b9c0596610bd24ae7b5f0a6cdbbc16d9fcff",
"shasum": ""
},
"require": {
+ "paragonie/random_compat": "~1.0|~2.0",
"php": ">=5.3.3"
},
- "suggest": {
- "ext-mbstring": "For best performance"
- },
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.4-dev"
+ "dev-master": "1.6-dev"
}
},
"autoload": {
"psr-4": {
- "Symfony\\Polyfill\\Mbstring\\": ""
+ "Symfony\\Polyfill\\Php70\\": ""
},
"files": [
"bootstrap.php"
+ ],
+ "classmap": [
+ "Resources/stubs"
]
},
"notification-url": "https://packagist.org/downloads/",
@@ -2479,38 +2884,37 @@
"homepage": "https://symfony.com/contributors"
}
],
- "description": "Symfony polyfill for the Mbstring extension",
+ "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
- "mbstring",
"polyfill",
"portable",
"shim"
],
- "time": "2017-06-09 14:24:12"
+ "time": "2017-10-11T12:05:26+00:00"
},
{
"name": "symfony/process",
- "version": "v3.3.2",
+ "version": "v3.4.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
- "reference": "8e30690c67aafb6c7992d6d8eb0d707807dd3eaf"
+ "reference": "ff69f110c6b33fd33cd2089ba97d6112f44ef0ba"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/process/zipball/8e30690c67aafb6c7992d6d8eb0d707807dd3eaf",
- "reference": "8e30690c67aafb6c7992d6d8eb0d707807dd3eaf",
+ "url": "https://api.github.com/repos/symfony/process/zipball/ff69f110c6b33fd33cd2089ba97d6112f44ef0ba",
+ "reference": "ff69f110c6b33fd33cd2089ba97d6112f44ef0ba",
"shasum": ""
},
"require": {
- "php": ">=5.5.9"
+ "php": "^5.5.9|>=7.0.8"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.3-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -2537,39 +2941,39 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
- "time": "2017-05-22 12:32:03"
+ "time": "2018-01-03T07:37:34+00:00"
},
{
"name": "symfony/routing",
- "version": "v3.3.2",
+ "version": "v3.4.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/routing.git",
- "reference": "39804eeafea5cca851946e1eed122eb94459fdb4"
+ "reference": "e2b6d6fe7b090c7af720b75c7722c6dfa7a52658"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/routing/zipball/39804eeafea5cca851946e1eed122eb94459fdb4",
- "reference": "39804eeafea5cca851946e1eed122eb94459fdb4",
+ "url": "https://api.github.com/repos/symfony/routing/zipball/e2b6d6fe7b090c7af720b75c7722c6dfa7a52658",
+ "reference": "e2b6d6fe7b090c7af720b75c7722c6dfa7a52658",
"shasum": ""
},
"require": {
- "php": ">=5.5.9"
+ "php": "^5.5.9|>=7.0.8"
},
"conflict": {
"symfony/config": "<2.8",
"symfony/dependency-injection": "<3.3",
- "symfony/yaml": "<3.3"
+ "symfony/yaml": "<3.4"
},
"require-dev": {
"doctrine/annotations": "~1.0",
"doctrine/common": "~2.2",
"psr/log": "~1.0",
- "symfony/config": "~2.8|~3.0",
- "symfony/dependency-injection": "~3.3",
- "symfony/expression-language": "~2.8|~3.0",
- "symfony/http-foundation": "~2.8|~3.0",
- "symfony/yaml": "~3.3"
+ "symfony/config": "~2.8|~3.0|~4.0",
+ "symfony/dependency-injection": "~3.3|~4.0",
+ "symfony/expression-language": "~2.8|~3.0|~4.0",
+ "symfony/http-foundation": "~2.8|~3.0|~4.0",
+ "symfony/yaml": "~3.4|~4.0"
},
"suggest": {
"doctrine/annotations": "For using the annotation loader",
@@ -2582,7 +2986,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.3-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -2615,35 +3019,38 @@
"uri",
"url"
],
- "time": "2017-06-02 09:51:43"
+ "time": "2018-01-04T15:09:34+00:00"
},
{
"name": "symfony/translation",
- "version": "v3.3.2",
+ "version": "v3.4.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
- "reference": "dc3b2a0c6cfff60327ba1c043a82092735397543"
+ "reference": "17b5962d252b2d6d1d37a2485ebb7ddc5b2bef0a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/translation/zipball/dc3b2a0c6cfff60327ba1c043a82092735397543",
- "reference": "dc3b2a0c6cfff60327ba1c043a82092735397543",
+ "url": "https://api.github.com/repos/symfony/translation/zipball/17b5962d252b2d6d1d37a2485ebb7ddc5b2bef0a",
+ "reference": "17b5962d252b2d6d1d37a2485ebb7ddc5b2bef0a",
"shasum": ""
},
"require": {
- "php": ">=5.5.9",
+ "php": "^5.5.9|>=7.0.8",
"symfony/polyfill-mbstring": "~1.0"
},
"conflict": {
"symfony/config": "<2.8",
- "symfony/yaml": "<3.3"
+ "symfony/dependency-injection": "<3.4",
+ "symfony/yaml": "<3.4"
},
"require-dev": {
"psr/log": "~1.0",
- "symfony/config": "~2.8|~3.0",
- "symfony/intl": "^2.8.18|^3.2.5",
- "symfony/yaml": "~3.3"
+ "symfony/config": "~2.8|~3.0|~4.0",
+ "symfony/dependency-injection": "~3.4|~4.0",
+ "symfony/finder": "~2.8|~3.0|~4.0",
+ "symfony/intl": "^2.8.18|^3.2.5|~4.0",
+ "symfony/yaml": "~3.4|~4.0"
},
"suggest": {
"psr/log": "To use logging capability in translator",
@@ -2653,7 +3060,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.3-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -2680,24 +3087,24 @@
],
"description": "Symfony Translation Component",
"homepage": "https://symfony.com",
- "time": "2017-05-22 07:42:36"
+ "time": "2018-01-03T07:37:34+00:00"
},
{
"name": "symfony/var-dumper",
- "version": "v3.3.2",
+ "version": "v3.4.3",
"source": {
"type": "git",
"url": "https://github.com/symfony/var-dumper.git",
- "reference": "347c4247a3e40018810b476fcd5dec36d46d08dc"
+ "reference": "545be7e78ccbec43e599f10ff7500d0b09eda9d0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/var-dumper/zipball/347c4247a3e40018810b476fcd5dec36d46d08dc",
- "reference": "347c4247a3e40018810b476fcd5dec36d46d08dc",
+ "url": "https://api.github.com/repos/symfony/var-dumper/zipball/545be7e78ccbec43e599f10ff7500d0b09eda9d0",
+ "reference": "545be7e78ccbec43e599f10ff7500d0b09eda9d0",
"shasum": ""
},
"require": {
- "php": ">=5.5.9",
+ "php": "^5.5.9|>=7.0.8",
"symfony/polyfill-mbstring": "~1.0"
},
"conflict": {
@@ -2709,12 +3116,13 @@
},
"suggest": {
"ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).",
+ "ext-intl": "To show region name in time zone dump",
"ext-symfony_debug": ""
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.3-dev"
+ "dev-master": "3.4-dev"
}
},
"autoload": {
@@ -2748,33 +3156,33 @@
"debug",
"dump"
],
- "time": "2017-06-02 09:10:29"
+ "time": "2018-01-03T17:14:19+00:00"
},
{
"name": "tijsverkoyen/css-to-inline-styles",
- "version": "2.2.0",
+ "version": "2.2.1",
"source": {
"type": "git",
"url": "https://github.com/tijsverkoyen/CssToInlineStyles.git",
- "reference": "ab03919dfd85a74ae0372f8baf9f3c7d5c03b04b"
+ "reference": "0ed4a2ea4e0902dac0489e6436ebcd5bbcae9757"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/ab03919dfd85a74ae0372f8baf9f3c7d5c03b04b",
- "reference": "ab03919dfd85a74ae0372f8baf9f3c7d5c03b04b",
+ "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/0ed4a2ea4e0902dac0489e6436ebcd5bbcae9757",
+ "reference": "0ed4a2ea4e0902dac0489e6436ebcd5bbcae9757",
"shasum": ""
},
"require": {
- "php": "^5.5 || ^7",
- "symfony/css-selector": "^2.7|~3.0"
+ "php": "^5.5 || ^7.0",
+ "symfony/css-selector": "^2.7 || ^3.0 || ^4.0"
},
"require-dev": {
- "phpunit/phpunit": "~4.8|5.1.*"
+ "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "2.2.x-dev"
}
},
"autoload": {
@@ -2795,7 +3203,7 @@
],
"description": "CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.",
"homepage": "https://github.com/tijsverkoyen/CssToInlineStyles",
- "time": "2016-09-20 12:50:39"
+ "time": "2017-11-27T11:13:29+00:00"
},
{
"name": "venturecraft/revisionable",
@@ -2843,7 +3251,7 @@
"model",
"revision"
],
- "time": "2016-08-02 02:32:00"
+ "time": "2016-08-02T02:32:00+00:00"
},
{
"name": "vlucas/phpdotenv",
@@ -2893,22 +3301,22 @@
"env",
"environment"
],
- "time": "2016-09-01 10:05:43"
+ "time": "2016-09-01T10:05:43+00:00"
}
],
"packages-dev": [
{
"name": "backpack/generators",
- "version": "1.1.9",
+ "version": "1.1.11",
"source": {
"type": "git",
"url": "https://github.com/Laravel-Backpack/Generators.git",
- "reference": "c3d93e43e81aeba094e2cb44b13b5c54c2dca3aa"
+ "reference": "e8ca837fcfa8219c543b405f6c810b838130aa73"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Laravel-Backpack/Generators/zipball/c3d93e43e81aeba094e2cb44b13b5c54c2dca3aa",
- "reference": "c3d93e43e81aeba094e2cb44b13b5c54c2dca3aa",
+ "url": "https://api.github.com/repos/Laravel-Backpack/Generators/zipball/e8ca837fcfa8219c543b405f6c810b838130aa73",
+ "reference": "e8ca837fcfa8219c543b405f6c810b838130aa73",
"shasum": ""
},
"require": {
@@ -2924,6 +3332,11 @@
"extra": {
"branch-alias": {
"dev-master": "1.0-dev"
+ },
+ "laravel": {
+ "providers": [
+ "Backpack\\Generators\\GeneratorsServiceProvider"
+ ]
}
},
"autoload": {
@@ -2952,7 +3365,7 @@
"request",
"view"
],
- "time": "2017-04-26 05:13:41"
+ "time": "2017-08-30T18:32:34+00:00"
},
{
"name": "doctrine/instantiator",
@@ -3006,33 +3419,96 @@
"constructor",
"instantiate"
],
- "time": "2015-06-14 21:17:01"
+ "time": "2015-06-14T21:17:01+00:00"
+ },
+ {
+ "name": "filp/whoops",
+ "version": "2.1.14",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/filp/whoops.git",
+ "reference": "c6081b8838686aa04f1e83ba7e91f78b7b2a23e6"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/filp/whoops/zipball/c6081b8838686aa04f1e83ba7e91f78b7b2a23e6",
+ "reference": "c6081b8838686aa04f1e83ba7e91f78b7b2a23e6",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.5.9 || ^7.0",
+ "psr/log": "^1.0.1"
+ },
+ "require-dev": {
+ "mockery/mockery": "0.9.*",
+ "phpunit/phpunit": "^4.8.35 || ^5.7",
+ "symfony/var-dumper": "^2.6 || ^3.0"
+ },
+ "suggest": {
+ "symfony/var-dumper": "Pretty print complex values better with var-dumper available",
+ "whoops/soap": "Formats errors as SOAP responses"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Whoops\\": "src/Whoops/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Filipe Dobreira",
+ "homepage": "https://github.com/filp",
+ "role": "Developer"
+ }
+ ],
+ "description": "php error handling for cool kids",
+ "homepage": "https://filp.github.io/whoops/",
+ "keywords": [
+ "error",
+ "exception",
+ "handling",
+ "library",
+ "throwable",
+ "whoops"
+ ],
+ "time": "2017-11-23T18:22:44+00:00"
},
{
"name": "fzaninotto/faker",
- "version": "v1.6.0",
+ "version": "v1.7.1",
"source": {
"type": "git",
"url": "https://github.com/fzaninotto/Faker.git",
- "reference": "44f9a286a04b80c76a4e5fb7aad8bb539b920123"
+ "reference": "d3ed4cc37051c1ca52d22d76b437d14809fc7e0d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/44f9a286a04b80c76a4e5fb7aad8bb539b920123",
- "reference": "44f9a286a04b80c76a4e5fb7aad8bb539b920123",
+ "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/d3ed4cc37051c1ca52d22d76b437d14809fc7e0d",
+ "reference": "d3ed4cc37051c1ca52d22d76b437d14809fc7e0d",
"shasum": ""
},
"require": {
- "php": "^5.3.3|^7.0"
+ "php": "^5.3.3 || ^7.0"
},
"require-dev": {
"ext-intl": "*",
- "phpunit/phpunit": "~4.0",
- "squizlabs/php_codesniffer": "~1.5"
+ "phpunit/phpunit": "^4.0 || ^5.0",
+ "squizlabs/php_codesniffer": "^1.5"
},
"type": "library",
"extra": {
- "branch-alias": []
+ "branch-alias": {
+ "dev-master": "1.8-dev"
+ }
},
"autoload": {
"psr-4": {
@@ -3054,7 +3530,7 @@
"faker",
"fixtures"
],
- "time": "2016-04-29 12:21:54"
+ "time": "2017-08-15T16:48:10+00:00"
},
{
"name": "hamcrest/hamcrest-php",
@@ -3099,7 +3575,7 @@
"keywords": [
"test"
],
- "time": "2015-05-11 14:41:42"
+ "time": "2015-05-11T14:41:42+00:00"
},
{
"name": "laracasts/generators",
@@ -3107,12 +3583,12 @@
"source": {
"type": "git",
"url": "https://github.com/laracasts/Laravel-5-Generators-Extended.git",
- "reference": "4e9ce5db9d93475ca27b993a92de3b15090aa139"
+ "reference": "8d99c3f9891abce5cc84d5d1d4a7c26cf514ab6e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/laracasts/Laravel-5-Generators-Extended/zipball/4e9ce5db9d93475ca27b993a92de3b15090aa139",
- "reference": "4e9ce5db9d93475ca27b993a92de3b15090aa139",
+ "url": "https://api.github.com/repos/laracasts/Laravel-5-Generators-Extended/zipball/8d99c3f9891abce5cc84d5d1d4a7c26cf514ab6e",
+ "reference": "8d99c3f9891abce5cc84d5d1d4a7c26cf514ab6e",
"shasum": ""
},
"require": {
@@ -3123,6 +3599,13 @@
"phpspec/phpspec": "~2.1"
},
"type": "library",
+ "extra": {
+ "laravel": {
+ "providers": [
+ "Laracasts\\Generators\\GeneratorsServiceProvider"
+ ]
+ }
+ },
"autoload": {
"psr-4": {
"Laracasts\\Generators\\": "src/"
@@ -3143,7 +3626,7 @@
"generators",
"laravel"
],
- "time": "2017-01-25 15:31:26"
+ "time": "2017-11-15T07:23:53+00:00"
},
{
"name": "mockery/mockery",
@@ -3208,41 +3691,44 @@
"test double",
"testing"
],
- "time": "2017-02-28 12:52:32"
+ "time": "2017-02-28T12:52:32+00:00"
},
{
"name": "myclabs/deep-copy",
- "version": "1.6.1",
+ "version": "1.7.0",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
- "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102"
+ "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/8e6e04167378abf1ddb4d3522d8755c5fd90d102",
- "reference": "8e6e04167378abf1ddb4d3522d8755c5fd90d102",
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e",
+ "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e",
"shasum": ""
},
"require": {
- "php": ">=5.4.0"
+ "php": "^5.6 || ^7.0"
},
"require-dev": {
- "doctrine/collections": "1.*",
- "phpunit/phpunit": "~4.1"
+ "doctrine/collections": "^1.0",
+ "doctrine/common": "^2.6",
+ "phpunit/phpunit": "^4.1"
},
"type": "library",
"autoload": {
"psr-4": {
"DeepCopy\\": "src/DeepCopy/"
- }
+ },
+ "files": [
+ "src/DeepCopy/deep_copy.php"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "Create deep copies (clones) of your objects",
- "homepage": "https://github.com/myclabs/DeepCopy",
"keywords": [
"clone",
"copy",
@@ -3250,20 +3736,122 @@
"object",
"object graph"
],
- "time": "2017-04-12 18:52:22"
+ "time": "2017-10-19T19:58:43+00:00"
+ },
+ {
+ "name": "phar-io/manifest",
+ "version": "1.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phar-io/manifest.git",
+ "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0",
+ "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0",
+ "shasum": ""
+ },
+ "require": {
+ "ext-dom": "*",
+ "ext-phar": "*",
+ "phar-io/version": "^1.0.1",
+ "php": "^5.6 || ^7.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Arne Blankerts",
+ "email": "arne@blankerts.de",
+ "role": "Developer"
+ },
+ {
+ "name": "Sebastian Heuer",
+ "email": "sebastian@phpeople.de",
+ "role": "Developer"
+ },
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "Developer"
+ }
+ ],
+ "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)",
+ "time": "2017-03-05T18:14:27+00:00"
+ },
+ {
+ "name": "phar-io/version",
+ "version": "1.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phar-io/version.git",
+ "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df",
+ "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.6 || ^7.0"
+ },
+ "type": "library",
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Arne Blankerts",
+ "email": "arne@blankerts.de",
+ "role": "Developer"
+ },
+ {
+ "name": "Sebastian Heuer",
+ "email": "sebastian@phpeople.de",
+ "role": "Developer"
+ },
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de",
+ "role": "Developer"
+ }
+ ],
+ "description": "Library for handling version information and constraints",
+ "time": "2017-03-05T17:38:23+00:00"
},
{
"name": "phpdocumentor/reflection-common",
- "version": "1.0",
+ "version": "1.0.1",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionCommon.git",
- "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c"
+ "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c",
- "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c",
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
+ "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6",
"shasum": ""
},
"require": {
@@ -3304,33 +3892,39 @@
"reflection",
"static analysis"
],
- "time": "2015-12-27 11:43:31"
+ "time": "2017-09-11T18:02:19+00:00"
},
{
"name": "phpdocumentor/reflection-docblock",
- "version": "3.1.1",
+ "version": "4.2.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/ReflectionDocBlock.git",
- "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e"
+ "reference": "66465776cfc249844bde6d117abff1d22e06c2da"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e",
- "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e",
+ "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/66465776cfc249844bde6d117abff1d22e06c2da",
+ "reference": "66465776cfc249844bde6d117abff1d22e06c2da",
"shasum": ""
},
"require": {
- "php": ">=5.5",
- "phpdocumentor/reflection-common": "^1.0@dev",
- "phpdocumentor/type-resolver": "^0.2.0",
+ "php": "^7.0",
+ "phpdocumentor/reflection-common": "^1.0.0",
+ "phpdocumentor/type-resolver": "^0.4.0",
"webmozart/assert": "^1.0"
},
"require-dev": {
- "mockery/mockery": "^0.9.4",
- "phpunit/phpunit": "^4.4"
+ "doctrine/instantiator": "~1.0.5",
+ "mockery/mockery": "^1.0",
+ "phpunit/phpunit": "^6.4"
},
"type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.x-dev"
+ }
+ },
"autoload": {
"psr-4": {
"phpDocumentor\\Reflection\\": [
@@ -3349,24 +3943,24 @@
}
],
"description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.",
- "time": "2016-09-30 07:12:33"
+ "time": "2017-11-27T17:38:31+00:00"
},
{
"name": "phpdocumentor/type-resolver",
- "version": "0.2.1",
+ "version": "0.4.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
- "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb"
+ "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb",
- "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb",
+ "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7",
+ "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7",
"shasum": ""
},
"require": {
- "php": ">=5.5",
+ "php": "^5.5 || ^7.0",
"phpdocumentor/reflection-common": "^1.0"
},
"require-dev": {
@@ -3396,37 +3990,37 @@
"email": "me@mikevanriel.com"
}
],
- "time": "2016-11-25 06:54:22"
+ "time": "2017-07-14T14:27:02+00:00"
},
{
"name": "phpspec/prophecy",
- "version": "v1.7.0",
+ "version": "1.7.3",
"source": {
"type": "git",
"url": "https://github.com/phpspec/prophecy.git",
- "reference": "93d39f1f7f9326d746203c7c056f300f7f126073"
+ "reference": "e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpspec/prophecy/zipball/93d39f1f7f9326d746203c7c056f300f7f126073",
- "reference": "93d39f1f7f9326d746203c7c056f300f7f126073",
+ "url": "https://api.github.com/repos/phpspec/prophecy/zipball/e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf",
+ "reference": "e4ed002c67da8eceb0eb8ddb8b3847bb53c5c2bf",
"shasum": ""
},
"require": {
"doctrine/instantiator": "^1.0.2",
"php": "^5.3|^7.0",
- "phpdocumentor/reflection-docblock": "^2.0|^3.0.2",
+ "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0",
"sebastian/comparator": "^1.1|^2.0",
"sebastian/recursion-context": "^1.0|^2.0|^3.0"
},
"require-dev": {
"phpspec/phpspec": "^2.5|^3.2",
- "phpunit/phpunit": "^4.8 || ^5.6.5"
+ "phpunit/phpunit": "^4.8.35 || ^5.7"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.6.x-dev"
+ "dev-master": "1.7.x-dev"
}
},
"autoload": {
@@ -3459,44 +4053,44 @@
"spy",
"stub"
],
- "time": "2017-03-02 20:05:34"
+ "time": "2017-11-24T13:59:53+00:00"
},
{
"name": "phpunit/php-code-coverage",
- "version": "4.0.8",
+ "version": "5.3.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d"
+ "reference": "661f34d0bd3f1a7225ef491a70a020ad23a057a1"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ef7b2f56815df854e66ceaee8ebe9393ae36a40d",
- "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/661f34d0bd3f1a7225ef491a70a020ad23a057a1",
+ "reference": "661f34d0bd3f1a7225ef491a70a020ad23a057a1",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-xmlwriter": "*",
- "php": "^5.6 || ^7.0",
- "phpunit/php-file-iterator": "^1.3",
- "phpunit/php-text-template": "^1.2",
- "phpunit/php-token-stream": "^1.4.2 || ^2.0",
- "sebastian/code-unit-reverse-lookup": "^1.0",
- "sebastian/environment": "^1.3.2 || ^2.0",
- "sebastian/version": "^1.0 || ^2.0"
+ "php": "^7.0",
+ "phpunit/php-file-iterator": "^1.4.2",
+ "phpunit/php-text-template": "^1.2.1",
+ "phpunit/php-token-stream": "^2.0.1",
+ "sebastian/code-unit-reverse-lookup": "^1.0.1",
+ "sebastian/environment": "^3.0",
+ "sebastian/version": "^2.0.1",
+ "theseer/tokenizer": "^1.1"
},
"require-dev": {
- "ext-xdebug": "^2.1.4",
- "phpunit/phpunit": "^5.7"
+ "phpunit/phpunit": "^6.0"
},
"suggest": {
- "ext-xdebug": "^2.5.1"
+ "ext-xdebug": "^2.5.5"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.0.x-dev"
+ "dev-master": "5.3.x-dev"
}
},
"autoload": {
@@ -3511,7 +4105,7 @@
"authors": [
{
"name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
+ "email": "sebastian@phpunit.de",
"role": "lead"
}
],
@@ -3522,20 +4116,20 @@
"testing",
"xunit"
],
- "time": "2017-04-02 07:44:40"
+ "time": "2017-12-06T09:29:45+00:00"
},
{
"name": "phpunit/php-file-iterator",
- "version": "1.4.2",
+ "version": "1.4.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
- "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5"
+ "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5",
- "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4",
+ "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4",
"shasum": ""
},
"require": {
@@ -3569,7 +4163,7 @@
"filesystem",
"iterator"
],
- "time": "2016-10-03 07:40:28"
+ "time": "2017-11-27T13:52:08+00:00"
},
{
"name": "phpunit/php-text-template",
@@ -3610,7 +4204,7 @@
"keywords": [
"template"
],
- "time": "2015-06-21 13:50:34"
+ "time": "2015-06-21T13:50:34+00:00"
},
{
"name": "phpunit/php-timer",
@@ -3659,33 +4253,33 @@
"keywords": [
"timer"
],
- "time": "2017-02-26 11:10:40"
+ "time": "2017-02-26T11:10:40+00:00"
},
{
"name": "phpunit/php-token-stream",
- "version": "1.4.11",
+ "version": "2.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
- "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7"
+ "reference": "791198a2c6254db10131eecfe8c06670700904db"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e03f8f67534427a787e21a385a67ec3ca6978ea7",
- "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db",
+ "reference": "791198a2c6254db10131eecfe8c06670700904db",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
- "php": ">=5.3.3"
+ "php": "^7.0"
},
"require-dev": {
- "phpunit/phpunit": "~4.2"
+ "phpunit/phpunit": "^6.2.4"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.4-dev"
+ "dev-master": "2.0-dev"
}
},
"autoload": {
@@ -3708,20 +4302,20 @@
"keywords": [
"tokenizer"
],
- "time": "2017-02-27 10:12:30"
+ "time": "2017-11-27T05:48:46+00:00"
},
{
"name": "phpunit/phpunit",
- "version": "5.7.20",
+ "version": "6.5.5",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "3cb94a5f8c07a03c8b7527ed7468a2926203f58b"
+ "reference": "83d27937a310f2984fd575686138597147bdc7df"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3cb94a5f8c07a03c8b7527ed7468a2926203f58b",
- "reference": "3cb94a5f8c07a03c8b7527ed7468a2926203f58b",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/83d27937a310f2984fd575686138597147bdc7df",
+ "reference": "83d27937a310f2984fd575686138597147bdc7df",
"shasum": ""
},
"require": {
@@ -3730,33 +4324,35 @@
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-xml": "*",
- "myclabs/deep-copy": "~1.3",
- "php": "^5.6 || ^7.0",
- "phpspec/prophecy": "^1.6.2",
- "phpunit/php-code-coverage": "^4.0.4",
- "phpunit/php-file-iterator": "~1.4",
- "phpunit/php-text-template": "~1.2",
- "phpunit/php-timer": "^1.0.6",
- "phpunit/phpunit-mock-objects": "^3.2",
- "sebastian/comparator": "^1.2.4",
- "sebastian/diff": "^1.4.3",
- "sebastian/environment": "^1.3.4 || ^2.0",
- "sebastian/exporter": "~2.0",
- "sebastian/global-state": "^1.1",
- "sebastian/object-enumerator": "~2.0",
- "sebastian/resource-operations": "~1.0",
- "sebastian/version": "~1.0.3|~2.0",
- "symfony/yaml": "~2.1|~3.0"
+ "myclabs/deep-copy": "^1.6.1",
+ "phar-io/manifest": "^1.0.1",
+ "phar-io/version": "^1.0",
+ "php": "^7.0",
+ "phpspec/prophecy": "^1.7",
+ "phpunit/php-code-coverage": "^5.3",
+ "phpunit/php-file-iterator": "^1.4.3",
+ "phpunit/php-text-template": "^1.2.1",
+ "phpunit/php-timer": "^1.0.9",
+ "phpunit/phpunit-mock-objects": "^5.0.5",
+ "sebastian/comparator": "^2.1",
+ "sebastian/diff": "^2.0",
+ "sebastian/environment": "^3.1",
+ "sebastian/exporter": "^3.1",
+ "sebastian/global-state": "^2.0",
+ "sebastian/object-enumerator": "^3.0.3",
+ "sebastian/resource-operations": "^1.0",
+ "sebastian/version": "^2.0.1"
},
"conflict": {
- "phpdocumentor/reflection-docblock": "3.0.2"
+ "phpdocumentor/reflection-docblock": "3.0.2",
+ "phpunit/dbunit": "<3.0"
},
"require-dev": {
"ext-pdo": "*"
},
"suggest": {
"ext-xdebug": "*",
- "phpunit/php-invoker": "~1.1"
+ "phpunit/php-invoker": "^1.1"
},
"bin": [
"phpunit"
@@ -3764,7 +4360,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.7.x-dev"
+ "dev-master": "6.5.x-dev"
}
},
"autoload": {
@@ -3790,33 +4386,33 @@
"testing",
"xunit"
],
- "time": "2017-05-22 07:42:55"
+ "time": "2017-12-17T06:31:19+00:00"
},
{
"name": "phpunit/phpunit-mock-objects",
- "version": "3.4.3",
+ "version": "5.0.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
- "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24"
+ "reference": "33fd41a76e746b8fa96d00b49a23dadfa8334cdf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/3ab72b65b39b491e0c011e2e09bb2206c2aa8e24",
- "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/33fd41a76e746b8fa96d00b49a23dadfa8334cdf",
+ "reference": "33fd41a76e746b8fa96d00b49a23dadfa8334cdf",
"shasum": ""
},
"require": {
- "doctrine/instantiator": "^1.0.2",
- "php": "^5.6 || ^7.0",
- "phpunit/php-text-template": "^1.2",
- "sebastian/exporter": "^1.2 || ^2.0"
+ "doctrine/instantiator": "^1.0.5",
+ "php": "^7.0",
+ "phpunit/php-text-template": "^1.2.1",
+ "sebastian/exporter": "^3.1"
},
"conflict": {
- "phpunit/phpunit": "<5.4.0"
+ "phpunit/phpunit": "<6.0"
},
"require-dev": {
- "phpunit/phpunit": "^5.4"
+ "phpunit/phpunit": "^6.5"
},
"suggest": {
"ext-soap": "*"
@@ -3824,7 +4420,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.2.x-dev"
+ "dev-master": "5.0.x-dev"
}
},
"autoload": {
@@ -3839,7 +4435,7 @@
"authors": [
{
"name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
+ "email": "sebastian@phpunit.de",
"role": "lead"
}
],
@@ -3849,7 +4445,7 @@
"mock",
"xunit"
],
- "time": "2016-12-08 20:27:08"
+ "time": "2018-01-06T05:45:45+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
@@ -3894,34 +4490,34 @@
],
"description": "Looks up which function or method a line of code belongs to",
"homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
- "time": "2017-03-04 06:30:41"
+ "time": "2017-03-04T06:30:41+00:00"
},
{
"name": "sebastian/comparator",
- "version": "1.2.4",
+ "version": "2.1.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be"
+ "reference": "11c07feade1d65453e06df3b3b90171d6d982087"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be",
- "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/11c07feade1d65453e06df3b3b90171d6d982087",
+ "reference": "11c07feade1d65453e06df3b3b90171d6d982087",
"shasum": ""
},
"require": {
- "php": ">=5.3.3",
- "sebastian/diff": "~1.2",
- "sebastian/exporter": "~1.2 || ~2.0"
+ "php": "^7.0",
+ "sebastian/diff": "^2.0",
+ "sebastian/exporter": "^3.1"
},
"require-dev": {
- "phpunit/phpunit": "~4.4"
+ "phpunit/phpunit": "^6.4"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.2.x-dev"
+ "dev-master": "2.1.x-dev"
}
},
"autoload": {
@@ -3952,38 +4548,38 @@
}
],
"description": "Provides the functionality to compare PHP values for equality",
- "homepage": "http://www.github.com/sebastianbergmann/comparator",
+ "homepage": "https://github.com/sebastianbergmann/comparator",
"keywords": [
"comparator",
"compare",
"equality"
],
- "time": "2017-01-29 09:50:25"
+ "time": "2018-01-12T06:34:42+00:00"
},
{
"name": "sebastian/diff",
- "version": "1.4.3",
+ "version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4"
+ "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4",
- "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/347c1d8b49c5c3ee30c7040ea6fc446790e6bddd",
+ "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd",
"shasum": ""
},
"require": {
- "php": "^5.3.3 || ^7.0"
+ "php": "^7.0"
},
"require-dev": {
- "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
+ "phpunit/phpunit": "^6.2"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.4-dev"
+ "dev-master": "2.0-dev"
}
},
"autoload": {
@@ -4010,32 +4606,32 @@
"keywords": [
"diff"
],
- "time": "2017-05-22 07:24:03"
+ "time": "2017-08-03T08:09:46+00:00"
},
{
"name": "sebastian/environment",
- "version": "2.0.0",
+ "version": "3.1.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac"
+ "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac",
- "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5",
+ "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5",
"shasum": ""
},
"require": {
- "php": "^5.6 || ^7.0"
+ "php": "^7.0"
},
"require-dev": {
- "phpunit/phpunit": "^5.0"
+ "phpunit/phpunit": "^6.1"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "3.1.x-dev"
}
},
"autoload": {
@@ -4060,34 +4656,34 @@
"environment",
"hhvm"
],
- "time": "2016-11-26 07:53:53"
+ "time": "2017-07-01T08:51:00+00:00"
},
{
"name": "sebastian/exporter",
- "version": "2.0.0",
+ "version": "3.1.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4"
+ "reference": "234199f4528de6d12aaa58b612e98f7d36adb937"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4",
- "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937",
+ "reference": "234199f4528de6d12aaa58b612e98f7d36adb937",
"shasum": ""
},
"require": {
- "php": ">=5.3.3",
- "sebastian/recursion-context": "~2.0"
+ "php": "^7.0",
+ "sebastian/recursion-context": "^3.0"
},
"require-dev": {
"ext-mbstring": "*",
- "phpunit/phpunit": "~4.4"
+ "phpunit/phpunit": "^6.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "3.1.x-dev"
}
},
"autoload": {
@@ -4127,27 +4723,27 @@
"export",
"exporter"
],
- "time": "2016-11-19 08:54:04"
+ "time": "2017-04-03T13:19:02+00:00"
},
{
"name": "sebastian/global-state",
- "version": "1.1.1",
+ "version": "2.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
- "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4"
+ "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4",
- "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4",
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4",
+ "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": "^7.0"
},
"require-dev": {
- "phpunit/phpunit": "~4.2"
+ "phpunit/phpunit": "^6.0"
},
"suggest": {
"ext-uopz": "*"
@@ -4155,7 +4751,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0-dev"
+ "dev-master": "2.0-dev"
}
},
"autoload": {
@@ -4178,33 +4774,34 @@
"keywords": [
"global state"
],
- "time": "2015-10-12 03:26:01"
+ "time": "2017-04-27T15:39:26+00:00"
},
{
"name": "sebastian/object-enumerator",
- "version": "2.0.1",
+ "version": "3.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-enumerator.git",
- "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7"
+ "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1311872ac850040a79c3c058bea3e22d0f09cbb7",
- "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5",
+ "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5",
"shasum": ""
},
"require": {
- "php": ">=5.6",
- "sebastian/recursion-context": "~2.0"
+ "php": "^7.0",
+ "sebastian/object-reflector": "^1.1.1",
+ "sebastian/recursion-context": "^3.0"
},
"require-dev": {
- "phpunit/phpunit": "~5"
+ "phpunit/phpunit": "^6.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "3.0.x-dev"
}
},
"autoload": {
@@ -4224,32 +4821,77 @@
],
"description": "Traverses array structures and object graphs to enumerate all referenced objects",
"homepage": "https://github.com/sebastianbergmann/object-enumerator/",
- "time": "2017-02-18 15:18:39"
+ "time": "2017-08-03T12:35:26+00:00"
+ },
+ {
+ "name": "sebastian/object-reflector",
+ "version": "1.1.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/object-reflector.git",
+ "reference": "773f97c67f28de00d397be301821b06708fca0be"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be",
+ "reference": "773f97c67f28de00d397be301821b06708fca0be",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6.0"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.1-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ }
+ ],
+ "description": "Allows reflection of object attributes, including inherited and non-public ones",
+ "homepage": "https://github.com/sebastianbergmann/object-reflector/",
+ "time": "2017-03-29T09:07:27+00:00"
},
{
"name": "sebastian/recursion-context",
- "version": "2.0.0",
+ "version": "3.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
- "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a"
+ "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a",
- "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a",
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
+ "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": "^7.0"
},
"require-dev": {
- "phpunit/phpunit": "~4.4"
+ "phpunit/phpunit": "^6.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "3.0.x-dev"
}
},
"autoload": {
@@ -4277,7 +4919,7 @@
],
"description": "Provides functionality to recursively process PHP variables",
"homepage": "http://www.github.com/sebastianbergmann/recursion-context",
- "time": "2016-11-19 07:33:16"
+ "time": "2017-03-03T06:23:57+00:00"
},
{
"name": "sebastian/resource-operations",
@@ -4319,7 +4961,7 @@
],
"description": "Provides a list of PHP built-in functions that operate on resources",
"homepage": "https://www.github.com/sebastianbergmann/resource-operations",
- "time": "2015-07-28 20:34:47"
+ "time": "2015-07-28T20:34:47+00:00"
},
{
"name": "sebastian/version",
@@ -4362,7 +5004,7 @@
],
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
"homepage": "https://github.com/sebastianbergmann/version",
- "time": "2016-10-03 07:35:21"
+ "time": "2016-10-03T07:35:21+00:00"
},
{
"name": "symfony/dom-crawler",
@@ -4418,62 +5060,47 @@
],
"description": "Symfony DomCrawler Component",
"homepage": "https://symfony.com",
- "time": "2017-01-21 17:13:55"
+ "time": "2017-01-21T17:13:55+00:00"
},
{
- "name": "symfony/yaml",
- "version": "v3.3.2",
+ "name": "theseer/tokenizer",
+ "version": "1.1.0",
"source": {
"type": "git",
- "url": "https://github.com/symfony/yaml.git",
- "reference": "9752a30000a8ca9f4b34b5227d15d0101b96b063"
+ "url": "https://github.com/theseer/tokenizer.git",
+ "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/yaml/zipball/9752a30000a8ca9f4b34b5227d15d0101b96b063",
- "reference": "9752a30000a8ca9f4b34b5227d15d0101b96b063",
+ "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b",
+ "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b",
"shasum": ""
},
"require": {
- "php": ">=5.5.9"
- },
- "require-dev": {
- "symfony/console": "~2.8|~3.0"
- },
- "suggest": {
- "symfony/console": "For validating YAML files using the lint command"
+ "ext-dom": "*",
+ "ext-tokenizer": "*",
+ "ext-xmlwriter": "*",
+ "php": "^7.0"
},
"type": "library",
- "extra": {
- "branch-alias": {
- "dev-master": "3.3-dev"
- }
- },
"autoload": {
- "psr-4": {
- "Symfony\\Component\\Yaml\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
+ "classmap": [
+ "src/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
- "MIT"
+ "BSD-3-Clause"
],
"authors": [
{
- "name": "Fabien Potencier",
- "email": "fabien@symfony.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
+ "name": "Arne Blankerts",
+ "email": "arne@blankerts.de",
+ "role": "Developer"
}
],
- "description": "Symfony Yaml Component",
- "homepage": "https://symfony.com",
- "time": "2017-06-02 22:05:06"
+ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
+ "time": "2017-04-07T12:08:54+00:00"
},
{
"name": "webmozart/assert",
@@ -4523,7 +5150,7 @@
"check",
"validate"
],
- "time": "2016-11-23 20:04:58"
+ "time": "2016-11-23T20:04:58+00:00"
}
],
"aliases": [
diff --git a/config/app.php b/config/app.php
index f80588b..a929dc2 100644
--- a/config/app.php
+++ b/config/app.php
@@ -38,7 +38,8 @@
|
*/
- 'debug' => env('APP_DEBUG', false),
+ // 'debug' => env('APP_DEBUG', false),
+ 'debug' => env('APP_DEBUG', true),
/*
|--------------------------------------------------------------------------
@@ -173,6 +174,7 @@
Backpack\Base\BaseServiceProvider::class,
Backpack\CRUD\CrudServiceProvider::class,
Backpack\Settings\SettingsServiceProvider::class,
+ Backpack\PermissionManager\PermissionManagerServiceProvider::class,
/*
* Application Service Providers...
diff --git a/config/backpack/permissionmanager.php b/config/backpack/permissionmanager.php
new file mode 100644
index 0000000..f3e2133
--- /dev/null
+++ b/config/backpack/permissionmanager.php
@@ -0,0 +1,37 @@
+ 'App\User',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Disallow the user interface for creating/updating permissions or roles.
+ |--------------------------------------------------------------------------
+ | Roles and permissions are used in code by their name
+ | - ex: $user->hasPermissionTo('edit articles');
+ |
+ | So after the developer has entered all permissions and roles, the administrator should either:
+ | - not have access to the panels
+ | or
+ | - creating and updating should be disabled
+ */
+
+ 'allow_permission_create' => true,
+ 'allow_permission_update' => true,
+ 'allow_permission_delete' => true,
+ 'allow_role_create' => true,
+ 'allow_role_update' => true,
+ 'allow_role_delete' => true,
+
+];
diff --git a/config/database.php b/config/database.php
index fd22e8e..8d924b2 100644
--- a/config/database.php
+++ b/config/database.php
@@ -62,7 +62,7 @@
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
- 'strict' => true,
+ 'strict' => false,
'engine' => null,
],
diff --git a/config/laravel-permission.php b/config/laravel-permission.php
new file mode 100644
index 0000000..a3ca446
--- /dev/null
+++ b/config/laravel-permission.php
@@ -0,0 +1,133 @@
+ [
+
+ /*
+ |--------------------------------------------------------------------------
+ | Permission Model
+ |--------------------------------------------------------------------------
+ |
+ | When using the "HasRoles" trait from this package, we need to know which
+ | Eloquent model should be used to retrieve your permissions. Of course, it
+ | is often just the "Permission" model but you may use whatever you like.
+ |
+ | The model you want to use as a Permission model needs to implement the
+ | `Spatie\Permission\Contracts\Permission` contract.
+ |
+ */
+
+ 'permission' => Backpack\PermissionManager\app\Models\Permission::class,
+
+ /*
+ |--------------------------------------------------------------------------
+ | Role Model
+ |--------------------------------------------------------------------------
+ |
+ | When using the "HasRoles" trait from this package, we need to know which
+ | Eloquent model should be used to retrieve your roles. Of course, it
+ | is often just the "Role" model but you may use whatever you like.
+ |
+ | The model you want to use as a Role model needs to implement the
+ | `Spatie\Permission\Contracts\Role` contract.
+ |
+ */
+
+ 'role' => Backpack\PermissionManager\app\Models\Role::class,
+
+ ],
+
+ /*
+ |--------------------------------------------------------------------------
+ | Authorization Tables
+ |--------------------------------------------------------------------------
+ */
+
+ 'table_names' => [
+
+ /*
+ |--------------------------------------------------------------------------
+ | Users Table
+ |--------------------------------------------------------------------------
+ |
+ | The table that your application uses for users. This table's model will
+ | be using the "HasRoles" and "HasPermissions" traits.
+ |
+ */
+ 'users' => 'users',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Roles Table
+ |--------------------------------------------------------------------------
+ |
+ | When using the "HasRoles" trait from this package, we need to know which
+ | table should be used to retrieve your roles. We have chosen a basic
+ | default value but you may easily change it to any table you like.
+ |
+ */
+
+ 'roles' => 'roles',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Permissions Table
+ |--------------------------------------------------------------------------
+ |
+ | When using the "HasRoles" trait from this package, we need to know which
+ | table should be used to retrieve your permissions. We have chosen a basic
+ | default value but you may easily change it to any table you like.
+ |
+ */
+
+ 'permissions' => 'permissions',
+
+ /*
+ |--------------------------------------------------------------------------
+ | User Permissions Table
+ |--------------------------------------------------------------------------
+ |
+ | When using the "HasRoles" trait from this package, we need to know which
+ | table should be used to retrieve your users permissions. We have chosen a
+ | basic default value but you may easily change it to any table you like.
+ |
+ */
+
+ 'user_has_permissions' => 'permission_users',
+
+ /*
+ |--------------------------------------------------------------------------
+ | User Roles Table
+ |--------------------------------------------------------------------------
+ |
+ | When using the "HasRoles" trait from this package, we need to know which
+ | table should be used to retrieve your users roles. We have chosen a
+ | basic default value but you may easily change it to any table you like.
+ |
+ */
+
+ 'user_has_roles' => 'role_users',
+
+ /*
+ |--------------------------------------------------------------------------
+ | Role Permissions Table
+ |--------------------------------------------------------------------------
+ |
+ | When using the "HasRoles" trait from this package, we need to know which
+ | table should be used to retrieve your roles permissions. We have chosen a
+ | basic default value but you may easily change it to any table you like.
+ |
+ */
+
+ 'role_has_permissions' => 'permission_roles',
+
+ ],
+
+];
diff --git a/database/migrations/2017_07_03_000000_create_users_table.php b/database/migrations/2017_07_03_000000_create_users_table.php
index 679e193..3eb2060 100644
--- a/database/migrations/2017_07_03_000000_create_users_table.php
+++ b/database/migrations/2017_07_03_000000_create_users_table.php
@@ -20,8 +20,6 @@ public function up()
$table->string('email', 255);
$table->string('password', 255);
$table->string('salutation', 45)->nullable()->default(null);
- $table->string('first_name', 100)->nullable()->default(null);
- $table->string('last_name', 100)->nullable()->default(null);
$table->date('birthday')->nullable()->default(null);
$table->tinyInteger('gender')->nullable()->default(null);
$table->tinyInteger('active')->default(0);
@@ -41,4 +39,4 @@ public function down()
{
Schema::dropIfExists('users');
}
-}
+}
\ No newline at end of file
diff --git a/database/migrations/2017_07_03_000001_create_carriers_table.php b/database/migrations/2017_07_03_000001_create_carriers_table.php
index 95ebe9c..75d9268 100644
--- a/database/migrations/2017_07_03_000001_create_carriers_table.php
+++ b/database/migrations/2017_07_03_000001_create_carriers_table.php
@@ -17,7 +17,7 @@ public function up()
$table->engine = 'InnoDB';
$table->increments('id');
$table->string('name', 45)->nullable()->default(null);
- $table->decimal('price', 13, 0);
+ $table->decimal('price', 13, 2);
$table->string('delivery_text', 255)->nullable()->default(null);
$table->string('logo', 255)->nullable()->default(null);
});
diff --git a/database/migrations/2017_07_03_000006_create_taxes_table.php b/database/migrations/2017_07_03_000006_create_taxes_table.php
index f550a64..2246d6f 100644
--- a/database/migrations/2017_07_03_000006_create_taxes_table.php
+++ b/database/migrations/2017_07_03_000006_create_taxes_table.php
@@ -17,7 +17,7 @@ public function up()
$table->engine = 'InnoDB';
$table->increments('id');
$table->string('name', 255)->nullable()->default(null);
- $table->decimal('value', 13, 6)->nullable()->default('0.000000');
+ $table->decimal('value', 13, 2)->nullable()->default('0.00');
});
}
diff --git a/database/migrations/2017_07_03_000007_create_notification_templates_table.php b/database/migrations/2017_07_03_000007_create_notification_templates_table.php
index c8ff3ec..33070e7 100644
--- a/database/migrations/2017_07_03_000007_create_notification_templates_table.php
+++ b/database/migrations/2017_07_03_000007_create_notification_templates_table.php
@@ -17,7 +17,9 @@ public function up()
$table->engine = 'InnoDB';
$table->increments('id');
$table->string('name', 255)->nullable()->default(null);
- $table->longText('content')->nullable()->default(null);
+ $table->string('slug', 255)->unique()->nullable()->default(null);
+ $table->string('model', 255)->nullable()->default(null);
+ $table->longText('body')->nullable()->default(null);
});
}
diff --git a/database/migrations/2017_07_03_000009_create_order_statuses_table.php b/database/migrations/2017_07_03_000009_create_order_statuses_table.php
index 1255462..7851200 100644
--- a/database/migrations/2017_07_03_000009_create_order_statuses_table.php
+++ b/database/migrations/2017_07_03_000009_create_order_statuses_table.php
@@ -17,6 +17,7 @@ public function up()
$table->engine = 'InnoDB';
$table->increments('id');
$table->string('name', 50)->nullable()->default(null);
+ $table->integer('notification')->default(1);
});
}
diff --git a/database/migrations/2017_07_03_000015_create_addresses_table.php b/database/migrations/2017_07_03_000015_create_addresses_table.php
index 54ac66b..2c56088 100644
--- a/database/migrations/2017_07_03_000015_create_addresses_table.php
+++ b/database/migrations/2017_07_03_000015_create_addresses_table.php
@@ -18,8 +18,7 @@ public function up()
$table->increments('id');
$table->integer('user_id')->unsigned();
$table->integer('country_id')->unsigned();
- $table->string('first_name', 100)->nullable()->default(null);
- $table->string('last_name', 45)->nullable()->default(null);
+ $table->string('name', 100)->nullable()->default(null);
$table->string('address1', 255)->nullable()->default(null);
$table->string('address2', 255)->nullable()->default(null);
$table->string('county', 255)->nullable()->default(null);
diff --git a/database/migrations/2017_07_03_000017_create_companies_table.php b/database/migrations/2017_07_03_000017_create_companies_table.php
index 6edb0df..44e26af 100644
--- a/database/migrations/2017_07_03_000017_create_companies_table.php
+++ b/database/migrations/2017_07_03_000017_create_companies_table.php
@@ -18,6 +18,10 @@ public function up()
$table->increments('id');
$table->integer('user_id')->unsigned();
$table->string('name', 250)->nullable()->default(null);
+ $table->string('address1', 255)->nullable()->default(null);
+ $table->string('address2', 255)->nullable()->default(null);
+ $table->string('county', 255)->nullable()->default(null);
+ $table->string('city', 255)->nullable()->default(null);
$table->string('tin', 100)->nullable()->default(null)->comment('Tax Identification Number');
$table->string('trn', 100)->nullable()->default(null)->comment('Trade Registry Number');
diff --git a/database/migrations/2017_07_03_000018_create_products_table.php b/database/migrations/2017_07_03_000018_create_products_table.php
index 6e7756a..484dd74 100644
--- a/database/migrations/2017_07_03_000018_create_products_table.php
+++ b/database/migrations/2017_07_03_000018_create_products_table.php
@@ -21,7 +21,7 @@ public function up()
$table->string('name', 255)->nullable()->default(null);
$table->longText('description')->nullable()->default(null);
$table->integer('tax_id')->unsigned();
- $table->decimal('price', 13, 6)->nullable()->default(null);
+ $table->decimal('price', 13, 2)->nullable()->default(null);
$table->string('sku', 100);
$table->integer('stock')->nullable()->default('0');
$table->tinyInteger('active')->default('0');
diff --git a/database/migrations/2017_07_03_000020_create_orders_table.php b/database/migrations/2017_07_03_000020_create_orders_table.php
index 7ffdcf8..025a111 100644
--- a/database/migrations/2017_07_03_000020_create_orders_table.php
+++ b/database/migrations/2017_07_03_000020_create_orders_table.php
@@ -19,22 +19,21 @@ public function up()
$table->integer('user_id')->unsigned();
$table->integer('status_id')->unsigned();
$table->integer('carrier_id')->unsigned();
- $table->integer('shipping_address_id')->unsigned();
- $table->integer('billing_address_id')->unsigned();
+ $table->integer('shipping_address_id')->unsigned()->nullable()->default(null);
+ $table->integer('billing_address_id')->unsigned()->nullable()->default(null);
+ $table->integer('billing_company_id')->unsigned()->nullable()->default(null);
$table->integer('currency_id')->unsigned();
$table->mediumText('comment')->nullable()->default(null);
$table->string('shipping_no', 50)->nullable()->default(null);
$table->string('invoice_no', 50)->nullable()->default(null);
$table->dateTime('invoice_date')->nullable()->default(null);
$table->dateTime('delivery_date')->nullable()->default(null);
- $table->text('shipping_address')->nullable()->default(null);
- $table->text('billing_address')->nullable()->default(null);
- $table->decimal('total_discount', 13, 6)->nullable()->default(null);
- $table->decimal('total_discount_tax', 13, 6)->nullable()->default(null);
- $table->decimal('total_shipping', 13, 6)->nullable()->default(null);
- $table->decimal('total_shipping_tax', 13, 6)->nullable()->default(null);
- $table->decimal('total', 13, 6)->nullable()->default(null);
- $table->decimal('total_tax', 13, 6)->nullable()->default(null);
+ $table->decimal('total_discount', 13, 2)->nullable()->default(null);
+ $table->decimal('total_discount_tax', 13, 2)->nullable()->default(null);
+ $table->decimal('total_shipping', 13, 2)->nullable()->default(null);
+ $table->decimal('total_shipping_tax', 13, 2)->nullable()->default(null);
+ $table->decimal('total', 13, 2)->nullable()->default(null);
+ $table->decimal('total_tax', 13, 2)->nullable()->default(null);
$table->nullableTimestamps();
diff --git a/database/migrations/2017_07_03_000021_create_order_product_table.php b/database/migrations/2017_07_03_000021_create_order_product_table.php
index d4bd5f0..4886cb3 100644
--- a/database/migrations/2017_07_03_000021_create_order_product_table.php
+++ b/database/migrations/2017_07_03_000021_create_order_product_table.php
@@ -17,10 +17,12 @@ public function up()
$table->engine = 'InnoDB';
$table->integer('product_id')->unsigned();
$table->integer('order_id')->unsigned();
- $table->decimal('price', 13, 6)->nullable()->default(null);
+ $table->string('name', 255)->nullable()->default(null);
+ $table->string('sku', 100);
+ $table->decimal('price', 13, 2)->nullable()->default(null);
+ $table->decimal('price_with_tax', 13, 2)->nullable()->default(null);
$table->integer('quantity');
-
$table->foreign('order_id')
->references('id')->on('orders')
->onDelete('no action')
diff --git a/database/migrations/2017_07_03_000024_create_order_status_history_table.php b/database/migrations/2017_07_03_000024_create_order_status_history_table.php
index 1ecab0d..ab51336 100644
--- a/database/migrations/2017_07_03_000024_create_order_status_history_table.php
+++ b/database/migrations/2017_07_03_000024_create_order_status_history_table.php
@@ -18,8 +18,6 @@ public function up()
$table->increments('id');
$table->integer('order_id')->unsigned();
$table->integer('status_id')->unsigned();
- $table->integer('user_id')->unsigned();
- $table->dateTime('date')->nullable()->default(null);
$table->nullableTimestamps();
@@ -32,11 +30,6 @@ public function up()
->references('id')->on('orders')
->onDelete('no action')
->onUpdate('no action');
-
- $table->foreign('user_id')
- ->references('id')->on('users')
- ->onDelete('no action')
- ->onUpdate('no action');
});
}
diff --git a/database/migrations/2017_07_03_000026_create_permission_tables.php b/database/migrations/2017_07_03_000026_create_permission_tables.php
new file mode 100644
index 0000000..049c928
--- /dev/null
+++ b/database/migrations/2017_07_03_000026_create_permission_tables.php
@@ -0,0 +1,96 @@
+increments('id');
+ $table->string('name')->unique();
+ $table->timestamps();
+ });
+
+ Schema::create($config['permissions'], function (Blueprint $table) {
+ $table->increments('id');
+ $table->string('name')->unique();
+ $table->timestamps();
+ });
+
+ Schema::create($config['user_has_permissions'], function (Blueprint $table) use ($config) {
+ $table->integer('user_id')->unsigned();
+ $table->integer('permission_id')->unsigned();
+
+ $table->foreign('user_id')
+ ->references('id')
+ ->on($config['users'])
+ ->onDelete('cascade');
+
+ $table->foreign('permission_id')
+ ->references('id')
+ ->on($config['permissions'])
+ ->onDelete('cascade');
+
+ $table->primary(['user_id', 'permission_id']);
+ });
+
+ Schema::create($config['user_has_roles'], function (Blueprint $table) use ($config) {
+ $table->integer('role_id')->unsigned();
+ $table->integer('user_id')->unsigned();
+
+ $table->foreign('role_id')
+ ->references('id')
+ ->on($config['roles'])
+ ->onDelete('cascade');
+
+ $table->foreign('user_id')
+ ->references('id')
+ ->on($config['users'])
+ ->onDelete('cascade');
+
+ $table->primary(['role_id', 'user_id']);
+
+ Schema::create($config['role_has_permissions'], function (Blueprint $table) use ($config) {
+ $table->integer('permission_id')->unsigned();
+ $table->integer('role_id')->unsigned();
+
+ $table->foreign('permission_id')
+ ->references('id')
+ ->on($config['permissions'])
+ ->onDelete('cascade');
+
+ $table->foreign('role_id')
+ ->references('id')
+ ->on($config['roles'])
+ ->onDelete('cascade');
+
+ $table->primary(['permission_id', 'role_id']);
+ });
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ $config = config('laravel-permission.table_names');
+
+ Schema::drop($config['role_has_permissions']);
+ Schema::drop($config['user_has_roles']);
+ Schema::drop($config['user_has_permissions']);
+ Schema::drop($config['roles']);
+ Schema::drop($config['permissions']);
+ }
+}
diff --git a/database/migrations/2017_08_07_091623_create_cart_rules_table.php b/database/migrations/2017_08_07_091623_create_cart_rules_table.php
new file mode 100644
index 0000000..1a8bd6a
--- /dev/null
+++ b/database/migrations/2017_08_07_091623_create_cart_rules_table.php
@@ -0,0 +1,79 @@
+increments('id');
+ $table->string('name', 255);
+ $table->string('code', 100);
+ $table->tinyInteger('priority');
+ $table->dateTime('start_date');
+ $table->dateTime('expiration_date');
+ $table->boolean('status')->default(0);
+ $table->boolean('highlight')->default(0);
+ $table->integer('minimum_amount')->nullable()->default(0);
+ $table->boolean('free_delivery')->default(0);
+ $table->integer('total_available')->nullable();
+ $table->integer('total_available_each_user')->nullable();
+ $table->string('promo_label', 255)->nullable();
+ $table->string('promo_text', 1000)->nullable();
+ $table->integer('multiply_gift')->nullable()->default(1);
+ $table->integer('min_nr_products')->nullable()->default(0);
+ $table->enum('discount_type', array('Percent - order',
+ 'Percent - selected products', 'Percent - cheapest product',
+ 'Percent - most expensive product', 'Amount - order'));
+ $table->decimal('reduction_amount', 13, 2)->nullable()->default(0);
+ $table->integer('reduction_currency_id')->unsigned()->nullable();
+ $table->integer('minimum_amount_currency_id')->unsigned()->nullable();
+ $table->integer('gift_product_id')->unsigned()->nullable();
+ $table->integer('customer_id')->unsigned()->nullable();
+
+ // Foreign keys
+ $table->foreign('customer_id')
+ ->references('id')->on('users')
+ ->onDelete('no action')
+ ->onUpdate('no action');
+
+ $table->foreign('gift_product_id')
+ ->references('id')->on('products')
+ ->onDelete('no action')
+ ->onUpdate('no action');
+
+ $table->foreign('reduction_currency_id')
+ ->references('id')->on('currencies')
+ ->onDelete('no action')
+ ->onUpdate('no action');
+
+ $table->foreign('minimum_amount_currency_id')
+ ->references('id')->on('currencies')
+ ->onDelete('no action')
+ ->onUpdate('no action');
+
+
+ $table->nullableTimestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('cart_rules');
+ }
+}
diff --git a/database/migrations/2017_08_07_102321_create_cart_rules_customers_table.php b/database/migrations/2017_08_07_102321_create_cart_rules_customers_table.php
new file mode 100644
index 0000000..dd884ac
--- /dev/null
+++ b/database/migrations/2017_08_07_102321_create_cart_rules_customers_table.php
@@ -0,0 +1,46 @@
+engine = 'InnoDB';
+ $table->integer('cart_rule_id')->unsigned();
+ $table->integer('customer_id')->unsigned();
+
+
+ $table->foreign('cart_rule_id')
+ ->references('id')->on('cart_rules')
+ ->onDelete('no action')
+ ->onUpdate('no action');
+
+ $table->foreign('customer_id')
+ ->references('id')->on('users')
+ ->onDelete('no action')
+ ->onUpdate('no action');
+
+ $table->nullableTimestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('cart_rules_customers');
+ }
+}
diff --git a/database/migrations/2017_08_07_102633_create_cart_rules_categories_table.php b/database/migrations/2017_08_07_102633_create_cart_rules_categories_table.php
new file mode 100644
index 0000000..0119094
--- /dev/null
+++ b/database/migrations/2017_08_07_102633_create_cart_rules_categories_table.php
@@ -0,0 +1,45 @@
+engine = 'InnoDB';
+ $table->integer('cart_rule_id')->unsigned();
+ $table->integer('category_id')->unsigned();
+
+ $table->foreign('cart_rule_id')
+ ->references('id')->on('cart_rules')
+ ->onDelete('no action')
+ ->onUpdate('no action');
+
+ $table->foreign('category_id')
+ ->references('id')->on('categories')
+ ->onDelete('no action')
+ ->onUpdate('no action');
+ $table->nullableTimestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('cart_rules_categories');
+ }
+}
diff --git a/database/migrations/2017_08_07_103148_create_cart_rules_products_table.php b/database/migrations/2017_08_07_103148_create_cart_rules_products_table.php
new file mode 100644
index 0000000..3d5b208
--- /dev/null
+++ b/database/migrations/2017_08_07_103148_create_cart_rules_products_table.php
@@ -0,0 +1,45 @@
+engine = 'InnoDB';
+ $table->integer('cart_rule_id')->unsigned();
+ $table->integer('product_id')->unsigned();
+
+ $table->foreign('cart_rule_id')
+ ->references('id')->on('cart_rules')
+ ->onDelete('no action')
+ ->onUpdate('no action');
+
+ $table->foreign('product_id')
+ ->references('id')->on('products')
+ ->onDelete('no action')
+ ->onUpdate('no action');
+ $table->nullableTimestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('cart_rules_products');
+ }
+}
diff --git a/database/migrations/2017_08_07_111214_create_cart_rules_product_groups_table.php b/database/migrations/2017_08_07_111214_create_cart_rules_product_groups_table.php
new file mode 100644
index 0000000..93e1699
--- /dev/null
+++ b/database/migrations/2017_08_07_111214_create_cart_rules_product_groups_table.php
@@ -0,0 +1,45 @@
+engine = 'InnoDB';
+ $table->integer('cart_rule_id')->unsigned();
+ $table->integer('product_group_id')->unsigned();
+
+ $table->foreign('cart_rule_id')
+ ->references('id')->on('cart_rules')
+ ->onDelete('no action')
+ ->onUpdate('no action');
+
+ $table->foreign('product_group_id')
+ ->references('id')->on('product_groups')
+ ->onDelete('no action')
+ ->onUpdate('no action');
+ $table->nullableTimestamps();
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('cart_rules_product_groups');
+ }
+}
diff --git a/database/migrations/2017_08_07_111321_create_cart_rules_combinations_table.php b/database/migrations/2017_08_07_111321_create_cart_rules_combinations_table.php
new file mode 100644
index 0000000..dc2e3f0
--- /dev/null
+++ b/database/migrations/2017_08_07_111321_create_cart_rules_combinations_table.php
@@ -0,0 +1,47 @@
+engine = 'InnoDB';
+ $table->integer('cart_rule_id_1')->unsigned();
+ $table->integer('cart_rule_id_2')->unsigned();
+
+ $table->foreign('cart_rule_id_1')
+ ->references('id')->on('cart_rules')
+ ->onDelete('no action')
+ ->onUpdate('no action');
+
+ $table->foreign('cart_rule_id_2')
+ ->references('id')->on('cart_rules')
+ ->onDelete('no action')
+ ->onUpdate('no action');
+
+ $table->nullableTimestamps();
+
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('cart_rules_combinations');
+ }
+}
diff --git a/database/migrations/2017_08_17_131600_create_specific_prices_table.php b/database/migrations/2017_08_17_131600_create_specific_prices_table.php
new file mode 100644
index 0000000..21070de
--- /dev/null
+++ b/database/migrations/2017_08_17_131600_create_specific_prices_table.php
@@ -0,0 +1,42 @@
+engine = 'InnoDB';
+ $table->increments('id');
+ $table->decimal('reduction', 13, 2)->nullable()->default(0);
+ $table->enum('discount_type', array('Amount', 'Percent'));
+ $table->dateTime('start_date');
+ $table->dateTime('expiration_date');
+ $table->integer('product_id')->unsigned()->nullable();
+
+ // Foreign keys
+ $table->foreign('product_id')
+ ->references('id')->on('products')
+ ->onDelete('no action')
+ ->onUpdate('no action');
+ });
+ }
+
+ /**
+ * Reverse the migrations.
+ *
+ * @return void
+ */
+ public function down()
+ {
+ Schema::dropIfExists('specific_prices');
+ }
+}
diff --git a/database/migrations/2018_01_10_120321_delete_notifications_table.php b/database/migrations/2018_01_10_120321_delete_notifications_table.php
new file mode 100644
index 0000000..d74bc95
--- /dev/null
+++ b/database/migrations/2018_01_10_120321_delete_notifications_table.php
@@ -0,0 +1,31 @@
+engine = 'InnoDB';
+ $table->increments('id');
+ });
+ }
+}
diff --git a/database/migrations/2018_01_23_153705_modify_orders_table_created_at_required.php b/database/migrations/2018_01_23_153705_modify_orders_table_created_at_required.php
new file mode 100644
index 0000000..d51921f
--- /dev/null
+++ b/database/migrations/2018_01_23_153705_modify_orders_table_created_at_required.php
@@ -0,0 +1,31 @@
+delete();
+
+ $addresses = [
+ [
+ 'user_id' => 2,
+ 'country_id' => 178,
+ 'name' => 'Jerry Williams',
+ 'address1' => 'South Fabien Street',
+ 'address2' => 'No. 34',
+ 'county' => 'Bucharest',
+ 'city' => 'Bucharest',
+ 'postal_code' => '123456',
+ 'phone' => '+413-26-9811311',
+ 'mobile_phone' => '+257-35-5785588',
+ 'comment' => 'Lorem ipsum dolor sit amet.',
+ 'created_at' => \Carbon\Carbon::now()->toDateTimeString()
+
+ ],
+ ];
+
+ DB::table('addresses')->insert($addresses);
+ }
+}
diff --git a/database/seeds/CarriersTableSeeder.php b/database/seeds/CarriersTableSeeder.php
new file mode 100644
index 0000000..2db9b4e
--- /dev/null
+++ b/database/seeds/CarriersTableSeeder.php
@@ -0,0 +1,27 @@
+delete();
+
+ $carriers = [
+ [
+ 'name' => 'Best Express',
+ 'price' => '20',
+ 'delivery_text' => 'Lorem Ipsum is simply dummy text of the printing and typesetting industry.',
+ 'logo' => null,
+ ],
+ ];
+
+ DB::table('carriers')->insert($carriers);
+ }
+}
diff --git a/database/seeds/CompaniesTableSeeder.php b/database/seeds/CompaniesTableSeeder.php
new file mode 100644
index 0000000..43f6192
--- /dev/null
+++ b/database/seeds/CompaniesTableSeeder.php
@@ -0,0 +1,32 @@
+delete();
+
+ $companies = [
+ [
+ 'user_id' => 2,
+ 'name' => 'Company Name',
+ 'address1' => 'Flowers street',
+ 'address2' => 'No. 25',
+ 'county' => 'Bucharest',
+ 'city' => 'Bucharest',
+ 'tin' => '12345678',
+ 'trn' => 'J1/123/2000',
+
+ ],
+ ];
+
+ DB::table('companies')->insert($companies);
+ }
+}
diff --git a/database/seeds/CurrenciesTableSeeder.php b/database/seeds/CurrenciesTableSeeder.php
new file mode 100644
index 0000000..9a7b93f
--- /dev/null
+++ b/database/seeds/CurrenciesTableSeeder.php
@@ -0,0 +1,27 @@
+delete();
+
+ $currencies = [
+ [
+ 'name' => 'Euro',
+ 'iso' => 'EUR',
+ 'value' => '1',
+ 'default' => '1',
+ ],
+ ];
+
+ DB::table('currencies')->insert($currencies);
+ }
+}
diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php
index db80a60..81e8d64 100644
--- a/database/seeds/DatabaseSeeder.php
+++ b/database/seeds/DatabaseSeeder.php
@@ -32,5 +32,32 @@ public function run()
$this->call(ProductsTableSeeder::class);
$this->call(CategoryProductTableSeeder::class);
$this->call(AttributeProductValueTableSeeder::class);
+
+ // Seed permissions
+ $this->call(PermissionsTableSeeder::class);
+ $this->call(RolesTableSeeder::class);
+ $this->call(PermissionRolesTableSeeder::class);
+ $this->call(RoleUsersTableSeeder::class);
+
+ // Seed currencies
+ $this->call(CurrenciesTableSeeder::class);
+
+ // Seed carriers
+ $this->call(CarriersTableSeeder::class);
+
+ // Seed order statuses
+ $this->call(OrderStatusesTableSeeder::class);
+
+ // Seed order statuses
+ $this->call(NotificationTemplatesTableSeeder::class);
+
+ // Seed client address
+ $this->call(AddressesTableSeeder::class);
+
+ // Seed client company
+ $this->call(CompaniesTableSeeder::class);
+
+ // Orders
+ $this->call(OrdersTableSeeder::class);
}
}
diff --git a/database/seeds/NotificationTemplatesTableSeeder.php b/database/seeds/NotificationTemplatesTableSeeder.php
new file mode 100644
index 0000000..491030c
--- /dev/null
+++ b/database/seeds/NotificationTemplatesTableSeeder.php
@@ -0,0 +1,31 @@
+delete();
+
+ $notificationTemplates = [
+ [
+ 'name' => 'Order Status Changed',
+ 'slug' => 'order-status-changed',
+ 'model' => 'Order',
+ 'body' => 'Hello, {{ userName }},
+ Your order status was changed to {{ status }}.
+
+ Best,
+ eStarter team.
',
+ ],
+ ];
+
+ DB::table('notification_templates')->insert($notificationTemplates);
+ }
+}
diff --git a/database/seeds/OrderStatusesTableSeeder.php b/database/seeds/OrderStatusesTableSeeder.php
new file mode 100644
index 0000000..ec89f76
--- /dev/null
+++ b/database/seeds/OrderStatusesTableSeeder.php
@@ -0,0 +1,37 @@
+delete();
+
+ $orderStatuses = [
+ [
+ 'name' => 'Pending',
+ 'notification' => 1,
+ ],
+ [
+ 'name' => 'Processed',
+ 'notification' => 1,
+ ],
+ [
+ 'name' => 'Delivered',
+ 'notification' => 1,
+ ],
+ [
+ 'name' => 'Done',
+ 'notification' => 0,
+ ],
+ ];
+
+ DB::table('order_statuses')->insert($orderStatuses);
+ }
+}
diff --git a/database/seeds/OrdersTableSeeder.php b/database/seeds/OrdersTableSeeder.php
new file mode 100644
index 0000000..c5b2d3b
--- /dev/null
+++ b/database/seeds/OrdersTableSeeder.php
@@ -0,0 +1,73 @@
+delete();
+
+ $orders = [
+ [
+ 'user_id' => 2,
+ 'status_id' => 1,
+ 'carrier_id' => 1,
+ 'shipping_address_id' => 1,
+ 'billing_address_id' => 1,
+ 'billing_company_id' => 1,
+ 'currency_id' => 1,
+ 'comment' => 'Lorem ipsum dolor sit amet.',
+ 'shipping_no' => '123456',
+ 'invoice_no' => '654321',
+ 'invoice_date' => \Carbon\Carbon::now()->toDateTimeString(),
+ 'delivery_date' => \Carbon\Carbon::now()->addDays(3)->toDateTimeString(),
+ 'total_discount' => 0,
+ 'total_discount_tax' => 0,
+ 'total_shipping' => 20,
+ 'total_shipping_tax' => 20,
+ 'total' => '42.73',
+ 'total_tax' => 45,
+ 'created_at' => \Carbon\Carbon::now()->toDateTimeString()
+
+ ],
+ ];
+
+ DB::table('orders')->insert($orders);
+
+ // Add products to order
+ DB::table('order_product')->delete();
+
+ $orderProducts = [
+ [
+ 'product_id' => 1,
+ 'order_id' => 1,
+ 'name' => 'T-Shirt',
+ 'sku' => 1000,
+ 'price' => '22.73',
+ 'price_with_tax' => 25,
+ 'quantity' => 1
+ ]
+ ];
+
+ DB::table('order_product')->insert($orderProducts);
+
+ // Add order status history
+ DB::table('order_status_history')->delete();
+
+ $orderStatusHistory = [
+ [
+ 'order_id' => 1,
+ 'status_id' => 1,
+ 'created_at' => \Carbon\Carbon::now()->toDateTimeString()
+ ]
+ ];
+
+ DB::table('order_status_history')->insert($orderStatusHistory);
+ }
+}
diff --git a/database/seeds/PermissionRolesTableSeeder.php b/database/seeds/PermissionRolesTableSeeder.php
new file mode 100644
index 0000000..70d1e8f
--- /dev/null
+++ b/database/seeds/PermissionRolesTableSeeder.php
@@ -0,0 +1,27 @@
+delete();
+
+ $permissions = DB::table('permissions')->get();
+
+ foreach ($permissions as $permission) {
+ $permissionRoles[] = [
+ 'permission_id' => $permission->id,
+ 'role_id' => 1
+ ];
+ }
+
+ DB::table('permission_roles')->insert($permissionRoles);
+ }
+}
diff --git a/database/seeds/PermissionsTableSeeder.php b/database/seeds/PermissionsTableSeeder.php
new file mode 100644
index 0000000..47c0d3a
--- /dev/null
+++ b/database/seeds/PermissionsTableSeeder.php
@@ -0,0 +1,83 @@
+delete();
+
+ $permissions = [
+ ['name' => 'list_categories'],
+ ['name' => 'create_category'],
+ ['name' => 'update_category'],
+ ['name' => 'delete_category'],
+ ['name' => 'reorder_categories'],
+
+ ['name' => 'list_products'],
+ ['name' => 'create_product'],
+ ['name' => 'update_product'],
+ ['name' => 'clone_product'],
+ ['name' => 'delete_product'],
+
+ ['name' => 'list_attributes'],
+ ['name' => 'create_attribute'],
+ ['name' => 'update_attribute'],
+ ['name' => 'delete_attribute'],
+
+ ['name' => 'list_attribute_sets'],
+ ['name' => 'create_attribute_set'],
+ ['name' => 'update_attribute_set'],
+ ['name' => 'delete_attribute_set'],
+
+ ['name' => 'list_currencies'],
+ ['name' => 'create_currency'],
+ ['name' => 'update_currency'],
+ ['name' => 'delete_currency'],
+
+ ['name' => 'list_carriers'],
+ ['name' => 'create_carrier'],
+ ['name' => 'update_carrier'],
+ ['name' => 'delete_carrier'],
+
+ ['name' => 'list_taxes'],
+ ['name' => 'create_tax'],
+ ['name' => 'update_tax'],
+ ['name' => 'delete_tax'],
+
+ ['name' => 'list_order_statuses'],
+ ['name' => 'create_order_status'],
+ ['name' => 'update_order_status'],
+ ['name' => 'delete_order_status'],
+
+ ['name' => 'list_clients'],
+ ['name' => 'create_client'],
+ ['name' => 'update_client'],
+ ['name' => 'delete_client'],
+
+ ['name' => 'list_cart_rules'],
+ ['name' => 'create_cart_rule'],
+ ['name' => 'update_cart_rule'],
+ ['name' => 'delete_cart_rule'],
+
+
+ ['name' => 'list_specific_prices'],
+ ['name' => 'create_specific_price'],
+ ['name' => 'update_specific_price'],
+ ['name' => 'delete_specific_price'],
+
+ ['name' => 'list_notification_templates'],
+ ['name' => 'create_notification_template'],
+ ['name' => 'update_notification_template'],
+ ['name' => 'delete_notification_template'],
+ ];
+
+ DB::table('permissions')->insert($permissions);
+ }
+}
diff --git a/database/seeds/RoleUsersTableSeeder.php b/database/seeds/RoleUsersTableSeeder.php
new file mode 100644
index 0000000..0abb6b8
--- /dev/null
+++ b/database/seeds/RoleUsersTableSeeder.php
@@ -0,0 +1,31 @@
+delete();
+
+ $roleUsers = [
+ // Set admin role for user id 1
+ [
+ 'role_id' => 1,
+ 'user_id' => 1
+ ],
+ // Set client role for user id 2
+ [
+ 'role_id' => 2,
+ 'user_id' => 2
+ ],
+ ];
+
+ DB::table('role_users')->insert($roleUsers);
+ }
+}
diff --git a/database/seeds/RolesTableSeeder.php b/database/seeds/RolesTableSeeder.php
new file mode 100644
index 0000000..fa62219
--- /dev/null
+++ b/database/seeds/RolesTableSeeder.php
@@ -0,0 +1,23 @@
+delete();
+
+ $roles = [
+ ['name' => 'Administrator'],
+ ['name' => 'Client'],
+ ];
+
+ DB::table('roles')->insert($roles);
+ }
+}
diff --git a/database/seeds/UsersTableSeeder.php b/database/seeds/UsersTableSeeder.php
index 891bfb1..bc5216a 100644
--- a/database/seeds/UsersTableSeeder.php
+++ b/database/seeds/UsersTableSeeder.php
@@ -14,15 +14,28 @@ public function run()
DB::table('users')->delete();
$users = [
- 'name' => 'Ecommerce Admin',
- 'email' => 'admin@ecommerce.com',
- 'password' => '$2y$10$QNf5iYdhmFxVn7OMrtZJQemkt46VPLZtGmU6ncJk3LERyd1r/zSqW', // Encrypted password is: adminpass
- 'salutation' => 'Mr.',
- 'first_name' => 'Admin',
- 'last_name' => 'Ecommerce',
- 'birthday' => \Carbon\Carbon::now()->toDateString(),
- 'gender' => 1,
- 'active' => 1,
+ // Admin
+ [
+ 'name' => 'Admin',
+ 'email' => 'admin@ecommerce.com',
+ 'password' => '$2y$10$QNf5iYdhmFxVn7OMrtZJQemkt46VPLZtGmU6ncJk3LERyd1r/zSqW', // Encrypted password is: adminpass
+ 'salutation' => 'Mr.',
+ 'birthday' => \Carbon\Carbon::now()->toDateString(),
+ 'gender' => 1,
+ 'active' => 1,
+ 'created_at' => \Carbon\Carbon::now()->toDateTimeString()
+ ],
+ // Client
+ [
+ 'name' => 'Client',
+ 'email' => 'client@ecommerce.com',
+ 'password' => '$2y$10$xxgI.2pRrN1H6LuxYJz.0.653AyqU4E1302xe.N4MOhv3uHM0Uqo2', // Encrypted password is: clientpass
+ 'salutation' => 'Mr.',
+ 'birthday' => \Carbon\Carbon::now()->subYears(20)->toDateString(),
+ 'gender' => 1,
+ 'active' => 1,
+ 'created_at' => \Carbon\Carbon::now()->toDateTimeString()
+ ],
];
DB::table('users')->insert($users);
diff --git a/public/css/custom.css b/public/css/custom.css
index 156faff..b08e179 100644
--- a/public/css/custom.css
+++ b/public/css/custom.css
@@ -16,7 +16,19 @@
margin-top: 1px !important;
}
+.select2-container--bootstrap .select2-selection--single .select2-selection__rendered {
+ padding-top: 4px !important;
+}
+
.tr-current-product {
background-color: #e1e9fb !important;
font-weight: bold;
+}
+
+.table tbody>tr>td.vertical-align-middle {
+ vertical-align: middle;
+}
+
+.font-12 {
+ font-size: 12px;
}
\ No newline at end of file
diff --git a/public/css/toggle-switch.css b/public/css/toggle-switch.css
new file mode 100644
index 0000000..3b73e7b
--- /dev/null
+++ b/public/css/toggle-switch.css
@@ -0,0 +1,289 @@
+@media only screen {
+ /* Checkbox
+ */
+ .switch-light {
+ position: relative;
+ display: block;
+ /* simulate default browser focus outlines on the switch,
+ * when the inputs are focused.
+ */
+ }
+ .switch-light::after {
+ clear: both;
+ content: '';
+ display: table;
+ }
+ .switch-light *,
+ .switch-light *:before,
+ .switch-light *:after {
+ box-sizing: border-box; }
+ .switch-light a {
+ display: block;
+ transition: all 0.2s ease-out; }
+ .switch-light label,
+ .switch-light > span {
+ line-height: 2em;
+ text-transform: uppercase;
+ }
+ .switch-light input:focus ~ span a,
+ .switch-light input:focus + label {
+ outline-width: 2px;
+ outline-style: solid;
+ outline-color: Highlight;
+ }
+ }
+ @media only screen and (-webkit-min-device-pixel-ratio: 0) {
+ .switch-light input:focus ~ span a,
+ .switch-light input:focus + label {
+ outline-color: -webkit-focus-ring-color;
+ outline-style: auto; }
+ }
+
+@media only screen {
+ /* don't hide the input from screen-readers and keyboard access
+ */
+ .switch-light input {
+ position: absolute;
+ opacity: 0;
+ z-index: 3;
+ }
+ .switch-light input:checked ~ span a {
+ right: 0%;
+ }
+ /* inherit from label */
+ .switch-light strong {
+ font-weight: inherit;
+ }
+ .switch-light > span {
+ position: relative;
+ overflow: hidden;
+ display: block;
+ min-height: 2em;
+ /* overwrite 3rd party classes padding
+ * eg. bootstrap .well
+ */
+ padding: 0;
+ text-align: left;
+ }
+ .switch-light span span {
+ position: relative;
+ z-index: 2;
+ display: block;
+ float: left;
+ width: 50%;
+ text-align: center;
+ user-select: none;
+ }
+ .switch-light a {
+ position: absolute;
+ right: 50%;
+ top: 0;
+ z-index: 1;
+ display: block;
+ width: 50%;
+ height: 100%;
+ padding: 0;
+ }
+
+ /* Radio Switch */
+ .switch-toggle {
+ position: relative;
+ display: block;
+ /* simulate default browser focus outlines on the switch,
+ * when the inputs are focused.
+ */
+ /* For callout panels in foundation */
+ padding: 0 !important;
+ /* 2 items
+ */
+ /* 3 items
+ */
+ /* 4 items
+ */
+ /* 5 items
+ */
+ /* 6 items
+ */
+ }
+ .switch-toggle::after {
+ clear: both;
+ content: '';
+ display: table;
+ }
+ .switch-toggle *,
+ .switch-toggle *:before,
+ .switch-toggle *:after {
+ box-sizing: border-box;
+ }
+ .switch-toggle a {
+ display: block;
+ transition: all 0.2s ease-out;
+ }
+ .switch-toggle label,
+ .switch-toggle > span {
+ /* breathing room for bootstrap/foundation classes.
+ */
+ line-height: 2em;
+ }
+ .switch-toggle input:focus ~ span a,
+ .switch-toggle input:focus + label {
+ outline-width: 2px;
+ outline-style: solid;
+ outline-color: Highlight;
+ /* Chrome/Opera gets its native focus styles.
+ */ }
+ }
+ @media only screen and (-webkit-min-device-pixel-ratio: 0) {
+ .switch-toggle input:focus ~ span a,
+ .switch-toggle input:focus + label {
+ outline-color: -webkit-focus-ring-color;
+ outline-style: auto;
+ }
+ }
+
+@media only screen {
+ .switch-toggle input {
+ position: absolute;
+ left: 0;
+ opacity: 0;
+ }
+ .switch-toggle input + label {
+ position: relative;
+ z-index: 2;
+ display: block;
+ float: left;
+ padding: 0 0.5em;
+ margin: 0;
+ text-align: center;
+ }
+ .switch-toggle a {
+ position: absolute;
+ top: 0;
+ left: 0;
+ padding: 0;
+ z-index: 1;
+ width: 10px;
+ height: 100%;
+ }
+ .switch-toggle label:nth-child(2):nth-last-child(4),
+ .switch-toggle label:nth-child(2):nth-last-child(4) ~ label,
+ .switch-toggle label:nth-child(2):nth-last-child(4) ~ a {
+ width: 50%;
+ }
+ .switch-toggle label:nth-child(2):nth-last-child(4) ~ input:checked:nth-child(3) + label ~ a {
+ left: 50%;
+ }
+ .switch-toggle label:nth-child(2):nth-last-child(6),
+ .switch-toggle label:nth-child(2):nth-last-child(6) ~ label,
+ .switch-toggle label:nth-child(2):nth-last-child(6) ~ a {
+ width: 33.33%;
+ }
+ .switch-toggle label:nth-child(2):nth-last-child(6) ~ input:checked:nth-child(3) + label ~ a {
+ left: 33.33%;
+ }
+ .switch-toggle label:nth-child(2):nth-last-child(6) ~ input:checked:nth-child(5) + label ~ a {
+ left: 66.66%;
+ }
+ .switch-toggle label:nth-child(2):nth-last-child(8),
+ .switch-toggle label:nth-child(2):nth-last-child(8) ~ label,
+ .switch-toggle label:nth-child(2):nth-last-child(8) ~ a {
+ width: 25%;
+ }
+ .switch-toggle label:nth-child(2):nth-last-child(8) ~ input:checked:nth-child(3) + label ~ a {
+ left: 25%;
+ }
+ .switch-toggle label:nth-child(2):nth-last-child(8) ~ input:checked:nth-child(5) + label ~ a {
+ left: 50%;
+ }
+ .switch-toggle label:nth-child(2):nth-last-child(8) ~ input:checked:nth-child(7) + label ~ a {
+ left: 75%;
+ }
+ .switch-toggle label:nth-child(2):nth-last-child(10),
+ .switch-toggle label:nth-child(2):nth-last-child(10) ~ label,
+ .switch-toggle label:nth-child(2):nth-last-child(10) ~ a {
+ width: 20%;
+ }
+ .switch-toggle label:nth-child(2):nth-last-child(10) ~ input:checked:nth-child(3) + label ~ a {
+ left: 20%;
+ }
+ .switch-toggle label:nth-child(2):nth-last-child(10) ~ input:checked:nth-child(5) + label ~ a {
+ left: 40%;
+ }
+ .switch-toggle label:nth-child(2):nth-last-child(10) ~ input:checked:nth-child(7) + label ~ a {
+ left: 60%;
+ }
+ .switch-toggle label:nth-child(2):nth-last-child(10) ~ input:checked:nth-child(9) + label ~ a {
+ left: 80%;
+ }
+ .switch-toggle label:nth-child(2):nth-last-child(12),
+ .switch-toggle label:nth-child(2):nth-last-child(12) ~ label,
+ .switch-toggle label:nth-child(2):nth-last-child(12) ~ a {
+ width: 16.6%;
+ }
+ .switch-toggle label:nth-child(2):nth-last-child(12) ~ input:checked:nth-child(3) + label ~ a {
+ left: 16.6%;
+ }
+ .switch-toggle label:nth-child(2):nth-last-child(12) ~ input:checked:nth-child(5) + label ~ a {
+ left: 33.2%;
+ }
+ .switch-toggle label:nth-child(2):nth-last-child(12) ~ input:checked:nth-child(7) + label ~ a {
+ left: 49.8%;
+ }
+ .switch-toggle label:nth-child(2):nth-last-child(12) ~ input:checked:nth-child(9) + label ~ a {
+ left: 66.4%;
+ }
+ .switch-toggle label:nth-child(2):nth-last-child(12) ~ input:checked:nth-child(11) + label ~ a {
+ left: 83%;
+ }
+
+ /* Default theme*/
+ .switch-toggle.switch-default,
+ .switch-light.switch-default > span {
+ text-transform: uppercase;
+ background-color: #ffffff;
+ border-radius: 3px;
+ box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255, 255, 255, 0.2);
+ }
+
+ .switch-light.switch-default span span,
+ .switch-light.switch-default input:checked ~ span span:first-child,
+ .switch-toggle.switch-default label {
+ color: #fff;
+ font-weight: bold;
+ text-align: center;
+ }
+ .switch-light.switch-default input ~ span span:first-child,
+ .switch-light.switch-default input:checked ~ span span:nth-child(2),
+ .switch-default input:checked + label {
+ color: #fff;
+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+ }
+ .switch-default a {
+ border: 1px solid #333;
+ border-radius: 3px;
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.45);
+ background-color: #3c8dbc;
+ background-image: linear-gradient(rgba(255, 255, 255, 0.2), transparent);
+ }
+
+ /**/
+
+
+/* Bugfix for older Webkit, including mobile Webkit. Adapted from
+ * http://css-tricks.com/webkit-sibling-bug/
+ */
+@media only screen and (-webkit-max-device-pixel-ratio: 2) and (max-device-width: 80em) {
+ .switch-light,
+ .switch-toggle {
+ -webkit-animation: webkitSiblingBugfix infinite 1s;
+ }
+}
+
+@-webkit-keyframes webkitSiblingBugfix {
+ from {
+ -webkit-transform: translate3d(0, 0, 0);
+ }
+ to {
+ -webkit-transform: translate3d(0, 0, 0);
+ }
+}
diff --git a/public/vendor/backpack/crud/img/ajax-loader.gif b/public/vendor/backpack/crud/img/ajax-loader.gif
new file mode 100644
index 0000000..7cb60b3
Binary files /dev/null and b/public/vendor/backpack/crud/img/ajax-loader.gif differ
diff --git a/public/vendor/backpack/overlays/backpack.bold.css b/public/vendor/backpack/overlays/backpack.bold.css
new file mode 100644
index 0000000..0ac16b4
--- /dev/null
+++ b/public/vendor/backpack/overlays/backpack.bold.css
@@ -0,0 +1,46 @@
+/* ------------------------------------------ */
+/* ------- Backpack Bold Overlay ------------ */
+/* ------------------------------------------ */
+/* This file brings some subjective improvements to the AdminLTE style. Use this file or not - it's a matter of preference. */
+
+.sidebar-menu>li>a>.fa,
+.sidebar-menu>li>a>.glyphicon,
+.sidebar-menu>li>a>.ion {
+ margin-right: 5px;
+}
+
+body[class^='skin-'] .sidebar-menu>li>a {
+ border-left: 2px solid transparent;
+}
+
+.skin-purple .sidebar-menu>li.header {
+ padding-top: 5px;
+ padding-bottom: 5px;
+}
+
+.content-header {
+ padding: 35px 15px 0px 15px;
+}
+.content-header>h1 {
+ font-size: 32px;
+ font-weight: 200;
+}
+.content-header>.breadcrumb {
+ top: 5px;
+}
+.user-panel {
+ padding: 20px 10px 20px 10px;
+}
+
+.btn {
+ font-weight: 300;
+}
+
+body {
+ font-size: 15px;
+ font-weight: 300;
+}
+
+.logo-lg b {
+ font-weight: 400;
+}
\ No newline at end of file
diff --git a/resources/lang/en/address.php b/resources/lang/en/address.php
new file mode 100644
index 0000000..1a67868
--- /dev/null
+++ b/resources/lang/en/address.php
@@ -0,0 +1,27 @@
+ 'Contact Person',
+ 'address_1' => 'Address 1',
+ 'address_2' => 'Address 2',
+ 'country' => 'Country',
+ 'county' => 'County',
+ 'city' => 'City',
+ 'postal_code' => 'Postal Code',
+ 'phone' => 'Phone',
+ 'mobile_phone' => 'Mobile phone',
+ 'comment' => 'Comment',
+
+ 'add_address' => 'Add address',
+ 'address' => 'Address',
+
+ // Messages
+ 'client_is_required' => 'Client is required',
+ 'address_is_required' => 'Address is required',
+ 'no_addresses' => 'There are no addresses',
+ 'delete_address_confirm' => 'Are you sure you want to delete this address?',
+ 'address_deleted' => 'Address was deleted',
+ 'address_created' => 'Address was created',
+
+];
\ No newline at end of file
diff --git a/resources/lang/en/cartrule.php b/resources/lang/en/cartrule.php
new file mode 100644
index 0000000..70241ee
--- /dev/null
+++ b/resources/lang/en/cartrule.php
@@ -0,0 +1,41 @@
+ 'Cart rule',
+ 'cart_rules' => 'Cart rules',
+ 'name' => 'Name',
+ 'code' => 'Code',
+ 'priority' => 'Priority',
+ 'start_date' => 'Start date',
+ 'expiration_date' => 'Expiration date',
+ 'status' => 'Status',
+ 'highlight' => 'Highlight',
+ 'minimum_amount' => 'Minimum amount',
+ 'total_available' => 'Total available',
+ 'total_available_each_user' => 'Total available for each customer',
+ 'promo_label' => 'Promo label',
+ 'promo_text' => 'Promo text',
+ 'multiply_gift' => 'Multiply gift',
+ 'limit_to_one_customer' => 'Limit to a single customer',
+ 'gift' => 'Gift',
+ 'min_nr_products' => 'Minimum nr. of products',
+ 'discount_type' => 'Discount type',
+ 'reduction_amount' => 'Reduction amount',
+ 'reduction_percent' => 'Reduction percent',
+ 'reduction_value' => 'Reduction value',
+ 'currency' => 'Currency',
+ 'compatible_with' => 'Compatible with',
+ 'information_tab' => 'Information',
+ 'actions_tab' => 'Actions',
+ 'conditions_tab' => 'Conditions',
+ 'free_delivery' => 'Free delivery',
+ 'compatible_with_rules' => 'Compatible with rules',
+ 'send_free_gift' => 'Send free gift',
+ 'categories_rule' => 'The categories are matching one of these:',
+ 'products_rule' => 'The products are matching one of these:',
+ 'customer_groups_rule' => 'Apply rule to customers:',
+ 'product_groups_rule' => 'Apply rule to product groups:',
+
+
+];
\ No newline at end of file
diff --git a/resources/lang/en/client.php b/resources/lang/en/client.php
new file mode 100644
index 0000000..51ea696
--- /dev/null
+++ b/resources/lang/en/client.php
@@ -0,0 +1,22 @@
+ 'Client',
+ 'clients' => 'Clients',
+ 'email' => 'E-mail',
+ 'name' => 'Name',
+ 'salutation' => 'Salutation',
+ 'birthday' => 'Birthday',
+ 'gender' => 'Gender',
+ 'male' => 'Male',
+ 'female' => 'Female',
+ 'password' => 'Password',
+ 'password_confirmation' => 'Password Confirmation',
+
+ // Tabs
+ 'tab_general' => 'General',
+ 'tab_permissions' => 'Permissions',
+ 'tab_address' => 'Address',
+ 'tab_company' => 'Company',
+];
\ No newline at end of file
diff --git a/resources/lang/en/common.php b/resources/lang/en/common.php
index 3a1c1d8..e98f4c9 100644
--- a/resources/lang/en/common.php
+++ b/resources/lang/en/common.php
@@ -2,6 +2,7 @@
return [
+ 'add' => 'Add',
'cancel' => 'Cancel',
'edit' => 'Edit',
'delete' => 'Delete',
@@ -19,5 +20,10 @@
'error_occurred' => 'An error has occurred',
'must_be_unique' => 'Must be unique',
'loading_ellipsis' => 'Loading...',
+ 'view' => 'View',
+ 'year' => 'Year',
+ 'years' => 'Years',
+ 'date' => 'Date',
+ 'total' => 'Total',
];
\ No newline at end of file
diff --git a/resources/lang/en/company.php b/resources/lang/en/company.php
new file mode 100644
index 0000000..d9fec08
--- /dev/null
+++ b/resources/lang/en/company.php
@@ -0,0 +1,24 @@
+ 'Company name',
+ 'address_1' => 'Address 1',
+ 'address_2' => 'Address 2',
+ 'county' => 'County',
+ 'city' => 'City',
+ 'tin' => 'Tax Identification Number',
+ 'trn' => 'Trade Registry Number',
+
+ 'add_company' => 'Add company',
+ 'address' => 'Address',
+
+ // Messages
+ 'client_is_required' => 'Client is required',
+ 'company_is_required' => 'Company is required',
+ 'no_companies' => 'There are no companies',
+ 'delete_company_confirm' => 'Are you sure you want to delete this company?',
+ 'company_deleted' => 'Company was deleted',
+ 'company_created' => 'Company was created',
+
+];
\ No newline at end of file
diff --git a/resources/lang/en/currency.php b/resources/lang/en/currency.php
index de22e8e..cd7c408 100644
--- a/resources/lang/en/currency.php
+++ b/resources/lang/en/currency.php
@@ -2,11 +2,12 @@
return [
- 'currency' => 'Currency',
- 'currencies' => 'Currencies',
- 'iso' => 'ISO',
- 'name' => 'Name',
- 'value' => 'Value',
- 'default' => 'Default',
+ 'currency' => 'Currency',
+ 'currencies' => 'Currencies',
+ 'iso' => 'ISO',
+ 'name' => 'Name',
+ 'value' => 'Value',
+ 'default' => 'Default',
+ 'no_default_currency' => 'No default currency defined',
];
\ No newline at end of file
diff --git a/resources/lang/en/notification_templates.php b/resources/lang/en/notification_templates.php
new file mode 100644
index 0000000..4b0aad8
--- /dev/null
+++ b/resources/lang/en/notification_templates.php
@@ -0,0 +1,12 @@
+ 'Notification Template',
+ 'notification_templates' => 'Notification Templates',
+ 'name' => 'Name',
+ 'slug' => 'Slug',
+ 'model' => 'Model',
+ 'body' => 'Body',
+ 'available_variables' => 'Available variables',
+ 'variables_error' => 'Please check template variables'
+];
\ No newline at end of file
diff --git a/resources/lang/en/order.php b/resources/lang/en/order.php
index 5496d1a..f06e9fa 100644
--- a/resources/lang/en/order.php
+++ b/resources/lang/en/order.php
@@ -2,11 +2,24 @@
return [
- 'order' => 'Order',
- 'orders' => 'Orders',
- 'order_status' => 'Order Status',
- 'order_statuses' => 'Order Statuses',
- 'status' => 'Status',
- 'status_name' => 'Status Name',
+ 'order' => 'Order',
+ 'orders' => 'Orders',
+ 'order_status' => 'Order Status',
+ 'order_statuses' => 'Order Statuses',
+ 'status' => 'Status',
+ 'status_name' => 'Status Name',
+ 'notification' => 'Notification',
+ 'no_status_history' => 'No status history',
+ 'no_order_statuses' => 'No order statuses defined',
+ 'update_status' => 'Update status',
+ 'status_updated' => 'Order status updated!',
+ 'created_at' => 'Created at',
+ 'shipping_cost' => 'Shipping cost',
+ 'shipping_details' => 'Shipping details',
+ 'shipping_address' => 'Shipping address',
+ 'billing_info' => 'Billing info',
+ 'billing_address' => 'Billing address',
+ 'billing_company_details' => 'Billing company details',
+ 'quantity' => 'Quantity',
];
\ No newline at end of file
diff --git a/resources/lang/en/permissionmanager.php b/resources/lang/en/permissionmanager.php
new file mode 100644
index 0000000..afe2d58
--- /dev/null
+++ b/resources/lang/en/permissionmanager.php
@@ -0,0 +1,29 @@
+
+ |
+ */
+ 'name' => 'Name',
+ 'role' => 'Role',
+ 'roles' => 'Roles',
+ 'roles_have_permission' => 'Roles that have this permission',
+ 'permission_singular' => 'permission',
+ 'permission_plural' => 'permissions',
+ 'user_singular' => 'User',
+ 'user_plural' => 'Users',
+ 'email' => 'Email',
+ 'extra_permissions' => 'Extra Permissions',
+ 'password' => 'Password',
+ 'password_confirmation' => 'Password Confirmation',
+ 'user_role_permission' => 'User Role Permissions',
+ 'user' => 'User',
+ 'users' => 'Users',
+
+];
diff --git a/resources/lang/en/product.php b/resources/lang/en/product.php
index 415cce7..471e66a 100644
--- a/resources/lang/en/product.php
+++ b/resources/lang/en/product.php
@@ -8,6 +8,7 @@
'description' => 'Description',
'price' => 'Price',
'price_without_vat' => 'Price without VAT',
+ 'price_with_tax' => 'Price with Tax',
'hint_price' => 'Use dot (.) instead comma (,) for separating number decimals',
'hint_category' => 'You can select one or more categories where the product will be displayed',
'sku' => 'SKU',
diff --git a/resources/lang/en/specificprice.php b/resources/lang/en/specificprice.php
new file mode 100644
index 0000000..5216d38
--- /dev/null
+++ b/resources/lang/en/specificprice.php
@@ -0,0 +1,19 @@
+ 'Specific price',
+ 'specific_prices' => 'Specific prices',
+ 'product' => 'Product',
+ 'products' => 'Products',
+ 'reduction' => 'Reduction',
+ 'price' => 'Price',
+ 'start_date' => 'Start date',
+ 'expiration_date' => 'Expiration date',
+ 'currency' => 'Currency',
+ 'discount_type' => 'Discount type',
+ 'old_price' => 'Old price',
+ 'reduced_price' => 'Reduced price',
+ 'reduction_price_not_ok' => 'Specific price not saved. The price will be less than 0.00 after reduction for product :productName',
+ 'wrong_dates' => 'Specific price not saved. There is already a specific price for product :productName in this period',
+ 'dates_cant_be_null' => 'Specific price not saved. The specific price should have a start date and expiration date',
+];
\ No newline at end of file
diff --git a/resources/lang/en/user.php b/resources/lang/en/user.php
new file mode 100644
index 0000000..016ce55
--- /dev/null
+++ b/resources/lang/en/user.php
@@ -0,0 +1,20 @@
+ 'User',
+ 'users' => 'Users',
+ 'email' => 'E-mail',
+ 'name' => 'Name',
+ 'salutation' => 'Salutation',
+ 'birthday' => 'Birthday',
+ 'gender' => 'Gender',
+ 'male' => 'Male',
+ 'female' => 'Female',
+ 'password' => 'Password',
+ 'password_confirmation' => 'Password Confirmation',
+
+ // Tabs
+ 'tab_general' => 'General',
+ 'tab_permissions' => 'Permissions',
+];
\ No newline at end of file
diff --git a/resources/lang/vendor/backpack/el/permissionmanager.php b/resources/lang/vendor/backpack/el/permissionmanager.php
new file mode 100644
index 0000000..01571dc
--- /dev/null
+++ b/resources/lang/vendor/backpack/el/permissionmanager.php
@@ -0,0 +1,28 @@
+ 'Όνομα',
+ 'role' => 'Ρόλος',
+ 'roles' => 'Ρόλοι',
+ 'roles_have_permission' => 'Ρόλοι με αυτό το δικαίωμα',
+ 'permission_singular' => 'δικαίωμα',
+ 'permission_plural' => 'Δικαιώματα',
+ 'user_singular' => 'Χρήστης',
+ 'user_plural' => 'Χρήστες',
+ 'email' => 'Email',
+ 'extra_permissions' => 'Πρόσθετα δικαιώματα',
+ 'password' => 'Κωδικός',
+ 'password_confirmation' => 'Επανάληψη κωδικού',
+ 'user_role_permission' => 'Ρόλοι και Δικαιώματα Χρήστη',
+ 'user' => 'Χρήστης',
+ 'users' => 'Χρήστες',
+
+];
diff --git a/resources/lang/vendor/backpack/en/permissionmanager.php b/resources/lang/vendor/backpack/en/permissionmanager.php
new file mode 100644
index 0000000..afe2d58
--- /dev/null
+++ b/resources/lang/vendor/backpack/en/permissionmanager.php
@@ -0,0 +1,29 @@
+
+ |
+ */
+ 'name' => 'Name',
+ 'role' => 'Role',
+ 'roles' => 'Roles',
+ 'roles_have_permission' => 'Roles that have this permission',
+ 'permission_singular' => 'permission',
+ 'permission_plural' => 'permissions',
+ 'user_singular' => 'User',
+ 'user_plural' => 'Users',
+ 'email' => 'Email',
+ 'extra_permissions' => 'Extra Permissions',
+ 'password' => 'Password',
+ 'password_confirmation' => 'Password Confirmation',
+ 'user_role_permission' => 'User Role Permissions',
+ 'user' => 'User',
+ 'users' => 'Users',
+
+];
diff --git a/resources/lang/vendor/backpack/es/permissionmanager.php b/resources/lang/vendor/backpack/es/permissionmanager.php
new file mode 100644
index 0000000..02f6aff
--- /dev/null
+++ b/resources/lang/vendor/backpack/es/permissionmanager.php
@@ -0,0 +1,28 @@
+ 'Nombre',
+ 'role' => 'Rol',
+ 'roles' => 'Roles',
+ 'roles_have_permission' => 'Roles con este permiso',
+ 'permission_singular' => 'Permiso',
+ 'permission_plural' => 'Permisos',
+ 'user_singular' => 'Usuario',
+ 'user_plural' => 'Usuarios',
+ 'email' => 'Correo electrónico',
+ 'extra_permissions' => 'Permisos adicionales',
+ 'password' => 'Contraseña',
+ 'password_confirmation' => 'Confirmación de contraseña',
+ 'user_role_permission' => 'Permisos del rol del usuario',
+ 'user' => 'Usuario',
+ 'users' => 'Usuarios',
+
+];
diff --git a/resources/lang/vendor/backpack/nl/permissionmanager.php b/resources/lang/vendor/backpack/nl/permissionmanager.php
new file mode 100644
index 0000000..dc86f19
--- /dev/null
+++ b/resources/lang/vendor/backpack/nl/permissionmanager.php
@@ -0,0 +1,29 @@
+
+ |
+ */
+ 'name' => 'Naam',
+ 'role' => 'Rol',
+ 'roles' => 'Rollen',
+ 'roles_have_permission' => 'Rollen die deze permissie hebben',
+ 'permission_singular' => 'Permissie',
+ 'permission_plural' => 'Permissies',
+ 'user_singular' => 'Gebruiker',
+ 'user_plural' => 'Gebruikers',
+ 'email' => 'E-mail',
+ 'extra_permissions' => 'Extra permissies',
+ 'password' => 'Wachtwoord',
+ 'password_confirmation' => 'Wachtwoord bevestigen',
+ 'user_role_permission' => 'Rollen en permissies voor gebruiker',
+ 'user' => 'Gebruiker',
+ 'users' => 'Gebruikers',
+
+];
diff --git a/resources/lang/vendor/backpack/pt/permissionmanager.php b/resources/lang/vendor/backpack/pt/permissionmanager.php
new file mode 100644
index 0000000..f1577f1
--- /dev/null
+++ b/resources/lang/vendor/backpack/pt/permissionmanager.php
@@ -0,0 +1,28 @@
+ 'Nome',
+ 'role' => 'Cargo',
+ 'roles' => 'Cargos',
+ 'roles_have_permission' => 'Cargos com esta permissão',
+ 'permission_singular' => 'permissão',
+ 'permission_plural' => 'permissões',
+ 'user_singular' => 'Utilizador',
+ 'user_plural' => 'Utilizadores',
+ 'email' => 'Email',
+ 'extra_permissions' => 'Permissões extra',
+ 'password' => 'Palavra-passe',
+ 'password_confirmation' => 'Confirmar palavra-passe',
+ 'user_role_permission' => 'Cargo e permissões do utilizador',
+ 'user' => 'Utilizador',
+ 'users' => 'Utilizadores',
+
+];
diff --git a/resources/lang/vendor/backpack/pt_br/permissionmanager.php b/resources/lang/vendor/backpack/pt_br/permissionmanager.php
new file mode 100644
index 0000000..0fb2562
--- /dev/null
+++ b/resources/lang/vendor/backpack/pt_br/permissionmanager.php
@@ -0,0 +1,30 @@
+
+ |
+ */
+
+ 'name' => 'Nome',
+ 'role' => 'Grupo de Usuário',
+ 'roles' => 'Grupos de Usuário',
+ 'roles_have_permission' => 'Grupos que possuem esta permissão',
+ 'permission_singular' => 'permissão',
+ 'permission_plural' => 'permissões',
+ 'user_singular' => 'Usuário',
+ 'user_plural' => 'Usuários',
+ 'email' => 'Email',
+ 'extra_permissions' => 'Permissões Extras',
+ 'password' => 'Senha',
+ 'password_confirmation' => 'Confirmar senha',
+ 'user_role_permission' => 'Permissões do Grupo de Usuário',
+ 'user' => 'Usuário',
+ 'users' => 'Usuários',
+
+];
diff --git a/resources/views/admin/order/view.blade.php b/resources/views/admin/order/view.blade.php
new file mode 100644
index 0000000..0e15d68
--- /dev/null
+++ b/resources/views/admin/order/view.blade.php
@@ -0,0 +1,374 @@
+@extends('backpack::layout')
+
+@section('content-header')
+
+@endsection
+
+@section('content')
+ @if ($crud->hasAccess('list'))
+ {{ trans('backpack::crud.back_to_all') }} {{ $crud->entity_name_plural }}
+ @endif
+
+
+
+
{{ trans('order.order') }} #{{ $order->id }} - {{ $order->user->name }}
+
+
+
+
+
+
+
+
+
+ Current status
+ {{ $order->status->name }}
+
+
+
+
+
+ Status history
+
+ @if (count($order->statusHistory) > 0)
+
+
+
+ {{ trans('order.status') }}
+ {{ trans('common.date') }}
+
+
+
+ @foreach($order->statusHistory as $statusHistory)
+
+ {{ $statusHistory->status->name }}
+ {{ $statusHistory->created_at }}
+
+ @endforeach
+
+
+ @else
+
+ {{ trans('order.no_status_history') }}
+
+ @endif
+
+
+
+ @if (count($orderStatuses) > 0)
+
+ @else
+
+ {{ trans('order.no_order_statuses') }}
+
+ @endif
+
+
+
+
+
+
+
+
+
{{ trans('user.tab_general') }}
+
+
+
+ {{ $order->user->birthday ? $order->user->birthday.' ('.$order->user->age().' '.strtolower(trans('common.years')).')': '-' }}
+
+ {!! ($order->user->gender == 1) ? ' '.trans('user.male') : ' '.trans('user.female') !!}
+
+
+
+
+
+
+
+
+
+
+
+ @if ($order->shippingAddress)
+
+
+
{{ trans('order.shipping_address') }}
+
+
+ {{ trans('address.contact_person') }}
+ {{ $order->shippingAddress->name }}
+
+
+ {{ trans('address.address') }}
+
+ {{ $order->shippingAddress->address1 }}
+ {{ $order->shippingAddress->address2 }}
+
+
+
+ {{ trans('address.county') }}
+ {{ $order->shippingAddress->county }}
+
+
+ {{ trans('address.city') }}
+ {{ $order->shippingAddress->city }}
+
+
+ {{ trans('address.postal_code') }}
+ {{ $order->shippingAddress->postal_code }}
+
+
+ {{ trans('address.phone') }}
+ {{ $order->shippingAddress->phone }}
+
+
+ {{ trans('address.mobile_phone') }}
+ {{ $order->shippingAddress->mobile_phone }}
+
+
+ {{ trans('address.comment') }}
+ {{ $order->shippingAddress->comment }}
+
+
+
+
+ @if ($order->billingCompanyInfo)
+
{{ trans('order.billing_company_details') }}
+
+
+ {{ trans('company.company_name') }}
+ {{ $order->billingCompanyInfo->name }}
+
+
+ {{ trans('company.address') }}
+
+ {{ $order->billingCompanyInfo->address1 }}
+ {{ $order->billingCompanyInfo->address2 }}
+
+
+
+ {{ trans('company.county') }}
+ {{ $order->billingCompanyInfo->county }}
+
+
+ {{ trans('company.city') }}
+ {{ $order->billingCompanyInfo->city }}
+
+
+ {{ trans('company.tin') }}
+ {{ $order->billingCompanyInfo->tin }}
+
+
+ {{ trans('company.trn') }}
+ {{ $order->billingCompanyInfo->trn }}
+
+
+ @endif
+
+ @if ($order->billingAddress)
+
{{ trans('order.billing_address') }}
+
+
+ {{ trans('address.contact_person') }}
+ {{ $order->billingAddress->name }}
+
+
+ {{ trans('address.address') }}
+
+ {{ $order->billingAddress->address1 }}
+ {{ $order->billingAddress->address2 }}
+
+
+
+ {{ trans('address.county') }}
+ {{ $order->billingAddress->county }}
+
+
+ {{ trans('address.city') }}
+ {{ $order->billingAddress->city }}
+
+
+ {{ trans('address.postal_code') }}
+ {{ $order->billingAddress->postal_code }}
+
+
+ {{ trans('address.phone') }}
+ {{ $order->billingAddress->phone }}
+
+
+ {{ trans('address.mobile_phone') }}
+ {{ $order->billingAddress->mobile_phone }}
+
+
+ {{ trans('address.comment') }}
+ {{ $order->billingAddress->comment }}
+
+
+ @endif
+
+
+ @endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ trans('carrier.logo') }}
+ {{ trans('carrier.carrier') }}
+ {{ trans('carrier.price') }}
+ {{ trans('carrier.delivery_text') }}
+
+
+
+
+
+
+ {{ $order->carrier->name }}
+ {{ $order->carrier->price.' '.$order->currency->name }}
+ {{ $order->carrier->delivery_text }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ trans('product.product') }}
+ {{ trans('product.price') }}
+ {{ trans('product.price_with_tax') }}
+ {{ trans('order.quantity') }}
+ {{ trans('common.total') }}
+
+
+
+ @foreach($order->products as $product)
+
+
+ {{ $product->pivot->name }}
+ SKU: {{ $product->pivot->sku }}
+
+ {{ decimalFormat($product->pivot->price).' '.$order->currency->name }}
+ {{ decimalFormat($product->pivot->price_with_tax).' '.$order->currency->name }}
+ {{ $product->pivot->quantity }}
+ {{ decimalFormat($product->pivot->price_with_tax*$product->pivot->quantity).' '.$order->currency->name }}
+
+ @endforeach
+
+
+
+
+
+
+
+ {{ trans('order.shipping_cost') }}:
+ {{ $order->carrier->price.' '.$order->currency->name }}
+
+
+ {{ trans('common.total') }}:
+ {{ $order->total().' '.$order->currency->name }}
+
+
+
+
+
+
+
+
+@endsection
+
+
+@section('after_styles')
+
+
+
+
+
+
+
+
+@endsection
+
+@section('after_scripts')
+
+
+
+
+
+
+
+@endsection
\ No newline at end of file
diff --git a/resources/views/email/notification_template/footer.blade.php b/resources/views/email/notification_template/footer.blade.php
new file mode 100644
index 0000000..e69de29
diff --git a/resources/views/email/notification_template/header.blade.php b/resources/views/email/notification_template/header.blade.php
new file mode 100644
index 0000000..e69de29
diff --git a/resources/views/email/notification_template/layout.blade.php b/resources/views/email/notification_template/layout.blade.php
new file mode 100644
index 0000000..c6e6075
--- /dev/null
+++ b/resources/views/email/notification_template/layout.blade.php
@@ -0,0 +1 @@
+{!! $body !!}
\ No newline at end of file
diff --git a/resources/views/renders/client_addresses.blade.php b/resources/views/renders/client_addresses.blade.php
new file mode 100644
index 0000000..1ede01d
--- /dev/null
+++ b/resources/views/renders/client_addresses.blade.php
@@ -0,0 +1,34 @@
+@if (count($addresses) > 0)
+
+
+ {{ trans('address.contact_person') }}
+ {{ trans('address.address') }}
+ {{ trans('address.mobile_phone') }}
+ {{ trans('address.comment') }}
+ {{ trans('common.actions') }}
+
+
+ @foreach ($addresses as $address)
+
+ {{ $address->name }}
+
+ {{ $address->address1 }}
+ {{ $address->address2 }}
+ {{ $address->county }}, {{ $address->city }}
+
+ {{ $address->mobile_phone }}
+ {{ $address->comment }}
+
+
+ {{ trans('common.delete') }}
+
+
+
+ @endforeach
+
+
+@else
+
+ {{ trans('address.no_addresses') }}
+
+@endif
\ No newline at end of file
diff --git a/resources/views/renders/client_companies.blade.php b/resources/views/renders/client_companies.blade.php
new file mode 100644
index 0000000..df3f2bd
--- /dev/null
+++ b/resources/views/renders/client_companies.blade.php
@@ -0,0 +1,34 @@
+@if (count($companies) > 0)
+
+
+ {{ trans('company.company_name') }}
+ {{ trans('company.address') }}
+ {{ trans('company.tin') }}
+ {{ trans('company.trn') }}
+ {{ trans('common.actions') }}
+
+
+ @foreach ($companies as $company)
+
+ {{ $company->name }}
+
+ {{ $company->address1 }}
+ {{ $company->address2 }}
+ {{ $company->county }}, {{ $company->city }}
+
+ {{ $company->tin }}
+ {{ $company->trn }}
+
+
+ {{ trans('common.delete') }}
+
+
+
+ @endforeach
+
+
+@else
+
+ {{ trans('company.no_companies') }}
+
+@endif
\ No newline at end of file
diff --git a/resources/views/renders/product_group.blade.php b/resources/views/renders/product_group.blade.php
index 9c25bea..b2b0b85 100644
--- a/resources/views/renders/product_group.blade.php
+++ b/resources/views/renders/product_group.blade.php
@@ -11,7 +11,7 @@
id) class="tr-current-product" @endif>
{{ $product->name }}
{{ $product->sku }}
- {{ number_format((float)$product->price, 2, '.', '') }}
+ {{ decimalFormat($product->price) }}
{{ $product->active == 1 ? trans('common.status') : trans('common.inactive') }}
{{ trans('common.edit') }}
diff --git a/resources/views/vendor/backpack/base/inc/sidebar.blade.php b/resources/views/vendor/backpack/base/inc/sidebar.blade.php
index e56730d..c78d284 100644
--- a/resources/views/vendor/backpack/base/inc/sidebar.blade.php
+++ b/resources/views/vendor/backpack/base/inc/sidebar.blade.php
@@ -6,40 +6,88 @@
-
+
-@endif
+@endif
\ No newline at end of file
diff --git a/resources/views/vendor/backpack/base/layout.blade.php b/resources/views/vendor/backpack/base/layout.blade.php
index 957acd2..1ff4453 100644
--- a/resources/views/vendor/backpack/base/layout.blade.php
+++ b/resources/views/vendor/backpack/base/layout.blade.php
@@ -28,10 +28,8 @@
-
-
-
-
+
+
@yield('after_styles')
@@ -43,6 +41,15 @@
+