diff --git a/app/Constants.php b/app/Constants.php index 9e1ca2622c6b..b49671d0ecb0 100644 --- a/app/Constants.php +++ b/app/Constants.php @@ -517,6 +517,9 @@ if (! defined('APP_NAME')) { define('PLAN_TERM_MONTHLY', 'month'); define('PLAN_TERM_YEARLY', 'year'); + define('SUBSCRIPTION_FORMAT_JSON', 'JSON'); + define('SUBSCRIPTION_FORMAT_UBL', 'UBL'); + // Pro define('FEATURE_CUSTOMIZE_INVOICE_DESIGN', 'customize_invoice_design'); define('FEATURE_REMOVE_CREATED_BY', 'remove_created_by'); diff --git a/app/Http/Controllers/DashboardController.php b/app/Http/Controllers/DashboardController.php index 1d6f931099f9..924ff69a3139 100644 --- a/app/Http/Controllers/DashboardController.php +++ b/app/Http/Controllers/DashboardController.php @@ -24,6 +24,8 @@ class DashboardController extends BaseController */ public function index() { + //dd(dispatch(new \App\Jobs\ConvertInvoiceToUbl(\App\Models\Invoice::first()))); + $user = Auth::user(); $viewAll = $user->hasPermission('view_all'); $userId = $user->id; diff --git a/app/Http/Controllers/SubscriptionController.php b/app/Http/Controllers/SubscriptionController.php index 82d4d2fcbc9b..e6ade8773d1e 100644 --- a/app/Http/Controllers/SubscriptionController.php +++ b/app/Http/Controllers/SubscriptionController.php @@ -154,6 +154,6 @@ class SubscriptionController extends BaseController Session::flash('message', $message); } - return Redirect::to('settings/' . ACCOUNT_API_TOKENS); + return Redirect::to('subscriptions/' . $subscriptionPublicId . '/edit'); } } diff --git a/app/Jobs/ConvertInvoiceToUbl.php b/app/Jobs/ConvertInvoiceToUbl.php new file mode 100644 index 000000000000..f877644eb7e7 --- /dev/null +++ b/app/Jobs/ConvertInvoiceToUbl.php @@ -0,0 +1,123 @@ +invoice = $invoice; + } + + public function handle() + { + $xmlService = new Service(); + $xmlService->namespaceMap = [ + 'urn:oasis:names:specification:ubl:schema:xsd:Invoice-2' => '', + 'urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2' => 'cbc', + 'urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2' => 'cac' + ]; + + $invoice = $this->invoice; + $account = $invoice->account; + $client = $invoice->client; + $ublInvoice = new Invoice(); + + // invoice + $ublInvoice->setId($invoice->invoice_number); + $ublInvoice->setIssueDate($invoice->invoice_date); + $ublInvoice->setInvoiceTypeCode('SalesInvoice'); + + // account + $supplierParty = new Party(); + $supplierParty->setName($account->name); + $supplierAddress = (new Address()) + ->setCityName($account->city) + ->setStreetName($account->address1) + ->setBuildingNumber($account->address2) + ->setPostalZone($account->postal_code); + + if ($account->country_id) { + $country = new Country(); + $country->setIdentificationCode($account->country->iso_3166_2); + $supplierAddress->setCountry($country); + } + + $supplierParty->setPostalAddress($supplierAddress); + $supplierParty->setPhysicalLocation($supplierAddress); + + $contact = new Contact(); + $contact->setElectronicMail($invoice->user->email); + $supplierParty->setContact($contact); + + $ublInvoice->setAccountingSupplierParty($supplierParty); + + // client + $customerParty = new Party(); + $customerParty->setName($client->getDisplayName()); + $customerAddress = (new Address()) + ->setCityName($client->city) + ->setStreetName($client->address1) + ->setBuildingNumber($client->address2) + ->setPostalZone($client->postal_code); + + if ($client->country_id) { + $country = new Country(); + $country->setIdentificationCode($client->country->iso_3166_2); + $customerAddress->setCountry($client); + } + + $customerParty->setPostalAddress($customerAddress); + $customerParty->setPhysicalLocation($customerAddress); + + $contact = new Contact(); + $contact->setElectronicMail($client->contacts[0]->email); + $customerParty->setContact($contact); + + $ublInvoice->setAccountingCustomerParty($customerParty); + + $taxtotal = (new \CleverIt\UBL\Invoice\TaxTotal()) + ->setTaxAmount(10) + ->setTaxSubTotal((new \CleverIt\UBL\Invoice\TaxSubTotal()) + ->setTaxAmount(10) + ->setTaxableAmount(100) + ->setTaxCategory((new \CleverIt\UBL\Invoice\TaxCategory()) + ->setId("H") + ->setName("NL, Hoog Tarief") + ->setPercent(21.00))); + + $invoiceLine = (new \CleverIt\UBL\Invoice\InvoiceLine()) + ->setId(1) + ->setInvoicedQuantity(1) + ->setLineExtensionAmount(100) + ->setTaxTotal($taxtotal) + ->setItem((new \CleverIt\UBL\Invoice\Item())->setName("Test item")->setDescription("test item description")->setSellersItemIdentification("1ABCD")); + + $ublInvoice->setInvoiceLines([$invoiceLine]); + $ublInvoice->setTaxTotal($taxtotal); + + $ublInvoice->setLegalMonetaryTotal((new \CleverIt\UBL\Invoice\LegalMonetaryTotal()) + ->setLineExtensionAmount(100) + ->setTaxExclusiveAmount(100) + ->setPayableAmount(-1000) + ->setAllowanceTotalAmount(50)); + + return $xmlService->write('Invoice', [ + $ublInvoice + ]); + } +} diff --git a/app/Listeners/SubscriptionListener.php b/app/Listeners/SubscriptionListener.php index 769e007da422..bb610d4deeed 100644 --- a/app/Listeners/SubscriptionListener.php +++ b/app/Listeners/SubscriptionListener.php @@ -254,19 +254,30 @@ class SubscriptionListener return; } + // generate JSON data $manager = new Manager(); $manager->setSerializer(new ArraySerializer()); $manager->parseIncludes($include); $resource = new Item($entity, $transformer, $entity->getEntityType()); - $data = $manager->createData($resource)->toArray(); + $jsonData = $manager->createData($resource)->toArray(); // For legacy Zapier support - if (isset($data['client_id'])) { - $data['client_name'] = $entity->client->getDisplayName(); + if (isset($jsonData['client_id'])) { + $jsonData['client_name'] = $entity->client->getDisplayName(); } + + foreach ($subscriptions as $subscription) { + switch ($subscription->format) { + case SUBSCRIPTION_FORMAT_JSON: + $data = $jsonData; + break; + case SUBSCRIPTION_FORMAT_UBL: + $data = $ublData; + break; + } self::notifySubscription($subscription, $data); } } diff --git a/app/Models/Subscription.php b/app/Models/Subscription.php index ad29cd07aa34..130195ee125e 100644 --- a/app/Models/Subscription.php +++ b/app/Models/Subscription.php @@ -28,6 +28,7 @@ class Subscription extends EntityModel protected $fillable = [ 'event_id', 'target_url', + 'format', ]; /** diff --git a/app/Ninja/Repositories/SubscriptionRepository.php b/app/Ninja/Repositories/SubscriptionRepository.php index b4687f8b192e..e59af6999e31 100644 --- a/app/Ninja/Repositories/SubscriptionRepository.php +++ b/app/Ninja/Repositories/SubscriptionRepository.php @@ -21,7 +21,8 @@ class SubscriptionRepository extends BaseRepository 'subscriptions.public_id', 'subscriptions.target_url as target', 'subscriptions.event_id as event', - 'subscriptions.deleted_at' + 'subscriptions.deleted_at', + 'subscriptions.format' ); return $query; diff --git a/composer.json b/composer.json index f7503246ec56..dad99cc83b06 100644 --- a/composer.json +++ b/composer.json @@ -25,6 +25,7 @@ "barryvdh/laravel-ide-helper": "~2.2", "cerdic/css-tidy": "~v1.5", "chumper/datatable": "dev-develop#04ef2bf", + "cleverit/ubl_invoice": "^0.1.1", "codedge/laravel-selfupdater": "5.x-dev", "collizo4sky/omnipay-wepay": "dev-address-fix", "digitickets/omnipay-gocardlessv2": "dev-payment-fix", diff --git a/composer.lock b/composer.lock index 4758f1cd79aa..800176ca7fe9 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "aab53e0382a9fe290684134644ba09d2", - "content-hash": "9ca34996a5b715781c82467710f6775a", + "hash": "a0b0eb9c2d63d3d2cbd24eb98f18f001", + "content-hash": "231a35f4b2351f92f781e063b965e861", "packages": [ { "name": "abdala/omnipay-pagseguro", @@ -169,16 +169,16 @@ }, { "name": "anahkiasen/former", - "version": "4.1.5", + "version": "4.1.6", "source": { "type": "git", "url": "https://github.com/formers/former.git", - "reference": "657151b3cbe5eb13d59f93d0ca413c7778d15a6f" + "reference": "53327a674c9b5607106784a9161ff91e62ade6e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/formers/former/zipball/657151b3cbe5eb13d59f93d0ca413c7778d15a6f", - "reference": "657151b3cbe5eb13d59f93d0ca413c7778d15a6f", + "url": "https://api.github.com/repos/formers/former/zipball/53327a674c9b5607106784a9161ff91e62ade6e4", + "reference": "53327a674c9b5607106784a9161ff91e62ade6e4", "shasum": "" }, "require": { @@ -237,7 +237,7 @@ "foundation", "laravel" ], - "time": "2017-11-27 14:58:10" + "time": "2018-01-02 20:20:00" }, { "name": "anahkiasen/html-object", @@ -393,16 +393,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.44.1", + "version": "3.48.9", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "3f88cb0b9eb6ca34b2823c1cb42e10ac4d52fa6d" + "reference": "98394ea71d03080aaef6a47e413178ef88f17839" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/3f88cb0b9eb6ca34b2823c1cb42e10ac4d52fa6d", - "reference": "3f88cb0b9eb6ca34b2823c1cb42e10ac4d52fa6d", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/98394ea71d03080aaef6a47e413178ef88f17839", + "reference": "98394ea71d03080aaef6a47e413178ef88f17839", "shasum": "" }, "require": { @@ -424,7 +424,7 @@ "ext-dom": "*", "ext-openssl": "*", "nette/neon": "^2.3", - "phpunit/phpunit": "^4.8.35|^5.4.0", + "phpunit/phpunit": "^4.8.35|^5.4.3", "psr/cache": "^1.0" }, "suggest": { @@ -469,7 +469,7 @@ "s3", "sdk" ], - "time": "2017-12-01 20:57:47" + "time": "2018-01-08 23:52:14" }, { "name": "bacon/bacon-qr-code", @@ -793,16 +793,16 @@ }, { "name": "braintree/braintree_php", - "version": "3.26.0", + "version": "3.26.1", "source": { "type": "git", "url": "https://github.com/braintree/braintree_php.git", - "reference": "184bbdd65951a3ad766992ef73bb6e93aeba82b7" + "reference": "7f66ed17f38efd45904f920695b02603b091bae6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/braintree/braintree_php/zipball/184bbdd65951a3ad766992ef73bb6e93aeba82b7", - "reference": "184bbdd65951a3ad766992ef73bb6e93aeba82b7", + "url": "https://api.github.com/repos/braintree/braintree_php/zipball/7f66ed17f38efd45904f920695b02603b091bae6", + "reference": "7f66ed17f38efd45904f920695b02603b091bae6", "shasum": "" }, "require": { @@ -836,7 +836,7 @@ } ], "description": "Braintree PHP Client Library", - "time": "2017-11-17 21:47:27" + "time": "2017-12-14 00:08:17" }, { "name": "cardgate/omnipay-cardgate", @@ -1031,16 +1031,16 @@ }, { "name": "classpreloader/classpreloader", - "version": "3.1.0", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/ClassPreloader/ClassPreloader.git", - "reference": "bc7206aa892b5a33f4680421b69b191efd32b096" + "reference": "4729e438e0ada350f91148e7d4bb9809342575ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ClassPreloader/ClassPreloader/zipball/bc7206aa892b5a33f4680421b69b191efd32b096", - "reference": "bc7206aa892b5a33f4680421b69b191efd32b096", + "url": "https://api.github.com/repos/ClassPreloader/ClassPreloader/zipball/4729e438e0ada350f91148e7d4bb9809342575ff", + "reference": "4729e438e0ada350f91148e7d4bb9809342575ff", "shasum": "" }, "require": { @@ -1053,7 +1053,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -1081,7 +1081,59 @@ "class", "preload" ], - "time": "2016-09-16 12:50:15" + "time": "2017-12-10 11:40:39" + }, + { + "name": "cleverit/ubl_invoice", + "version": "v0.1.1", + "source": { + "type": "git", + "url": "https://github.com/CleverIT/UBL_invoice.git", + "reference": "81931c88732393cef78afa78c8c33fc7a9024843" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/CleverIT/UBL_invoice/zipball/81931c88732393cef78afa78c8c33fc7a9024843", + "reference": "81931c88732393cef78afa78c8c33fc7a9024843", + "shasum": "" + }, + "require": { + "sabre/xml": "^1.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "CleverIt\\UBL\\Invoice\\": [ + "src/", + "src/classes" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bram van Eijk | CleverIT", + "email": "bram@cleverit.nl", + "homepage": "http://www.cleverit.nl", + "role": "Developer" + } + ], + "description": "A PHP wrapper for UBL invoices", + "homepage": "https://github.com/CleverIT/UBL_invoice", + "keywords": [ + "clever invoice", + "cleverit", + "electronic invoice", + "invoice", + "ubl", + "ublinvoice", + "xml", + "xml invoice" + ], + "time": "2017-01-17 09:08:26" }, { "name": "codedge/laravel-selfupdater", @@ -1629,16 +1681,16 @@ }, { "name": "digitickets/omnipay-realex", - "version": "5.0.0", + "version": "5.1.0", "source": { "type": "git", "url": "https://github.com/digitickets/omnipay-realex.git", - "reference": "4d1c5bf3a027f3862e2533414a00c14e06f02b74" + "reference": "eb9d4c8f78c9360248eab901f541069e08defafd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/digitickets/omnipay-realex/zipball/4d1c5bf3a027f3862e2533414a00c14e06f02b74", - "reference": "4d1c5bf3a027f3862e2533414a00c14e06f02b74", + "url": "https://api.github.com/repos/digitickets/omnipay-realex/zipball/eb9d4c8f78c9360248eab901f541069e08defafd", + "reference": "eb9d4c8f78c9360248eab901f541069e08defafd", "shasum": "" }, "require": { @@ -1674,7 +1726,7 @@ "purchase", "realex" ], - "time": "2016-11-17 13:44:19" + "time": "2017-12-19 19:14:50" }, { "name": "dioscouri/omnipay-cybersource", @@ -2555,16 +2607,16 @@ }, { "name": "gocardless/gocardless-pro", - "version": "1.3.0", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/gocardless/gocardless-pro-php.git", - "reference": "16ac38c2531e08c15e54b4a82d44854349cbfcf6" + "reference": "38ecc74aed51d2135d6e0b5419d1449dcf1ff692" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/gocardless/gocardless-pro-php/zipball/16ac38c2531e08c15e54b4a82d44854349cbfcf6", - "reference": "16ac38c2531e08c15e54b4a82d44854349cbfcf6", + "url": "https://api.github.com/repos/gocardless/gocardless-pro-php/zipball/38ecc74aed51d2135d6e0b5419d1449dcf1ff692", + "reference": "38ecc74aed51d2135d6e0b5419d1449dcf1ff692", "shasum": "" }, "require": { @@ -2603,7 +2655,7 @@ "direct debit", "gocardless" ], - "time": "2017-11-14 15:46:50" + "time": "2017-12-04 16:46:06" }, { "name": "google/apiclient", @@ -2666,16 +2718,16 @@ }, { "name": "google/apiclient-services", - "version": "v0.36", + "version": "v0.41", "source": { "type": "git", "url": "https://github.com/google/google-api-php-client-services.git", - "reference": "2fd7d2876fbc0174faddba3241956a1393536159" + "reference": "b3715dfaad3cd91304c84bf3ce36c5cade851b35" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/google/google-api-php-client-services/zipball/2fd7d2876fbc0174faddba3241956a1393536159", - "reference": "2fd7d2876fbc0174faddba3241956a1393536159", + "url": "https://api.github.com/repos/google/google-api-php-client-services/zipball/b3715dfaad3cd91304c84bf3ce36c5cade851b35", + "reference": "b3715dfaad3cd91304c84bf3ce36c5cade851b35", "shasum": "" }, "require": { @@ -2699,20 +2751,20 @@ "keywords": [ "google" ], - "time": "2017-11-25 00:23:12" + "time": "2018-01-06 00:23:20" }, { "name": "google/auth", - "version": "v1.1.0", + "version": "v1.2.0", "source": { "type": "git", "url": "https://github.com/google/google-auth-library-php.git", - "reference": "548d27d670f0236dc5258fa4cdde6e7b63464cfd" + "reference": "f3fc99fd621f339ee3d4de01bd6a709ed1396116" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/google/google-auth-library-php/zipball/548d27d670f0236dc5258fa4cdde6e7b63464cfd", - "reference": "548d27d670f0236dc5258fa4cdde6e7b63464cfd", + "url": "https://api.github.com/repos/google/google-auth-library-php/zipball/f3fc99fd621f339ee3d4de01bd6a709ed1396116", + "reference": "f3fc99fd621f339ee3d4de01bd6a709ed1396116", "shasum": "" }, "require": { @@ -2725,7 +2777,9 @@ }, "require-dev": { "friendsofphp/php-cs-fixer": "^1.11", - "phpunit/phpunit": "3.7.*" + "guzzlehttp/promises": "0.1.1|^1.3", + "phpunit/phpunit": "^4.8.36", + "sebastian/comparator": ">=1.2.3" }, "type": "library", "autoload": { @@ -2744,26 +2798,26 @@ "google", "oauth2" ], - "time": "2017-10-10 17:01:45" + "time": "2017-12-06 21:27:53" }, { "name": "google/cloud", - "version": "v0.46.0", + "version": "v0.50.1", "source": { "type": "git", "url": "https://github.com/GoogleCloudPlatform/google-cloud-php.git", - "reference": "288c3daf85300233dd93f1dfd4f1d040a0cdb536" + "reference": "557462f9be1604f8c6b5ed0cc6d039a06ff251cd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GoogleCloudPlatform/google-cloud-php/zipball/288c3daf85300233dd93f1dfd4f1d040a0cdb536", - "reference": "288c3daf85300233dd93f1dfd4f1d040a0cdb536", + "url": "https://api.github.com/repos/GoogleCloudPlatform/google-cloud-php/zipball/557462f9be1604f8c6b5ed0cc6d039a06ff251cd", + "reference": "557462f9be1604f8c6b5ed0cc6d039a06ff251cd", "shasum": "" }, "require": { "google/auth": "~0.9|^1.0", - "google/gax": "0.27.0", - "google/proto-client": "0.27.0", + "google/gax": "^0.29", + "google/proto-client": "^0.29.0", "guzzlehttp/guzzle": "^5.3|^6.0", "guzzlehttp/psr7": "^1.2", "monolog/monolog": "~1", @@ -2773,24 +2827,28 @@ "rize/uri-template": "~0.3" }, "replace": { - "google/cloud-bigquery": "0.3.1", - "google/cloud-bigtable": "0.1.0", - "google/cloud-core": "1.14.0", - "google/cloud-datastore": "1.1.0", - "google/cloud-dlp": "0.4.0", - "google/cloud-error-reporting": "0.7.0", - "google/cloud-firestore": "0.2.0", - "google/cloud-language": "0.10.0", - "google/cloud-logging": "1.7.0", - "google/cloud-monitoring": "0.7.0", - "google/cloud-pubsub": "0.10.0", - "google/cloud-spanner": "0.10.0", - "google/cloud-speech": "0.9.0", - "google/cloud-storage": "1.2.1", - "google/cloud-trace": "0.3.3", - "google/cloud-translate": "1.0.2", - "google/cloud-videointelligence": "0.8.0", - "google/cloud-vision": "0.7.0" + "google/cloud-bigquery": "1.0.0", + "google/cloud-bigtable": "0.1.1", + "google/cloud-container": "0.1.1", + "google/cloud-core": "1.15.1", + "google/cloud-dataproc": "0.1.1", + "google/cloud-datastore": "1.2.0", + "google/cloud-debugger": "0.1.0", + "google/cloud-dlp": "0.4.3", + "google/cloud-error-reporting": "0.7.3", + "google/cloud-firestore": "0.3.3", + "google/cloud-language": "0.11.2", + "google/cloud-logging": "1.8.2", + "google/cloud-monitoring": "0.7.3", + "google/cloud-oslogin": "0.1.1", + "google/cloud-pubsub": "0.11.2", + "google/cloud-spanner": "1.0.1", + "google/cloud-speech": "0.10.2", + "google/cloud-storage": "1.3.1", + "google/cloud-trace": "0.5.1", + "google/cloud-translate": "1.1.0", + "google/cloud-videointelligence": "0.8.3", + "google/cloud-vision": "0.8.2" }, "require-dev": { "erusev/parsedown": "^1.6", @@ -2804,10 +2862,12 @@ "vierbergenlars/php-semver": "^3.0" }, "suggest": { + "google/cloud-bigquerydatatransfer": "Client library for the BigQuery Data Transfer API.", "phpseclib/phpseclib": "May be used in place of OpenSSL for creating signed Cloud Storage URLs. Please require version ^2." }, "bin": [ - "src/Core/bin/google-cloud-batch" + "src/Core/bin/google-cloud-batch", + "src/Debugger/bin/google-cloud-debugger" ], "type": "library", "extra": { @@ -2868,25 +2928,25 @@ "translation", "vision" ], - "time": "2017-12-02 00:32:15" + "time": "2018-01-08 21:36:25" }, { "name": "google/gax", - "version": "0.27.0", + "version": "0.29.0", "source": { "type": "git", "url": "https://github.com/googleapis/gax-php.git", - "reference": "28d91f30966b91004d1ef66ca09df04fa730c8d9" + "reference": "eb4787747f6c90cbe760a31801ef224ccf3a9b36" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/googleapis/gax-php/zipball/28d91f30966b91004d1ef66ca09df04fa730c8d9", - "reference": "28d91f30966b91004d1ef66ca09df04fa730c8d9", + "url": "https://api.github.com/repos/googleapis/gax-php/zipball/eb4787747f6c90cbe760a31801ef224ccf3a9b36", + "reference": "eb4787747f6c90cbe760a31801ef224ccf3a9b36", "shasum": "" }, "require": { "google/auth": "~0.9|^1.0", - "google/protobuf": "3.4.*", + "google/protobuf": "^3.5.1", "grpc/grpc": "^1.4", "php": ">=5.5" }, @@ -2910,20 +2970,20 @@ "keywords": [ "google" ], - "time": "2017-11-21 23:04:00" + "time": "2017-12-28 17:31:08" }, { "name": "google/proto-client", - "version": "0.27.0", + "version": "0.29.0", "source": { "type": "git", "url": "https://github.com/googleapis/proto-client-php.git", - "reference": "39a6917748da381945e23876e8a9bf6a8e917937" + "reference": "47e52e5819426edff97c2831efe022b0141c44f1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/googleapis/proto-client-php/zipball/39a6917748da381945e23876e8a9bf6a8e917937", - "reference": "39a6917748da381945e23876e8a9bf6a8e917937", + "url": "https://api.github.com/repos/googleapis/proto-client-php/zipball/47e52e5819426edff97c2831efe022b0141c44f1", + "reference": "47e52e5819426edff97c2831efe022b0141c44f1", "shasum": "" }, "require": { @@ -2950,20 +3010,20 @@ "keywords": [ "google" ], - "time": "2017-11-22 22:05:44" + "time": "2017-12-21 21:59:33" }, { "name": "google/protobuf", - "version": "v3.4.1", + "version": "v3.5.1.1", "source": { "type": "git", "url": "https://github.com/google/protobuf.git", - "reference": "b04e5cba356212e4e8c66c61bbe0c3a20537c5b9" + "reference": "860bd12fec5c69e6529565165532b3d5108a7d97" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/google/protobuf/zipball/b04e5cba356212e4e8c66c61bbe0c3a20537c5b9", - "reference": "b04e5cba356212e4e8c66c61bbe0c3a20537c5b9", + "url": "https://api.github.com/repos/google/protobuf/zipball/860bd12fec5c69e6529565165532b3d5108a7d97", + "reference": "860bd12fec5c69e6529565165532b3d5108a7d97", "shasum": "" }, "require": { @@ -2991,7 +3051,7 @@ "keywords": [ "proto" ], - "time": "2017-09-14 19:24:28" + "time": "2018-01-05 21:42:10" }, { "name": "grpc/grpc", @@ -3674,16 +3734,16 @@ }, { "name": "jaybizzle/crawler-detect", - "version": "v1.2.54", + "version": "v1.2.55", "source": { "type": "git", "url": "https://github.com/JayBizzle/Crawler-Detect.git", - "reference": "9af25770d9382917b680009a88497162405bbe48" + "reference": "e745d69502afc610ff993315e2607ad41e3bc13c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/9af25770d9382917b680009a88497162405bbe48", - "reference": "9af25770d9382917b680009a88497162405bbe48", + "url": "https://api.github.com/repos/JayBizzle/Crawler-Detect/zipball/e745d69502afc610ff993315e2607ad41e3bc13c", + "reference": "e745d69502afc610ff993315e2607ad41e3bc13c", "shasum": "" }, "require": { @@ -3719,7 +3779,7 @@ "crawlerdetect", "php crawler detect" ], - "time": "2017-10-28 13:05:55" + "time": "2018-01-05 07:59:11" }, { "name": "jaybizzle/laravel-crawler-detect", @@ -5404,16 +5464,16 @@ }, { "name": "nikic/php-parser", - "version": "v3.1.2", + "version": "v3.1.3", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "08131e7ff29de6bb9f12275c7d35df71f25f4d89" + "reference": "579f4ce846734a1cf55d6a531d00ca07a43e3cda" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/08131e7ff29de6bb9f12275c7d35df71f25f4d89", - "reference": "08131e7ff29de6bb9f12275c7d35df71f25f4d89", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/579f4ce846734a1cf55d6a531d00ca07a43e3cda", + "reference": "579f4ce846734a1cf55d6a531d00ca07a43e3cda", "shasum": "" }, "require": { @@ -5451,7 +5511,7 @@ "parser", "php" ], - "time": "2017-11-04 11:48:34" + "time": "2017-12-26 14:43:21" }, { "name": "nwidart/laravel-modules", @@ -7657,16 +7717,16 @@ }, { "name": "pragmarx/google2fa", - "version": "v2.0.6", + "version": "v2.0.7", "source": { "type": "git", "url": "https://github.com/antonioribeiro/google2fa.git", - "reference": "bc2d654305e4d09254125f8cd390a7fbc4742d46" + "reference": "5a818bda62fab0c0a79060b06d50d50b5525d631" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/antonioribeiro/google2fa/zipball/bc2d654305e4d09254125f8cd390a7fbc4742d46", - "reference": "bc2d654305e4d09254125f8cd390a7fbc4742d46", + "url": "https://api.github.com/repos/antonioribeiro/google2fa/zipball/5a818bda62fab0c0a79060b06d50d50b5525d631", + "reference": "5a818bda62fab0c0a79060b06d50d50b5525d631", "shasum": "" }, "require": { @@ -7677,8 +7737,7 @@ }, "require-dev": { "bacon/bacon-qr-code": "~1.0", - "phpspec/phpspec": "~2.1", - "phpunit/phpunit": "~4" + "phpunit/phpunit": "~4|~5|~6" }, "suggest": { "bacon/bacon-qr-code": "Required to generate inline QR Codes." @@ -7692,7 +7751,8 @@ }, "autoload": { "psr-4": { - "PragmaRX\\Google2FA\\": "src/" + "PragmaRX\\Google2FA\\": "src/", + "PragmaRX\\Google2FA\\Tests\\": "tests/" } }, "notification-url": "https://packagist.org/downloads/", @@ -7714,24 +7774,24 @@ "google2fa", "laravel" ], - "time": "2017-09-12 06:55:05" + "time": "2018-01-06 16:21:07" }, { "name": "pragmarx/google2fa-laravel", - "version": "v0.1.2", + "version": "v0.1.4", "source": { "type": "git", "url": "https://github.com/antonioribeiro/google2fa-laravel.git", - "reference": "ebc24520bea1f1ef5659e39d4024a3275ce49a49" + "reference": "38bd96a1732b9dea963c52e0f503a65265c077c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/antonioribeiro/google2fa-laravel/zipball/ebc24520bea1f1ef5659e39d4024a3275ce49a49", - "reference": "ebc24520bea1f1ef5659e39d4024a3275ce49a49", + "url": "https://api.github.com/repos/antonioribeiro/google2fa-laravel/zipball/38bd96a1732b9dea963c52e0f503a65265c077c9", + "reference": "38bd96a1732b9dea963c52e0f503a65265c077c9", "shasum": "" }, "require": { - "laravel/framework": "~5", + "laravel/framework": ">=5.2", "php": ">=5.4", "pragmarx/google2fa": "~2.0" }, @@ -7740,7 +7800,8 @@ "phpspec/phpspec": "~3" }, "suggest": { - "bacon/bacon-qr-code": "Required to generate inline QR Codes." + "bacon/bacon-qr-code": "Required to generate inline QR Codes.", + "pragmarx/recovery": "Generate recovery codes." }, "type": "library", "extra": { @@ -7784,7 +7845,7 @@ "google2fa", "laravel" ], - "time": "2017-06-23 00:45:24" + "time": "2017-12-06 03:26:14" }, { "name": "predis/predis", @@ -8030,16 +8091,16 @@ }, { "name": "psy/psysh", - "version": "v0.8.15", + "version": "v0.8.17", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "b1d289c2cb03a2f8249912c53e96ced38f879926" + "reference": "5069b70e8c4ea492c2b5939b6eddc78bfe41cfec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/b1d289c2cb03a2f8249912c53e96ced38f879926", - "reference": "b1d289c2cb03a2f8249912c53e96ced38f879926", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/5069b70e8c4ea492c2b5939b6eddc78bfe41cfec", + "reference": "5069b70e8c4ea492c2b5939b6eddc78bfe41cfec", "shasum": "" }, "require": { @@ -8047,14 +8108,13 @@ "jakub-onderka/php-console-highlighter": "0.3.*", "nikic/php-parser": "~1.3|~2.0|~3.0", "php": ">=5.3.9", - "symfony/console": "~2.3.10|^2.4.2|~3.0", - "symfony/var-dumper": "~2.7|~3.0" + "symfony/console": "~2.3.10|^2.4.2|~3.0|~4.0", + "symfony/var-dumper": "~2.7|~3.0|~4.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "~1.11", "hoa/console": "~3.16|~1.14", "phpunit/phpunit": "^4.8.35|^5.4.3", - "symfony/finder": "~2.1|~3.0" + "symfony/finder": "~2.1|~3.0|~4.0" }, "suggest": { "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", @@ -8099,7 +8159,7 @@ "interactive", "shell" ], - "time": "2017-11-16 14:29:51" + "time": "2017-12-28 16:14:16" }, { "name": "rackspace/php-opencloud", @@ -8290,12 +8350,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "f793fe6ff54acabd9bc9f76f4a9ad3c89a68c789" + "reference": "fe89fd2178cabef137b9a76fa91d64925474b956" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/f793fe6ff54acabd9bc9f76f4a9ad3c89a68c789", - "reference": "f793fe6ff54acabd9bc9f76f4a9ad3c89a68c789", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/fe89fd2178cabef137b9a76fa91d64925474b956", + "reference": "fe89fd2178cabef137b9a76fa91d64925474b956", "shasum": "" }, "conflict": { @@ -8328,6 +8388,7 @@ "firebase/php-jwt": "<2", "friendsofsymfony/rest-bundle": ">=1.2,<1.2.2", "friendsofsymfony/user-bundle": ">=1.2,<1.3.5", + "gree/jose": "<=2.2", "gregwar/rst": "<1.0.3", "guzzlehttp/guzzle": ">=6,<6.2.1|>=4.0.0-rc2,<4.2.4|>=5,<5.3.1", "illuminate/auth": ">=4,<4.0.99|>=4.1,<4.1.26", @@ -8345,7 +8406,7 @@ "oro/platform": ">=1.7,<1.7.4", "phpmailer/phpmailer": ">=5,<5.2.24", "phpunit/phpunit": ">=4.8.19,<4.8.28|>=5.0.10,<5.6.3", - "phpxmlrpc/extras": "<6.0.1", + "phpxmlrpc/extras": "<0.6.1", "pusher/pusher-php-server": "<2.2.1", "sabre/dav": ">=1.6,<1.6.99|>=1.7,<1.7.11|>=1.8,<1.8.9", "shopware/shopware": "<5.2.25", @@ -8426,7 +8487,121 @@ } ], "description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it", - "time": "2017-11-24 16:44:41" + "time": "2018-01-07 00:56:33" + }, + { + "name": "sabre/uri", + "version": "2.1.1", + "source": { + "type": "git", + "url": "https://github.com/sabre-io/uri.git", + "reference": "a42126042c7dcb53e2978dadb6d22574d1359b4c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sabre-io/uri/zipball/a42126042c7dcb53e2978dadb6d22574d1359b4c", + "reference": "a42126042c7dcb53e2978dadb6d22574d1359b4c", + "shasum": "" + }, + "require": { + "php": ">=7" + }, + "require-dev": { + "phpunit/phpunit": "^6.0", + "sabre/cs": "~1.0.0" + }, + "type": "library", + "autoload": { + "files": [ + "lib/functions.php" + ], + "psr-4": { + "Sabre\\Uri\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Evert Pot", + "email": "me@evertpot.com", + "homepage": "http://evertpot.com/", + "role": "Developer" + } + ], + "description": "Functions for making sense out of URIs.", + "homepage": "http://sabre.io/uri/", + "keywords": [ + "rfc3986", + "uri", + "url" + ], + "time": "2017-02-20 20:02:35" + }, + { + "name": "sabre/xml", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/sabre-io/xml.git", + "reference": "59b20e5bbace9912607481634f97d05a776ffca7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sabre-io/xml/zipball/59b20e5bbace9912607481634f97d05a776ffca7", + "reference": "59b20e5bbace9912607481634f97d05a776ffca7", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-xmlreader": "*", + "ext-xmlwriter": "*", + "lib-libxml": ">=2.6.20", + "php": ">=5.5.5", + "sabre/uri": ">=1.0,<3.0.0" + }, + "require-dev": { + "phpunit/phpunit": "*", + "sabre/cs": "~1.0.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Sabre\\Xml\\": "lib/" + }, + "files": [ + "lib/Deserializer/functions.php", + "lib/Serializer/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Evert Pot", + "email": "me@evertpot.com", + "homepage": "http://evertpot.com/", + "role": "Developer" + }, + { + "name": "Markus Staab", + "email": "markus.staab@redaxo.de", + "role": "Developer" + } + ], + "description": "sabre/xml is an XML library that you may not hate.", + "homepage": "https://sabre.io/xml/", + "keywords": [ + "XMLReader", + "XMLWriter", + "dom", + "xml" + ], + "time": "2016-10-09 22:57:52" }, { "name": "setasign/fpdi", @@ -8639,16 +8814,16 @@ }, { "name": "symfony/class-loader", - "version": "v3.4.0", + "version": "v3.4.3", "source": { "type": "git", "url": "https://github.com/symfony/class-loader.git", - "reference": "e8d36a7b5568d232f5c3f8ef92665836b9f1e038" + "reference": "e63c12699822bb3b667e7216ba07fbcc3a3e203e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/class-loader/zipball/e8d36a7b5568d232f5c3f8ef92665836b9f1e038", - "reference": "e8d36a7b5568d232f5c3f8ef92665836b9f1e038", + "url": "https://api.github.com/repos/symfony/class-loader/zipball/e63c12699822bb3b667e7216ba07fbcc3a3e203e", + "reference": "e63c12699822bb3b667e7216ba07fbcc3a3e203e", "shasum": "" }, "require": { @@ -8691,7 +8866,7 @@ ], "description": "Symfony ClassLoader Component", "homepage": "https://symfony.com", - "time": "2017-11-05 16:10:10" + "time": "2018-01-03 07:37:34" }, { "name": "symfony/config", @@ -8812,16 +8987,16 @@ }, { "name": "symfony/css-selector", - "version": "v3.4.0", + "version": "v3.4.3", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "7134b93e90ea7e7881fcb2da006d21b4c5f31908" + "reference": "e66394bc7610e69279bfdb3ab11b4fe65403f556" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/7134b93e90ea7e7881fcb2da006d21b4c5f31908", - "reference": "7134b93e90ea7e7881fcb2da006d21b4c5f31908", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/e66394bc7610e69279bfdb3ab11b4fe65403f556", + "reference": "e66394bc7610e69279bfdb3ab11b4fe65403f556", "shasum": "" }, "require": { @@ -8861,7 +9036,7 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2017-11-05 16:10:10" + "time": "2018-01-03 07:37:34" }, { "name": "symfony/debug", @@ -8985,16 +9160,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v2.8.31", + "version": "v2.8.33", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "b59aacf238fadda50d612c9de73b74751872a903" + "reference": "d64be24fc1eba62f9daace8a8918f797fc8e87cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b59aacf238fadda50d612c9de73b74751872a903", - "reference": "b59aacf238fadda50d612c9de73b74751872a903", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d64be24fc1eba62f9daace8a8918f797fc8e87cc", + "reference": "d64be24fc1eba62f9daace8a8918f797fc8e87cc", "shasum": "" }, "require": { @@ -9041,20 +9216,20 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2017-11-05 15:25:56" + "time": "2018-01-03 07:36:31" }, { "name": "symfony/filesystem", - "version": "v3.4.0", + "version": "v3.4.3", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "de56eee71e0a128d8c54ccc1909cdefd574bad0f" + "reference": "e078773ad6354af38169faf31c21df0f18ace03d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/de56eee71e0a128d8c54ccc1909cdefd574bad0f", - "reference": "de56eee71e0a128d8c54ccc1909cdefd574bad0f", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/e078773ad6354af38169faf31c21df0f18ace03d", + "reference": "e078773ad6354af38169faf31c21df0f18ace03d", "shasum": "" }, "require": { @@ -9090,7 +9265,7 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2017-11-19 18:59:05" + "time": "2018-01-03 07:37:34" }, { "name": "symfony/finder", @@ -9278,16 +9453,16 @@ }, { "name": "symfony/options-resolver", - "version": "v3.4.0", + "version": "v3.4.3", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "08748edfe6982f4d878cc42b8325b19a276fb1cf" + "reference": "f31f4d3ce4eaf7597abc41bd5ba53d634c2fdb0e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/08748edfe6982f4d878cc42b8325b19a276fb1cf", - "reference": "08748edfe6982f4d878cc42b8325b19a276fb1cf", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/f31f4d3ce4eaf7597abc41bd5ba53d634c2fdb0e", + "reference": "f31f4d3ce4eaf7597abc41bd5ba53d634c2fdb0e", "shasum": "" }, "require": { @@ -9328,7 +9503,7 @@ "configuration", "options" ], - "time": "2017-11-05 16:10:10" + "time": "2018-01-03 07:37:34" }, { "name": "symfony/polyfill-mbstring", @@ -9750,16 +9925,16 @@ }, { "name": "symfony/yaml", - "version": "v3.3.13", + "version": "v3.3.15", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "0938408c4faa518d95230deabb5f595bf0de31b9" + "reference": "7c80d81b5805589be151b85b0df785f0dc3269cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/0938408c4faa518d95230deabb5f595bf0de31b9", - "reference": "0938408c4faa518d95230deabb5f595bf0de31b9", + "url": "https://api.github.com/repos/symfony/yaml/zipball/7c80d81b5805589be151b85b0df785f0dc3269cf", + "reference": "7c80d81b5805589be151b85b0df785f0dc3269cf", "shasum": "" }, "require": { @@ -9801,7 +9976,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2017-11-10 18:26:04" + "time": "2018-01-03 07:37:11" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -11800,16 +11975,16 @@ }, { "name": "phpunit/php-token-stream", - "version": "1.4.11", + "version": "1.4.12", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7" + "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16" }, "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/1ce90ba27c42e4e44e6d8458241466380b51fa16", + "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16", "shasum": "" }, "require": { @@ -11845,7 +12020,7 @@ "keywords": [ "tokenizer" ], - "time": "2017-02-27 10:12:30" + "time": "2017-12-04 08:55:13" }, { "name": "phpunit/phpunit", @@ -12394,16 +12569,16 @@ }, { "name": "symfony/browser-kit", - "version": "v3.4.0", + "version": "v3.4.3", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", - "reference": "179522b5f0b5e6d00bb60f38a4d6b29962e4b61b" + "reference": "490f27762705c8489bd042fe3e9377a191dba9b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/179522b5f0b5e6d00bb60f38a4d6b29962e4b61b", - "reference": "179522b5f0b5e6d00bb60f38a4d6b29962e4b61b", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/490f27762705c8489bd042fe3e9377a191dba9b4", + "reference": "490f27762705c8489bd042fe3e9377a191dba9b4", "shasum": "" }, "require": { @@ -12447,20 +12622,20 @@ ], "description": "Symfony BrowserKit Component", "homepage": "https://symfony.com", - "time": "2017-11-07 14:20:24" + "time": "2018-01-03 07:37:34" }, { "name": "symfony/dom-crawler", - "version": "v3.4.0", + "version": "v3.4.3", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "7bf68716e400997a291ad42c9f9fe7972e6656d2" + "reference": "09bd97b844b3151fab82f2fdd62db9c464b3910a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/7bf68716e400997a291ad42c9f9fe7972e6656d2", - "reference": "7bf68716e400997a291ad42c9f9fe7972e6656d2", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/09bd97b844b3151fab82f2fdd62db9c464b3910a", + "reference": "09bd97b844b3151fab82f2fdd62db9c464b3910a", "shasum": "" }, "require": { @@ -12503,7 +12678,7 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com", - "time": "2017-11-05 16:10:10" + "time": "2018-01-03 07:37:34" }, { "name": "webmozart/assert", diff --git a/database/migrations/2018_01_10_073825_add_subscription_format.php b/database/migrations/2018_01_10_073825_add_subscription_format.php new file mode 100644 index 000000000000..922cd5816d54 --- /dev/null +++ b/database/migrations/2018_01_10_073825_add_subscription_format.php @@ -0,0 +1,32 @@ +enum('format', ['JSON', 'UBL'])->default('JSON'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('subscriptions', function ($table) { + $table->dropColumn('format'); + }); + } +} diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index 2db5efabd8a5..2aabc2ae82e3 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -2572,7 +2572,7 @@ $LANG = array( 'optional_payment_methods' => 'Optional Payment Methods', 'add_subscription' => 'Add Subscription', 'target_url' => 'Target', - 'target_url_help' => 'When the selected event occurs the app will post the entity as JSON to the target URL.', + 'target_url_help' => 'When the selected event occurs the app will post the entity to the target URL.', 'event' => 'Event', 'subscription_event_1' => 'Created Client', 'subscription_event_2' => 'Created Invoice', diff --git a/resources/views/accounts/subscription.blade.php b/resources/views/accounts/subscription.blade.php index 0c69db818916..04a9b094673b 100644 --- a/resources/views/accounts/subscription.blade.php +++ b/resources/views/accounts/subscription.blade.php @@ -7,6 +7,7 @@ {!! Former::open($url)->method($method)->addClass('warn-on-exit')->rules(array( 'event_id' => 'required', 'target_url' => 'required|url', + 'format' => 'required', )); !!}